import { Check, Loader2, AlertTriangle, Clock } from "lucide-react"; import { cn } from "@/lib/utils"; type Stage = "queued" | "analyzing" | "completed" | "failed"; const STAGES: { key: Stage; label: string }[] = [ { key: "queued", label: "Queued" }, { key: "analyzing", label: "Analyzing" }, { key: "completed", label: "Completed" }, ]; function mapStatus(status: string): Stage { if (status === "complete" || status === "completed") return "completed"; if (status === "analyzing" || status === "processing") return "analyzing"; if (status === "failed") return "failed"; return "queued"; } export function StatusTimeline({ status }: { status: string }) { const current = mapStatus(status); const failed = current === "failed"; const currentIdx = failed ? 1 : STAGES.findIndex((s) => s.key === current); return (