import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import { Sun, Moon } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useTheme } from '@/contexts/ThemeContext'; /* ── Radix DropdownMenu thin wrappers ──────────────────────── */ const DropdownMenu = DropdownMenuPrimitive.Root; const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; function DropdownMenuContent({ className, sideOffset = 6, ref, ...props }) { return ( ); } function DropdownMenuItem({ className, inset, ref, ...props }) { return ( ); } /* ── Theme options config ───────────────────────────────────── */ const THEMES = [ { value: 'light', label: 'Light', Icon: Sun }, { value: 'dark', label: 'Dark', Icon: Moon }, ]; /* ── ThemeToggle ────────────────────────────────────────────── */ export function ThemeToggle({ className }) { const { theme, setTheme } = useTheme(); const current = THEMES.find((t) => t.value === theme) ?? THEMES[1]; const CurrentIcon = current.Icon; return ( {THEMES.map(({ value, label, Icon }) => ( setTheme(value)} className={cn( theme === value && 'text-primary font-medium' )} > {label} ))} ); }