import { CalendarDays, Download, Drill, ShieldCheck, UsersRound } from 'lucide-react'; import { useBooking } from '../booking-provider'; import { formatBookingDate, toIsoDateLocal } from '../lib/booking-time'; export function BookingDaySummary() { const { selectedDate, summary } = useBooking(); return ( Resumen del día {formatBookingDate(selectedDate, { year: 'numeric' })} ); } interface SummaryCardProps { label: string; value: number; detail?: string; icon: typeof CalendarDays; className: string; } function SummaryCard({ label, value, detail, icon: Icon, className }: SummaryCardProps) { return ( {label} {value} {detail && {detail}} ); } export function BookingQuickActions() { const { selectedDate, selectedStatus, setSelectedDate, setSelectedStatus, exportDayReport } = useBooking(); const todayIso = toIsoDateLocal(new Date()); const isViewingTodayReservations = selectedDate === todayIso && selectedStatus === 'reserved'; const isViewingMaintenance = selectedStatus === 'maintenance'; return ( Acciones rápidas { setSelectedDate(todayIso); setSelectedStatus(isViewingTodayReservations ? 'all' : 'reserved'); }} aria-pressed={isViewingTodayReservations} className="flex h-10 items-center gap-3 rounded-md border bg-background/45 px-3 text-left text-sm transition-colors hover:bg-muted aria-pressed:border-reserved/50 aria-pressed:bg-reserved/10" > {isViewingTodayReservations ? 'Ver todos los estados' : 'Ver reservas de hoy'} setSelectedStatus(isViewingMaintenance ? 'all' : 'maintenance')} aria-pressed={isViewingMaintenance} className="flex h-10 items-center gap-3 rounded-md border bg-background/45 px-3 text-left text-sm transition-colors hover:bg-muted aria-pressed:border-maintenance/50 aria-pressed:bg-maintenance/10" > {isViewingMaintenance ? 'Ver todos los estados' : 'Ver mantenimiento'} Exportar reporte ); }
{formatBookingDate(selectedDate, { year: 'numeric' })}
{label}
{value}
{detail}