import { ToggleButtonGroup, ToggleButton, Box } from '@mui/material'; import { Sun1, Moon } from 'iconsax-react'; import { useTranslation } from 'react-i18next'; import { Icon } from '@rkheftan/harmony-ui'; import { type MouseEvent } from 'react'; enum ThemeMode { Light = 'light', Dark = 'dark', } interface ThemeToggleButtonProps { value: 'light' | 'dark'; onChange: (newMode: 'light' | 'dark') => void; } export const ThemeToggleButton = ({ value, onChange, }: ThemeToggleButtonProps) => { const { t } = useTranslation('setting'); const handleChange = ( _event: MouseEvent, newMode: 'light' | 'dark' | null, ) => { if (newMode !== null) { onChange(newMode); } }; return ( {t('settings.light')} {t('settings.dark')} ); };