import { Trans } from "@lingui/react/macro";
import { t } from "@lingui/core/macro";
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"
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}
)
})}
)
}