import{a as e,t}from"./react-DK-MTtD8.js";var n=e(t(),1);function r(e=15){let[t,r]=(0,n.useState)(1),[i,a]=(0,n.useState)(e),o=(0,n.useMemo)(()=>({page:String(t),page_size:String(i)}),[t,i]),s=e=>{let t={...o};return e&&Object.assign(t,e),t},c=e=>e?Array.isArray(e)?e:e?.results||[]:[],l=e=>e?Array.isArray(e)?e.__count??e.length:e?.count??e?.results?.length??0:0;return{page:t,pageSize:i,setPage:r,setPageSize:a,params:o,buildParams:s,getItems:c,getCount:l,tableProps:e=>({totalCount:l(e),currentPage:t,pageSize:i,onPageChange:r,onPageSizeChange:e=>{a(e),r(1)}})}}export{r as t};