import{a as c}from"./chunk-LSDU4UD5.js";import{a}from"./chunk-KOXD6BDO.js";import{a as o,f as n}from"./chunk-IQZCMWOL.js";import{K as i,da as s,ja as p}from"./chunk-AO7NUUXN.js";import{a as h}from"./chunk-K4ALXBGI.js";var m=(()=>{class e{constructor(t){this._http=t}getLatestBirsanDesktop(t,r){return this._http.get(`/api/birsan-desktop/latest?bitness=${r}&currentVersion=${t}`)}getVersion(){let t=new o().append(a.SkipError,"skipError");return this._http.get(`${c.apiURL}/api/software`,{headers:t})}static{this.\u0275fac=function(r){return new(r||e)(p(n))}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac})}}return e})();var b=(()=>{class e{constructor(t){this._birsanDesktopServiceApi=t}getLatestBirsanDesktop(t,r){return this._birsanDesktopServiceApi.getLatestBirsanDesktop(t,r).pipe(i(1))}getVersion(){return this._birsanDesktopServiceApi.getVersion().pipe(i(1))}static{this.\u0275fac=function(r){return new(r||e)(p(m))}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac})}}return e})();var u=(()=>{class e{constructor(t){this._http=t,this.apiUrl=c.apiURL}getAll(){let t=new o().append(a.SkipError,"skipError");return this._http.get(`${this.apiUrl}/api/scales`,{headers:t})}add(t){return this._http.post(`${this.apiUrl}/api/scales`,t)}edit(t,r){return this._http.put(`${this.apiUrl}/api/scales/${t}`,r)}delete(t){return this._http.delete(`${this.apiUrl}/api/scales/${t}`)}getById(t){let r=new o().append(a.SkipError,"skipError");return this._http.get(`${this.apiUrl}/api/scales/${t}`,{headers:r})}uploadPLU(t,r){return this._http.post(`${this.apiUrl}/api/scales/${t}/upload-plu`,h({},r))}static{this.\u0275fac=function(r){return new(r||e)(p(n))}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac})}}return e})();var D=(()=>{class e{constructor(t){this._scalesServiceApi=t}getScales(){return this._scalesServiceApi.getAll().pipe(i(1))}uploadPlu(t,r){return this._scalesServiceApi.uploadPLU(t,r).pipe(i(1))}add(t){return this._scalesServiceApi.add(t).pipe(i(1))}edit(t,r){return this._scalesServiceApi.edit(t,r).pipe(i(1))}delete(t){return this._scalesServiceApi.delete(t).pipe(i(1))}getById(t){return this._scalesServiceApi.getById(t).pipe(i(1))}convertScaleFormToScaleRequest(t){return{name:t.name,model:t.model,type:t.type,ethernetScale:{ipAddress:t.ipAddress,port:t.port}}}static{this.\u0275fac=function(r){return new(r||e)(p(u))}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac})}}return e})();export{m as a,b,u as c,D as d};
