import{r as e}from"./vendor-ClLR6ncd.js";const c=t=>Object.assign({},...t.map(({accessorKey:s})=>({[s]:!0})));function l({columns:t}){const[s,i]=e.useState(c(t)),[a,n]=e.useState([]),[o,r]=e.useState(""),u=e.useCallback(()=>{i(c(t)),n([]),r("")},[t]);return e.useMemo(()=>({resetTableState:u,columnVisibility:s,sortingState:a,searchInput:o,setColumnVisibility:i,setSortingState:n,setSearchInput:r}),[u,s,a,o])}export{l as u};
