1import{r as l,j as e}from"./react-vendor-DHsc3z8R.js";import{u as a}from"./query-vendor-BpSM1h0G.js";import{b as n}from"./index-zHdis8yY.js";import{F as p}from"./file-text-BjKJQzre.js";import{M as c,r as x}from"./index-2UB_Jt5v.js";import"./ui-vendor-CSbCjZRx.js";import"./motion-vendor-BtpmimIC.js";function j(){const[o,t]=l.useState("index"),{data:i,isLoading:m}=a({queryKey:["/api/admin/operator-sop-docs"],queryFn:()=>n("GET","/api/admin/operator-sop-docs")}),{data:s,isLoading:d}=a({queryKey:["/api/admin/operator-sop-docs",o],queryFn:()=>n("GET",o==="index"?"/api/admin/operator-sop-docs/index":`/api/admin/operator-sop-docs/${o}`)});return e.jsxs("div",{className:"flex flex-col md:flex-row h-full min-w-0",children:[e.jsxs("div",{className:"w-full md:w-72 md:shrink-0 border-b md:border-b-0 md:border-r border-border overflow-x-auto md:overflow-y-auto p-4 flex flex-row md:flex-col gap-1 md:gap-0 md:space-y-1",children:[e.jsxs("h2",{className:"hidden md:flex text-sm font-semibold text-foreground mb-3 items-center gap-2",children:[e.jsx(p,{className:"w-4 h-4"})," Operator SOPs"]}),e.jsx("button",{onClick:()=>t("index"),"data-testid":"sop-nav-index",className:`shrink-0 md:w-full text-left px-3 py-2 rounded-md text-sm whitespace-nowrap md:whitespace-normal transition-colors ${o==="index"?"bg-secondary text-foreground font-medium":"text-muted-foreground hover:bg-secondary/50"}`,children:"Index (all products)"}),m&&e.jsx("p",{className:"text-xs text-muted-foreground px-3 py-2",children:"Loadingâ¦"}),i?.items.map(r=>e.jsx("button",{onClick:()=>t(r.slug),"data-testid":`sop-nav-${r.slug}`,className:`shrink-0 md:w-full text-left px-3 py-2 rounded-md text-sm whitespace-nowrap md:whitespace-normal transition-colors ${o===r.slug?"bg-secondary text-foreground font-medium":"text-muted-foreground hover:bg-secondary/50"}`,children:r.programName},r.slug))]}),e.jsxs("div",{className:"flex-1 min-w-0 overflow-y-auto overflow-x-hidden p-4 md:p-8",children:[d&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}),!d&&!s&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"This handbook isn't available yet."}),s&&e.jsx("div",{className:"prose dark:prose-invert max-w-3xl break-words","data-testid":"sop-doc-content",children:e.jsx(c,{remarkPlugins:[x],children:s.content})})]})]})}export{j as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.