interface HeatmapLegendProps { layerType: "coverage" | "threat-actor" | "detection-rules" | "campaign"; } const LEGENDS: Record< string, { label: string; colors: { color: string; label: string }[] } > = { coverage: { label: "Coverage Status", colors: [ { color: "#d3d3d3", label: "Not Evaluated (0)" }, { color: "#ff6666", label: "Not Covered (10)" }, { color: "#ff9933", label: "In Progress (30)" }, { color: "#ffff66", label: "Partial (60)" }, { color: "#66ff66", label: "Validated (100)" }, ], }, "threat-actor": { label: "Threat Actor Coverage", colors: [ { color: "#d3d3d3", label: "Not Used by Actor" }, { color: "#ff6666", label: "Not Covered (10)" }, { color: "#ff9933", label: "In Progress (30)" }, { color: "#ffff66", label: "Partial (60)" }, { color: "#66ff66", label: "Covered (100)" }, ], }, "detection-rules": { label: "Detection Rules Coverage", colors: [ { color: "#d3d3d3", label: "0 rules" }, { color: "#ff6666", label: "1 rule" }, { color: "#ff9933", label: "2 rules" }, { color: "#ffff66", label: "3 rules" }, { color: "#66ff66", label: "4+ rules" }, ], }, campaign: { label: "Campaign Progress", colors: [ { color: "#ff6666", label: "Draft / Rejected" }, { color: "#ff9933", label: "Red Executing (30)" }, { color: "#ffff66", label: "Blue Evaluating (50)" }, { color: "#66ff66", label: "Validated (100)" }, ], }, }; export default function HeatmapLegend({ layerType }: HeatmapLegendProps) { const legend = LEGENDS[layerType] || LEGENDS.coverage; return (