import { Badge } from "@/components/ui/badge"; import type { OCRStatus } from "@/lib/api"; interface OcrBadgeProps { status?: OCRStatus | null; } /** * OcrBadge renders a small status pill next to the mail-detail header, * mirroring the verification badges. `disabled` and missing values render * nothing, so the component is safe to drop in unconditionally. */ export function OcrBadge({ status }: OcrBadgeProps) { if (!status || status === "disabled") return null; switch (status) { case "done": return ( OCR ✓ ); case "failed": return ( OCR ✗ ); case "skipped": return ( OCR n/a ); case "pending": return ( OCR … ); default: return null; } }