import { Check, FileSignature, FileText, Train, Wallet, type LucideIcon, } from "lucide-react"; import { Paper, Group, Stack, Text, Box } from "@mantine/core"; import { getWorkflowStageIndex, WORKFLOW_STAGES, } from "@/features/bookings/booking-status.config"; import { SectionCard } from "./detail/SectionCard"; import { BRAND_GREEN, detailStyles } from "./detail/booking-detail.styles"; const STAGE_ICONS: LucideIcon[] = [ FileText, FileSignature, FileSignature, Wallet, Train, Check, ]; interface BookingWorkflowStepperProps { status: string; title: string; description: string; titleColor: string; } export function BookingWorkflowStepper({ status, title, description, }: BookingWorkflowStepperProps) { const currentStage = getWorkflowStageIndex(status); const isTerminal = currentStage < 0; return ( {WORKFLOW_STAGES.map((stage, index) => { const Icon = STAGE_ICONS[index] ?? FileText; const isComplete = !isTerminal && index < currentStage; const isActive = !isTerminal && index === currentStage; const isLast = index === WORKFLOW_STAGES.length - 1; return ( {isComplete ? : } {stage.label} {!isLast && ( )} ); })} {title} {description} ); }