'use client' import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemIndicator, DropdownMenuTrigger, } from '@langgenius/dify-ui/dropdown-menu' import { useTheme } from 'next-themes' import { useTranslation } from 'react-i18next' import ActionButton from '@/app/components/base/action-button' export type Theme = 'light' | 'dark' | 'system' export default function ThemeSelector() { const { t } = useTranslation() const { theme, setTheme } = useTheme() const handleThemeChange = (newTheme: Theme) => { setTheme(newTheme) } const getCurrentIcon = () => { switch (theme) { case 'light': return case 'dark': return default: return } } return ( )} > {getCurrentIcon()} handleThemeChange(value as Theme)}> {t('theme.light', { ns: 'common' })} {t('theme.dark', { ns: 'common' })} {t('theme.auto', { ns: 'common' })} ) }