import Link from "next/link"; import { badgeVariants, type BadgeVariants } from "@/components/ui/badge"; import { countBySeverity, type Decision, type Severity } from "@/lib/decisions"; import Panel from "./Panel"; const TONE: Record = { blocking: "blocking", open: "open", info: "info", }; /** Worst first, eight of them, and the count of the rest. */ export default function DecisionsPanel({ decisions }: { decisions: Decision[] }) { const counts = countBySeverity(decisions); const worst = decisions.slice(0, 8); return (
{counts.blocking} blocking {counts.open} open {counts.info} info
{worst.length === 0 ? (

nothing undecided

) : ( )}
); }