import{r as t,j as s}from"./index-Dbk1Plmn.js";import{C as x,a as g,b as h,c as i}from"./card-CfjWPSFY.js";import{e as j,A as f}from"./agent_badge-BZd6ZAh5.js";function N({provenance:a,attribution:n,title:d="Agent attribution",description:c,className:m}){const e=t.useMemo(()=>n??j(a),[n,a]),l=[["Tier",e==null?void 0:e.attribution_tier],["Client",e==null?void 0:e.client_name],["Version",e==null?void 0:e.client_version],["Agent subject",e==null?void 0:e.agent_sub],["Agent issuer",e==null?void 0:e.agent_iss],["Algorithm",e==null?void 0:e.agent_algorithm],["Thumbprint",e==null?void 0:e.agent_thumbprint],["Public key",e==null?void 0:e.agent_public_key],["Connection",e==null?void 0:e.connection_id],["Stamped at",e==null?void 0:e.attributed_at]].filter(([,r])=>!!r);return s.jsxs(x,{className:m,children:[s.jsxs(g,{className:"flex flex-row items-start justify-between gap-3 space-y-0",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(h,{className:"text-base",children:d}),c?s.jsx("p",{className:"text-xs text-muted-foreground",children:c}):null]}),s.jsx(f,{attribution:e})]}),s.jsx(i,{children:l.length===0?s.jsxs("p",{className:"text-sm text-muted-foreground",children:["No agent attribution recorded for this record. Writes made before AAuth was enabled or with generic ",s.jsx("code",{children:"clientInfo"}),"collapse to the ",s.jsx("em",{children:"anonymous"})," tier."]}):s.jsx("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-sm",children:l.map(([r,o])=>s.jsxs(t.Fragment,{children:[s.jsx("dt",{className:"text-muted-foreground",children:r}),s.jsx("dd",{className:"break-all font-mono text-xs",children:o})]},r))})})]})}export{N as A};
