import { Monitor, Moon, Palette, Sun } from "lucide-react"; import type { ReactElement } from "react"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { loadTheme, THEME_OPTIONS } from "@/utils/theme"; interface ThemeSelectProps { value?: string; onValueChange?: (theme: string) => void; className?: string; compact?: boolean; } const THEME_ICONS: Record = { system: , default: , "default-dark": , paper: , }; const ThemeSelect = ({ value, onValueChange, className, compact = false }: ThemeSelectProps = {}) => { const currentTheme = value || "system"; const triggerLabel = currentTheme === "system" ? "System" : THEME_OPTIONS.find((option) => option.value === currentTheme)?.label; const handleThemeChange = (newTheme: string) => { // Apply theme globally immediately loadTheme(newTheme); // Also notify parent component if callback is provided if (onValueChange) { onValueChange(newTheme); } }; return ( ); }; export default ThemeSelect;