// 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. // // Type is carried by SHAPE (TypeGlyph), never hue — see UI_REDESIGN.md §2.3. // This badge is the transitional/list-row form: glyph + word in neutral ink. import { TypeGlyph } from "@/components/marks/TypeGlyph"; const TYPE_LABEL: Record = { fire: "Fire", police: "Police", ems: "EMS", accident: "Collision", collision: "Collision", other: "Other", }; export function TypeBadge({ type }: { type: string | null }) { const label = TYPE_LABEL[type ?? "other"] ?? TYPE_LABEL.other; return ( {label} ); }