import{k as e}from"./index-BVfpSx5Q.js";import{L as n}from"./layout-NiehYZnq.js";import{P as d,K as l,S as x,C as m,f as v}from"./ui-DGkmnhL-.js";import{b as o,A as p,t as h}from"./hatunDoctrine-Cq1LMtli.js";const b={approved:"ok","approved-with-conditions":"warn",rejected:"error","in-review":"info"};function u(){const t=o.filter(s=>s.decision==="in-review").length,i=o.filter(s=>s.decision==="approved"||s.decision==="approved-with-conditions").length,c=o.filter(s=>s.decision==="rejected").length;return e.jsxs(n,{children:[e.jsx(d,{label:"DOCTRINE · ARG",title:"Pre-Deployment Alignment Review Gate",subtitle:"No agent version reaches production without an ARG report. Decisions are signed by the relevant business and risk owners.",status:"GATED"}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6",children:[e.jsx(l,{label:"REPORTS",value:o.length,sub:"this window",accent:"#c9b787"}),e.jsx(l,{label:"APPROVED",value:i,sub:"cleared for production",accent:"#c9b787"}),e.jsx(l,{label:"IN REVIEW",value:t,sub:"awaiting sign-off",accent:"#8a8a8a"}),e.jsx(l,{label:"REJECTED",value:c,sub:"blocked",accent:"#f5f5f5"})]}),e.jsx(x,{children:"Reports"}),e.jsx("div",{className:"flex flex-col gap-3",children:o.map(s=>e.jsxs(m,{children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3 flex-wrap",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("span",{className:"font-mono text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:"rgba(201,183,135,0.1)",color:"#c9b787"},children:s.id}),e.jsx(v,{status:b[s.decision],label:s.decision.replace(/-/g," ").toUpperCase()}),s.agentId&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded font-mono",style:{backgroundColor:"rgba(138,138,138,0.1)",color:"#8a8a8a"},children:p[s.agentId]})]}),e.jsx("div",{className:"text-sm font-semibold",style:{color:"var(--color-a11oy-text)"},children:s.subject})]}),e.jsxs("div",{className:"text-xs font-mono text-right",style:{color:"var(--color-a11oy-text-ghost)"},children:["requested ",new Date(s.requestedAt).toLocaleDateString(),e.jsxs("div",{children:["reviewed ",new Date(s.reviewedAt).toLocaleDateString()]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 mb-3 text-xs",children:[e.jsxs("div",{className:"rounded border p-2",style:{borderColor:"var(--color-a11oy-border)"},children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"Min eval composite"}),e.jsx("div",{className:"font-mono",style:{color:"#c9b787"},children:h(s.signals.evalsCompositeMin)})]}),e.jsxs("div",{className:"rounded border p-2",style:{borderColor:"var(--color-a11oy-border)"},children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"Behavioral audit"}),e.jsx("div",{className:"font-mono",style:{color:s.signals.behavioralAuditClean?"#c9b787":"#8a8a8a"},children:s.signals.behavioralAuditClean?"CLEAN":"OPEN"})]}),e.jsxs("div",{className:"rounded border p-2",style:{borderColor:"var(--color-a11oy-border)"},children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"Red-team passes"}),e.jsx("div",{className:"font-mono",style:{color:"var(--color-a11oy-text)"},children:s.signals.redTeamPasses})]}),e.jsxs("div",{className:"rounded border p-2",style:{borderColor:"var(--color-a11oy-border)"},children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"Open RH"}),e.jsx("div",{className:"font-mono",style:{color:s.signals.rewardHackingOpen>0?"#f5f5f5":"#c9b787"},children:s.signals.rewardHackingOpen})]})]}),e.jsxs("p",{className:"text-xs mb-2",style:{color:"var(--color-a11oy-text-sub)"},children:[e.jsx("span",{style:{color:"var(--color-a11oy-text-ghost)"},children:"Rationale: "}),s.rationale]}),s.conditions.length>0&&e.jsxs("div",{className:"text-xs mb-2",children:[e.jsx("div",{style:{color:"#c9b787"},className:"font-mono mb-1",children:"CONDITIONS"}),e.jsx("ul",{className:"flex flex-col gap-1",children:s.conditions.map((a,r)=>e.jsxs("li",{className:"flex gap-2",style:{color:"var(--color-a11oy-text-sub)"},children:[e.jsx("span",{style:{color:"#c9b787"},children:"·"}),e.jsx("span",{children:a})]},r))})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 pt-2 border-t",style:{borderColor:"var(--color-a11oy-border)"},children:s.reviewers.map((a,r)=>e.jsxs("span",{className:"text-xs px-2 py-0.5 rounded font-mono",style:{backgroundColor:"var(--color-a11oy-muted)",color:"var(--color-a11oy-text-ghost)"},children:[a.name," · ",a.role]},r))})]},s.id))})]})}export{u as AlignmentReview};