"use client"; import { useTheme } from "@/components/providers"; import { themeLabels, type Theme } from "@/lib/theme/themes"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import { Sun, Moon, Sparkles, Check } from "lucide-react"; import { cn } from "@/lib/utils"; const themeIcons: Record = { light: , dark: , casaos: , }; const themeDot: Record = { light: "bg-amber-400", dark: "bg-indigo-400", casaos: "bg-pink-400", }; export function ThemeToggle() { const { theme, setTheme } = useTheme(); return ( {(["light", "dark", "casaos"] as Theme[]).map((t) => ( setTheme(t)} className={cn("gap-2.5 rounded-lg cursor-pointer", theme === t && "bg-accent")}> {themeIcons[t]} {themeLabels[t]} {theme === t && } ))} ); }