import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{$ as t}from"./vendor-charts-iXlq6Rne.js";var n=e(t(),1);function r(e){let[t,r]=(0,n.useState)(1),[i,a]=(0,n.useState)(``),[o,s]=(0,n.useState)(20),c=JSON.stringify(e??{});return{page:t,params:(0,n.useMemo)(()=>{let e={page:String(t),page_size:String(o)};i&&(e.search=i);for(let[t,n]of Object.entries(JSON.parse(c)))n&&(e[t]=n);return e},[t,i,o,c]),pageSize:o,totalPages:e=>Math.ceil(e/o),onPageChange:r,onPageSizeChange:e=>{s(e),r(1)},onSearch:e=>{a(e),r(1)},resetPage:()=>r(1)}}export{r as t};