"use client"; import { useState } from "react"; import { CalendarConfig } from "../types"; import { Button } from "@/components/ui/button"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Switch } from "@/components/ui/switch"; import { Input } from "@/components/ui/input"; import { Card } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; interface CalendarSettingsProps { config: CalendarConfig; onSave: (config: CalendarConfig) => void; onClose: () => void; } /** * 달력 위젯 설정 UI (Popover 내부용) */ export function CalendarSettings({ config, onSave, onClose }: CalendarSettingsProps) { const [localConfig, setLocalConfig] = useState(config); const handleSave = () => { onSave(localConfig); }; return (
{/* 헤더 */}

📅 달력 설정

{/* 내용 - 스크롤 가능 */}
{/* 뷰 타입 선택 (현재는 month만) */}
{/* 시작 요일 선택 */}
{/* 테마 선택 */}
{[ { value: "light", label: "Light", gradient: "bg-gradient-to-br from-background to-muted", text: "text-foreground", }, { value: "dark", label: "Dark", gradient: "bg-gradient-to-br from-foreground to-foreground", text: "text-background", }, { value: "custom", label: "사용자", gradient: "bg-gradient-to-br from-primary to-primary/80", text: "text-primary-foreground", }, ].map((theme) => ( ))}
{/* 사용자 지정 색상 */} {localConfig.theme === "custom" && (
setLocalConfig({ ...localConfig, customColor: e.target.value })} className="h-10 w-16 cursor-pointer" /> setLocalConfig({ ...localConfig, customColor: e.target.value })} placeholder="#3b82f6" className="flex-1 font-mono text-xs" />
)}
{/* 표시 옵션 */}
{/* 오늘 강조 */}
📍
setLocalConfig({ ...localConfig, highlightToday: checked })} />
{/* 주말 강조 */}
🎨
setLocalConfig({ ...localConfig, highlightWeekends: checked })} />
{/* 공휴일 표시 */}
🎉
setLocalConfig({ ...localConfig, showHolidays: checked })} />
{/* 푸터 */}
); }