import{e as l,j as e}from"./index-D4ZMoJFe.js";import{P as x}from"./adminUtils-Qmlne9KJ.js";/**
 * @license lucide-react v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const i=l("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m=l("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);function o({gridState:n,onToggle:s,readOnly:d=!1}){return e.jsx("div",{className:"table-shell overflow-x-auto",children:e.jsxs("table",{className:"min-w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-surface2 text-left text-xs uppercase tracking-[0.16em] text-textMuted",children:[e.jsx("th",{className:"px-4 py-3",children:"Module"}),x.map(t=>e.jsx("th",{className:"px-4 py-3 text-center",children:t.label},t.key))]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{className:"border-t border-border/70 text-text",children:[e.jsx("td",{className:"px-4 py-3 font-medium",children:t.label}),x.map(a=>{var r;const c=!!((r=t.cells)!=null&&r[a.key]);return e.jsx("td",{className:"px-4 py-3 text-center",children:d?c?e.jsx(i,{size:16,className:"mx-auto text-accent2"}):e.jsx(m,{size:16,className:"mx-auto text-textMuted"}):e.jsx("input",{type:"checkbox",checked:c,onChange:()=>s==null?void 0:s(t.key,a.key),className:"h-4 w-4 rounded border-border text-accent focus:ring-accent"})},a.key)})]},t.key))})]})})}export{o as P};
