import { WarningCircleIcon } from "@refs/design-system/icons"; import type { DecisionRecord } from "@refs/protocol"; export interface DecisionPicks { readonly challenge: (assumption: string) => void; readonly takePath: (name: string) => void; } function Section({ title, children }: { title: string; children: React.ReactNode }) { return (

{title}

{children}
); } function Pick({ label, onPick }: { label: string; onPick: () => void }) { return ( ); } function basename(path: string): string { return path.split("/").filter(Boolean).pop() ?? path; } export function DecisionView({ record, picks, muted = false }: { record: DecisionRecord; picks?: DecisionPicks; muted?: boolean }) { const notTaken = [...new Set([...record.alternativesConsidered, ...Object.keys(record.rejected)])]; return (

{record.decision}

{record.reason.length > 0 && (
)} {record.toReverse && (

{record.toReverse}

)} {notTaken.length > 0 && (
  1. {notTaken.map((name, index) => (
  2. ))}
)} {record.assumptions.length > 0 && (
)} {record.affectedComponents.length > 0 && (
)} {record.evidence.length > 0 && (
Evidence ยท {record.evidence.length}
)}
); }