import { cn } from '@/lib/utils'; import { type LucideIcon } from 'lucide-react'; type StatusType = 'CONFIRMED' | 'PENDING' | 'CANCELLED' | 'NO_SHOW' | 'COMPLETED'; type StatusBadgeProps = { status: StatusType; label: string; icon?: LucideIcon; className?: string; }; const statusStyles: Record = { CONFIRMED: 'bg-status-confirmed-bg border-status-confirmed-border text-status-confirmed-text', PENDING: 'bg-status-pending-bg border-status-pending-border text-status-pending-text', CANCELLED: 'bg-status-cancelled-bg border-status-cancelled-border text-status-cancelled-text', NO_SHOW: 'bg-status-noshow-bg border-status-noshow-border text-status-noshow-text', COMPLETED: 'bg-status-completed-bg border-status-completed-border text-status-completed-text', }; export function StatusBadge({ status, label, icon: Icon, className }: StatusBadgeProps) { return ( {Icon && } {label} ); } export function effectiveStatusClassName( status: 'CONFIRMED' | 'CANCELLED' | 'COMPLETED' | 'NO_SHOW' ): string { return statusStyles[status]; } export function effectiveStatusLabel( status: 'CONFIRMED' | 'CANCELLED' | 'COMPLETED' | 'NO_SHOW' ): string { if (status === 'NO_SHOW') return 'No show'; if (status === 'COMPLETED') return 'Cumplida'; if (status === 'CANCELLED') return 'Cancelada'; return 'Confirmada'; }