import{a as h}from"./chunk-IDENGFF3.js";import{a as s}from"./chunk-PLVHWZTL.js";import{i as p}from"./chunk-YMOV4UGM.js";import{K as a,ga as n,la as c,o}from"./chunk-I3FGJX2C.js";var m=(()=>{let t=class t{constructor(e){this._http=e}getAll(e){return this._http.post("/api/admin/service-centers/all",e,{headers:s})}getById(e){return this._http.get(`/api/admin/service-center/${e}`)}create(e){return this._http.post("/api/admin/service-center",e)}delete(e){return this._http.delete(`/api/admin/service-center/${e}`)}changeOverdraft(e,r){return this._http.put(`/api/admin/service-center/${e}/overdraft`,{overdraft:r})}changeBalance(e,r){return this._http.put(`/api/admin/service-center/${e}/balance`,r)}balanceHistory(e,r){return this._http.post(`/api/admin/service-center/${e}/balance-history`,r,{headers:s})}};t.\u0275fac=function(r){return new(r||t)(c(p))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let i=t;return i})();var S=(()=>{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 h({key:"id",load:r=>o(this.getAll({criteria:{search:{name:r.filter??e??"",xin:r.filter,phone:r.filter}},take:50,skip:0,isAscending:!0,orderBy:"id"})).then(u=>(e&&(e=""),{data:u.data}))})}};t.\u0275fac=function(r){return new(r||t)(c(m))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let i=t;return i})();var f=(()=>{let t=class t{constructor(e){this._http=e}getAll(e){return this._http.post("/api/admin/companies/all",e,{headers:s})}assignServiceCenter(e){return this._http.put("/api/admin/companies/assign-service-center",e)}};t.\u0275fac=function(r){return new(r||t)(c(p))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let i=t;return i})();var B=(()=>{let t=class t{constructor(e){this._organizationServiceApi=e}getAll(e){return this._organizationServiceApi.getAll(e).pipe(a(1))}assignServiceCenter(e){return this._organizationServiceApi.assignServiceCenter(e).pipe(a(1))}initDataSourceCompanies(){return new h({key:"id",load:e=>o(this.getAll({criteria:{search:{name:e.filter,xin:e.filter,phone:e.filter}},take:50,skip:0,isAscending:!0,orderBy:"id"})).then(r=>({data:r.data}))})}};t.\u0275fac=function(r){return new(r||t)(c(f))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let i=t;return i})();export{m as a,S as b,f as c,B as d};
//# sourceMappingURL=chunk-TP4KDMHU.js.map
