import * as React from "react"; import { Clock, Moon, Sun } from "lucide-react"; import { type Period } from "@/src/components/ui/time-picker-utils"; const isNoon = (date: Date) => date.getHours() === 12 && date.getMinutes() === 0 && date.getSeconds() === 0; const isMidnight = (date: Date) => date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0; const getIconForPeriod = (period: Period) => { const icons = { PM: , AM: , }; return icons[period] || ; }; export const TimeIcon: React.FC<{ time: Date | Period }> = ({ time }) => { if (time instanceof Date) { if (isNoon(time)) return ; if (isMidnight(time)) return ; return ; } return getIconForPeriod(time); };