import{U as N,a as m,z as A,A as S,B as T,g as r,C as V,l as j}from"./index-17740f03-1778929502341v=1.0.0.js";const C=(i,b={},g,n,l=!0)=>{const d=N(),y=m(()=>d.companyAreaId),e=A({tableData:[],pageable:{page:1,size:10,count:0},totalParam:{},searchParam:{},baseParam:{},loading:!1}),u=m({get:()=>({page:e.pageable.page,size:e.pageable.size}),set:a=>{}}),s=async a=>{try{let t=Object.assign({},b,e.baseParam,e.searchParam,l?u.value:{});t=T(t),n&&typeof n=="function"&&(t=n(t)),typeof a=="function"&&(t=a(t)),e.totalParam=t;let{data:o}=await i({...t});g&&(o=g(o)),e.tableData=l?o.list:o;let{page:c,size:p,count:E}=o;c=Number(c),p=Number(p),l&&f({page:c,size:p,count:E})}catch(t){}},f=a=>{Object.assign(e.pageable,a)},h=a=>{e.pageable.page=1,typeof a=="function"?s(a):s()},P=()=>{e.pageable.page=1,e.searchParam={},s()},z=a=>{e.pageable.page=1,e.pageable.size=a,s()},v=a=>{e.pageable.page=a,s()},D=()=>r("div",{class:"table-empty"},[r("slot",{name:"empty"},[r("img",{src:V,alt:"notData"},null),r("div",null,[j("\u6682\u65E0\u6570\u636E")])])]);return{...S(e),BaseCompanyAreaId:y,handleSizeChange:z,handleCurrentChange:v,getTableList:s,search:h,reset:P,renderEmpty:D,pageParam:u}};export{C as u};
