import{bc as d,aY as a,aZ as p,b7 as v,aT as o,a2 as h,C as f,V as g,a1 as k,a3 as m,aS as b}from"./chunk-02oqS8tD.js";import{B as w}from"./chunk-B8Q4vgLh.js";import"./chunk-x_Z6cwvR.js";const y={environment:"Save and reuse a whole test environment","network-sim":"Throttle the connection, or go offline","network-rules":"Mock, block, delay or rewrite requests",location:"Report a different country or city",cookies:"Inspect, edit and reuse cookie sets","app-state":"Storage, cache, workers — and a clean reset",permissions:"Grant or refuse camera, mic, notifications",recorder:"Capture a journey as replayable steps",workflows:"Replay a saved journey, with evidence",responsive:"Capture and compare device sizes",accessibility:"Find contrast, label and ARIA problems",visual:"Compare a page against a reference image","page-quality":"Broken links, images and console errors","form-filler":"Fill a form with synthetic test data",executions:"Timelines, evidence and failure analysis","ai-test-generation":"Turn a requirement into test cases"},S=["Prepare","Record","Test","Analyse"],R={Prepare:"Set up the conditions before you run anything.",Record:"Capture a journey once, replay it with evidence.",Test:"Run a check against the page and keep the result.",Analyse:"What happened, why, and how to reproduce it."};function j(){const c=d(r=>r.go),[e,l]=a.useState(null),s=a.useCallback(()=>{p().then(l)},[]);a.useEffect(()=>(s(),v(s)),[s]);const u=r=>{if(e)switch(r.id){case"network-sim":return e.network?w(e.network.conditions):void 0;case"location":return e.geo?e.geo.geo.label.split(",")[0]:void 0;case"network-rules":{const n=e.intercept?.rules.length??0;return n>0?`${String(n)} armed`:void 0}case"permissions":{const n=Object.keys(e.permissions?.permissions??{}).length;return n>0?`${String(n)} set`:void 0}case"recorder":return e.recorder&&e.recorder.status!=="idle"?e.recorder.status==="recording"?"Recording":"Paused":void 0;case"environment":return e.viewport?`${String(e.viewport.appliedWidth)}px`:void 0;default:return}};return o.jsx(h,{title:"Tools",subtitle:"Prepare an environment, run a check, and keep the evidence.",children:S.map(r=>{const n=f.filter(t=>t.group===r);return n.length===0?null:o.jsx(g,{title:r,hint:R[r],children:o.jsx(k,{children:n.map(t=>{const i=t.available?.(e)??!0;return o.jsx(m,{icon:b(t.icon),title:t.title,description:y[t.id]??t.title,status:u(t),disabled:i!==!0,disabledReason:i===!0?void 0:i,onClick:()=>c(t.route)},t.id)})})},r)})})}export{j as ToolkitHubScreen};
//# sourceMappingURL=chunk-YLSPJog7.js.map
