import { Check, ClipboardList, Wrench, Package, Truck, Ban } from 'lucide-react' const STEPS = [ { key: 'intake', label: 'Intake', icon: ClipboardList }, { key: 'in_progress', label: 'In Progress', icon: Wrench }, { key: 'completed', label: 'Completed', icon: Package }, { key: 'delivered', label: 'Delivered', icon: Truck }, ] as const interface BatchStatusProgressProps { currentStatus: string onStatusClick?: (status: string) => void } export function BatchStatusProgress({ currentStatus, onStatusClick }: BatchStatusProgressProps) { const isCancelled = currentStatus === 'cancelled' const currentIdx = STEPS.findIndex((s) => s.key === currentStatus) return (
{STEPS.map((step, idx) => { const isCompleted = !isCancelled && currentIdx > idx const isCurrent = !isCancelled && currentIdx === idx const isFuture = isCancelled || currentIdx < idx return (
{idx < STEPS.length - 1 && (
idx ? 'bg-primary' : 'bg-muted-foreground/20'} ${isCancelled ? 'bg-destructive/20' : ''} `} /> )}
) })}
{isCancelled && (
Cancelled
)}
) }