"use client"; import React, { useState } from "react"; import { useYuukiTheme, type ThemeMode } from "@/lib/theme-context"; import { Sun, Moon, Palette, X, Check } from "lucide-react"; import { cn } from "@/lib/utils"; const PRESET_COLORS = [ "#ff6b6b", "#ffa07a", "#ffd93d", "#6bcb77", "#4d96ff", "#9b59b6", "#ff69b4", "#00d2d3", "#f8b500", "#ffffff", "#0a0a0a", "#c08b6e", ]; const MODES: { id: ThemeMode; label: string; icon: React.ElementType }[] = [ { id: "light", label: "Light", icon: Sun }, { id: "dark", label: "Dark", icon: Moon }, { id: "pastel", label: "Pastel", icon: Palette }, ]; interface ThemePanelProps { open: boolean; onClose: () => void; } export function ThemePanel({ open, onClose }: ThemePanelProps) { const { mode, setMode, accentColor, setAccentColor } = useYuukiTheme(); const [customHex, setCustomHex] = useState(accentColor); const handleHexChange = (val: string) => { setCustomHex(val); if (/^#[0-9a-fA-F]{6}$/.test(val)) { setAccentColor(val); } }; if (!open) return null; return (