'use client'; import { Trash2 } from 'lucide-react'; import { Card } from '@/components/ui/shared/Card'; import { treatmentTypeBannerStyle } from '@/components/shared/treatmentTypeDisplay'; import type { TreatmentCatalogEntry } from '@/types/treatment-catalog'; import type { DayStripItem } from '@/components/treatment/dayStrip'; interface DayStripCardProps { item: DayStripItem; selected: boolean; treatmentCatalog: TreatmentCatalogEntry[]; onSelect: () => void; canDelete?: boolean; onDelete?: () => void; deleteAriaLabel?: string; } function StripCardBody({ item }: { item: DayStripItem }) { const metaClass = item.kind === 'appointment' ? 'opacity-95' : ''; return ( <> {item.timeLabel ? (
{item.timeLabel}
) : ({item.subtitle}
)}{item.patientFirstName} {item.patientLastName}
{item.timeLabel ? ({item.subtitle}
) : null} > ); } export function DayStripCard({ item, selected, treatmentCatalog, onSelect, canDelete = false, onDelete, deleteAriaLabel, }: DayStripCardProps) { const shellClass = ` text-start w-full sm:w-auto sm:min-w-[200px] sm:max-w-[280px] min-h-[52px] focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/45 `; if (item.kind === 'unscheduled') { const selectedClass = selected ? 'border-primary bg-primary-soft' : 'border-border/70 hover:border-border hover:bg-background-card/50'; const labelClass = selected ? 'font-medium text-text-primary' : 'text-text-secondary'; const trashClass = selected ? 'border-primary/30 text-text-muted hover:bg-red-500/15 hover:text-red-600' : 'border-border/60 text-text-muted hover:bg-red-500/15 hover:text-red-600'; const showDelete = Boolean(canDelete && onDelete); return (