import{a as m}from"./chunk-UQ5SBR3X.js";import{b as o}from"./chunk-SYE2YM6F.js";import{a as h}from"./chunk-7N232KV6.js";import{i as u}from"./chunk-NDLDFKR2.js";import{K as a,fa as n,ka as c,o as s}from"./chunk-PVUKHE45.js";var C=(()=>{let t=class t{constructor(e){this._serviceCenterServiceApi=e}getAll(e){return this._serviceCenterServiceApi.getAll(e).pipe(a(1))}getById(e){return this._serviceCenterServiceApi.getById(e).pipe(a(1))}create(e){return this._serviceCenterServiceApi.create(e).pipe(a(1))}delete(e){return this._serviceCenterServiceApi.delete(e).pipe(a(1))}changeOverdraft(e,r){return this._serviceCenterServiceApi.changeOverdraft(e,r).pipe(a(1))}changeBalance(e,r){return this._serviceCenterServiceApi.changeBalance(e,r).pipe(a(1))}balanceHistory(e,r){return this._serviceCenterServiceApi.balanceHistory(e,r).pipe(a(1))}initDataSourceServiceCenters(e){return new o({key:"id",load:r=>{let p=r.searchValue??e??"";return e&&(e=""),s(this.getAll({criteria:{search:{name:p,xin:p,phone:p}},take:r.take??50,skip:r.skip??0,isAscending:!0,orderBy:"id"})).then(l=>({data:l.data,totalCount:l.count}))}})}};t.\u0275fac=function(r){return new(r||t)(c(m))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let i=t;return i})();var v=(()=>{let t=class t{constructor(e){this._http=e}getAllDataView(e){return this._http.post("/api/admin/companies/dataview",e,{headers:h})}assignServiceCenter(e){return this._http.put("/api/admin/companies/assign-service-center",e)}};t.\u0275fac=function(r){return new(r||t)(c(u))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let i=t;return i})();var D=(()=>{let t=class t{constructor(e){this._organizationServiceApi=e}getAllDataView(e){return this._organizationServiceApi.getAllDataView(e).pipe(a(1))}assignServiceCenter(e){return this._organizationServiceApi.assignServiceCenter(e).pipe(a(1))}initDataSourceCompanies(){return new o({key:"id",load:e=>s(this.getAllDataView({searchText:e.searchValue,take:50,skip:0})).then(r=>({data:r.data,totalCount:r.totalCount}))})}};t.\u0275fac=function(r){return new(r||t)(c(v))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let i=t;return i})();export{C as a,v as b,D as c};
//# sourceMappingURL=chunk-WUEJ7YXP.js.map
