import { AlertTriangle, Bike, Car, Clock } from "lucide-react"; const SEVERITY_CLASS = { HIGH: "badge danger", MEDIUM: "badge warning", LOW: "badge", }; const label = (type) => type.toLowerCase().replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()); const when = (ts) => { if (!ts) return "—"; return new Date(ts).toLocaleString("en-IN", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit", }); }; export default function ViolationCard({ violation }) { const pct = Math.round(violation.confidence * 100); return (

{label(violation.violation_type)}

{violation.severity}
{violation.vehicle_type === "Two-Wheeler" ? ( ) : ( )} {violation.vehicle_type} {violation.license_plate || "No plate"}
{pct}%
); }