import{j as a}from"./@radix-D8tIKeo-.js";import{a as c,W as x}from"./@monaco-editor-CuNQBT0l.js";function f(){const t=c.createContext(null);function e(){const o=x.useContext(t);if(!o)throw new Error("DataTableConsumerContext must be used within its Provider");return o}function n({children:o}){const[r,u]=c.useState({}),s=l(r),i=s.length;return a.jsx(t.Provider,{value:{rowSelection:r,setRowSelection:u,selectedRowIDs:s,selectedRowCount:i},children:o})}return{Context:t,ContextProvider:n,useContext:e}}function l(t){return Object.entries(t).filter(([e,n])=>n).map(([e])=>e)}export{f as c};
