(()=>{const o=window.KIND_REGISTRY,r=[{key:"offers",label:"Offers awaiting a decision"},{key:"plans",label:"Plans awaiting approve / bypass"},{key:"questions",label:"AI-critical questions"},{key:"failed_runs",label:"Failed runs"},{key:"unpaid_invoices",label:"Unpaid invoices"}],c=[{id:"of-1",category:"offers",title:"Offer ACME-42 pending approval",status:"pending_approval",__scope:"solution:blog"},{id:"pl-1",category:"plans",title:"Plan deploy-blog awaiting approve",status:"awaiting_approve",__scope:"generic"},{id:"qn-1",category:"questions",title:"Confirm irreversible migration",status:"critical",__scope:"solution:blog"},{id:"rn-1",category:"failed_runs",title:"Run build-42 failed",status:"failed",__scope:"generic"},{id:"in-1",category:"unpaid_invoices",title:"Invoice INV-1007 unpaid",status:"ISSUED",__scope:"solution:blog"}];function u(e){const t=e&&e.liveData;return t&&Array.isArray(t.items)&&t.items.length?t.items:e&&Array.isArray(e.mockItems)&&e.mockItems||[]}function p(e){const t={};for(const a of r)t[a.key]=0;for(const a of e||[])a&&typeof a=="object"&&Object.hasOwn(t,a.category)&&(t[a.category]+=1);return t}function l(e){const t=e&&e.kind||{},a=e&&Array.isArray(e.items)&&e.items.length?e.items:u(t),y=p(a),d=window.ScopeBadge,i=t.budgetAlert;return React.createElement("div",{className:"view view-attentionDashboard"},i&&i.href?React.createElement("a",{className:"attn-budget-alert status-chip",href:i.href,"data-severity":i.severity||"info"},i.label||"Budget alert"):null,r.map(s=>{const g=a.filter(n=>n&&n.category===s.key);return React.createElement("section",{key:s.key,className:"attn-category","data-category":s.key},React.createElement("header",{className:"attn-category-head"},React.createElement("span",{className:"attn-category-label"},s.label),React.createElement("span",{className:"attn-category-count mono"},y[s.key])),g.length===0?React.createElement("div",{className:"attn-empty muted"},"Nothing needs attention here."):g.map(n=>React.createElement("div",{key:n.id||n.title,className:"attn-row"},React.createElement("span",{className:"attn-row-title"},n.title),React.createElement("span",{className:"attn-row-status status-chip mono"},n.status),d?React.createElement(d,{item:n,kind:t}):null)))}))}window.ATTENTION_DASHBOARD_VIEW_FN=l,window.VIEWS=window.VIEWS||{},window.VIEWS.attentionDashboard=l,o&&(o.attention={id:"attention",label:"Attention",workspaceLabel:"Attention Dashboard",workspaceIcon:"priority_high",description:"Everything needing a human decision now \u2014 offers pending approval, plans awaiting a gate, AI-critical questions, failed runs, and unpaid invoices. Aggregated by reference across existing sources; scope-aware with Combined-mode badges.",defaultView:"attentionDashboard",defaultDetail:"none",agentTreatment:"implicit",scopeTag:"generic",primaryAction:{label:"Refresh",kind:"primary",icon:"sync"},mockItems:c,liveData:{items:c},heroKpis:[]})})();
