// Shared incident "type" badge — used on the incidents list, incident detail, // and the dashboard's active-incidents panel. `other` covers anything outside // the four radio-traffic archetypes (rail ops, public works, utility // coordination, …) and must always resolve to a styled badge, never fall // through unstyled. const TYPE_COLORS: Record = { fire: "bg-red-900 text-red-300", police: "bg-blue-900 text-blue-300", ems: "bg-yellow-900 text-yellow-300", accident: "bg-orange-900 text-orange-300", other: "bg-gray-800 text-gray-300", }; export function TypeBadge({ type }: { type: string | null }) { const cls = TYPE_COLORS[type ?? "other"] ?? TYPE_COLORS.other; return ( {type ?? "other"} ); }