import { type ComponentType } from "react" import { motion } from "framer-motion" import { Monitor, Moon, Sun } from "lucide-react" import { useTheme } from "next-themes" import { cn } from "@/lib/utils" type ThemeValue = "light" | "dark" | "system" const options: { id: ThemeValue; icon: ComponentType<{ className?: string }>; label: string }[] = [ { id: "light", icon: Sun, label: "Light" }, { id: "dark", icon: Moon, label: "Dark" }, { id: "system", icon: Monitor, label: "System" }, ] interface ThemePillSwitcherProps { className?: string variant?: "pill" | "wide" ariaLabel?: string } export const ThemePillSwitcher = ({ className = "", variant = "pill", ariaLabel = "Toggle theme", }: ThemePillSwitcherProps) => { const { theme, setTheme } = useTheme() const currentTheme = (theme ?? "system") as ThemeValue const isPill = variant === "pill" return (