import{b as l,c as d,a as u}from"./vendor-redux-a1f00e6b.js";import{cI as a,F as p}from"./index-c62ac197.js";async function E(e){return(await a.apiV10EntityPost(e)).data}async function y(e){return(await a.apiV10EntityGet(e)).data}async function C(e){return(await a.apiV10EntityIdGet(e)).data}async function b(e,t){return(await a.apiV10EntityIdPut(e,t)).data}async function S(e){return(await a.apiV10EntityIdDelete(e)).data}async function I(e){return(await a.apiV10EntityEntityUsersEntityIdGet(e)).data}const o="CountyData",n=l(`${o}/getCountyList`,async e=>(await y({filters:e==null?void 0:e.filters})).data),r=l(o+"/getCountyDetails",async e=>(await C(e.id)).data),f={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},D={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:f,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},CountyList:[],CountyDetails:{},paymentList:[]},c=d({name:`${o}`,initialState:D,reducers:{setTableData:(e,t)=>{e.tableData=t.payload},setFilterData:(e,t)=>{e.filterData=t.payload},toggleDeleteConfirmation:(e,t)=>{e.deleteConfirmation=t.payload},setSelectedRowData:(e,t)=>{e.selectedRowData=t.payload}},extraReducers:e=>{e.addCase(n.fulfilled,(t,s)=>{var i;t.CountyList=(i=s.payload.result)==null?void 0:i.$values,t.tableData.total=s.payload.result.$values.length,t.loading=!1}).addCase(n.pending,t=>{t.loading=!0}).addCase(n.rejected,t=>{t.loading=!1}).addCase(r.fulfilled,(t,s)=>{t.CountyDetails=s.payload,t.loading=!1}).addCase(r.pending,t=>{t.loading=!0})}}),{setTableData:G,setFilterData:L,toggleDeleteConfirmation:R,setSelectedRowData:V}=c.actions,g=c.reducer,h=u({data:g}),v=p;export{b as a,E as b,S as c,I as d,r as e,n as g,h as r,V as s,R as t,v as u};
