import { LaptopIcon, MoonStarIcon, SunIcon } from "lucide-react" import { Button } from "@/components/ui/button" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu" import { useTheme } from "@/components/theme-provider" import { cn } from "@/lib/utils" import { t, Trans } from "@lingui/macro" export function ModeToggle() { const { theme, setTheme } = useTheme() const options = [ { theme: "light", Icon: SunIcon, label: Light, }, { theme: "dark", Icon: MoonStarIcon, label: Dark, }, { theme: "system", Icon: LaptopIcon, label: System, }, ] return ( {options.map((opt) => { const selected = opt.theme === theme return ( setTheme(opt.theme as "dark" | "light" | "system")} > {opt.label} ) })} ) }