import{a as h}from"./chunk-V4WESMSJ.js";import{da as s}from"./chunk-27KSTDMK.js";import{a as u}from"./chunk-KXX3UDJ3.js";import{j as l}from"./chunk-GQAU5ACB.js";import{S as i,la as a,pa as n,v as c}from"./chunk-ISMRT7VU.js";var S=(()=>{class r{constructor(e){this._serviceCenterServiceApi=e}getAll(e){return this._serviceCenterServiceApi.getAll(e).pipe(i(1))}getById(e){return this._serviceCenterServiceApi.getById(e).pipe(i(1))}create(e){return this._serviceCenterServiceApi.create(e).pipe(i(1))}delete(e){return this._serviceCenterServiceApi.delete(e).pipe(i(1))}changeOverdraft(e,t){return this._serviceCenterServiceApi.changeOverdraft(e,t).pipe(i(1))}changeBalance(e,t){return this._serviceCenterServiceApi.changeBalance(e,t).pipe(i(1))}balanceHistory(e,t){return this._serviceCenterServiceApi.balanceHistory(e,t).pipe(i(1))}initDataSourceServiceCenters(e){return new s({key:"id",load:t=>{let o=t.searchValue??e??"";return e&&(e=""),c(this.getAll({criteria:{search:{name:o,xin:o,phone:o}},take:t.take??50,skip:t.skip??0,isAscending:!0,orderBy:"id"})).then(p=>({data:p.data,totalCount:p.count}))}})}static{this.\u0275fac=function(t){return new(t||r)(n(h))}}static{this.\u0275prov=a({token:r,factory:r.\u0275fac})}}return r})();var v=(()=>{class r{constructor(e){this._http=e}getAllDataView(e){return this._http.post("/api/admin/companies/dataview",e,{headers:u})}assignServiceCenter(e){return this._http.put("/api/admin/companies/assign-service-center",e)}static{this.\u0275fac=function(t){return new(t||r)(n(l))}}static{this.\u0275prov=a({token:r,factory:r.\u0275fac})}}return r})();var b=(()=>{class r{constructor(e){this._organizationServiceApi=e}getAllDataView(e){return this._organizationServiceApi.getAllDataView(e).pipe(i(1))}assignServiceCenter(e){return this._organizationServiceApi.assignServiceCenter(e).pipe(i(1))}initDataSourceCompanies(){return new s({key:"id",load:e=>c(this.getAllDataView({searchText:e.searchValue,take:50,skip:0})).then(t=>({data:t.data,totalCount:t.totalCount}))})}static{this.\u0275fac=function(t){return new(t||r)(n(v))}}static{this.\u0275prov=a({token:r,factory:r.\u0275fac})}}return r})();export{S as a,v as b,b as c};
//# sourceMappingURL=chunk-HZ34NCLP.js.map
