'use client' import { useState } from 'react' import { RiCheckLine, RiComputerLine, RiMoonLine, RiSunLine, } from '@remixicon/react' import { useTranslation } from 'react-i18next' import { useTheme } from 'next-themes' import ActionButton from '@/app/components/base/action-button' import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger, } from '@/app/components/base/portal-to-follow-elem' export type Theme = 'light' | 'dark' | 'system' export default function ThemeSelector() { const { t } = useTranslation() const { theme, setTheme } = useTheme() const [open, setOpen] = useState(false) const handleThemeChange = (newTheme: Theme) => { setTheme(newTheme) setOpen(false) } const getCurrentIcon = () => { switch (theme) { case 'light': return case 'dark': return default: return } } return ( setOpen(!open)} > {getCurrentIcon()}
) }