import{aT as n,aq as r,a5 as o,h as i}from"./chunk-02oqS8tD.js";import{C as l}from"./chunk-DATNr2Vu.js";const d=new Set(["failed","not-run","unsupported","blocked","partial","unverified"]);function x(e){if(d.has(e.status)&&!e.reason?.trim()){const a=`[TCR] check "${e.id}" is ${e.status} with no reason — every non-pass must explain itself`;throw new Error(a)}return e}const m={passed:{label:"Passed",tone:"clean",meaning:"This check ran and found nothing to report."},failed:{label:"Failed",tone:"alert",meaning:"This check ran and found something."},"not-run":{label:"Not run",tone:"unknown",meaning:"This check did not execute, so it has found nothing — that is not the same as finding nothing."},unsupported:{label:"Unsupported",tone:"unknown",meaning:"This browser cannot perform the check. Nothing was measured either way."},blocked:{label:"Blocked",tone:"unknown",meaning:"Something prevented the check from running — a permission, a page Chrome will not allow, a missing target."},partial:{label:"Partial",tone:"alert",meaning:"Some of this check ran. Treat the result as incomplete rather than as coverage."},unverified:{label:"Unverified",tone:"unknown",meaning:"Applied as far as we can tell, with no way to confirm the browser is honouring it."}},g={clean:"border-emerald-500/40 bg-emerald-500/[0.08] text-emerald-700 dark:text-emerald-300",alert:"border-alert-orange/40 bg-alert-orange/[0.08] text-alert-orange",unknown:"border-stroke/70 bg-stroke/10 text-muted-foreground dark:border-stroke/30 dark:bg-white/[0.04]"},u={clean:i,alert:o,unknown:l};function c({status:e,className:a}){const t=m[e],s=u[t.tone];return n.jsxs("span",{title:t.meaning,className:r("inline-flex shrink-0 items-center gap-1 rounded-md border px-1.5 py-0.5 text-[9px] font-semibold",g[t.tone],a),children:[n.jsx(s,{className:"h-2.5 w-2.5"}),t.label]})}function h({check:e}){return n.jsxs("li",{className:"flex flex-col gap-1 rounded-lg border border-stroke/70 px-2.5 py-2 dark:border-stroke/25",children:[n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"min-w-0 flex-1 text-[11px] font-medium leading-snug",children:e.label}),n.jsx(c,{status:e.status})]}),e.reason&&n.jsx("p",{className:"text-[9.5px] leading-relaxed text-muted-foreground",children:e.reason}),e.findings!==void 0&&e.findings>0&&n.jsx("p",{className:"text-[9.5px] text-muted-foreground",children:e.findings===1?"1 finding":`${String(e.findings)} findings`})]})}function b({checks:e,className:a}){return e.length===0?null:n.jsx("ul",{className:r("space-y-1.5",a),children:e.map(t=>n.jsx(h,{check:t},t.id))})}export{b as C,x as c};
//# sourceMappingURL=chunk-7iYxb0TC.js.map
