import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' import { useTheme } from '@/hooks/useTheme' import { cn } from '@/lib/utils' import { useTranslation } from '@/i18n/react-i18next-compat' export function ThemeSwitcher() { const { t } = useTranslation() const themeOptions = [ { value: 'dark', label: t('common:dark') }, { value: 'light', label: t('common:light') }, { value: 'auto', label: t('common:system') }, ] const { setTheme, activeTheme } = useTheme() return ( {themeOptions.find((item) => item.value === activeTheme)?.label || t('common:auto')} {themeOptions.map((item) => ( setTheme(item.value as 'auto' | 'light' | 'dark')} > {item.label} ))} ) }