import{a as u}from"./chunk-BF44ZR3M.js";import{f as d}from"./chunk-4TKCMMYF.js";import{La as f}from"./chunk-QHAVDXDG.js";import{na as l}from"./chunk-27KSTDMK.js";import{a}from"./chunk-PDYJ5OYY.js";import{d as p,j as h}from"./chunk-GQAU5ACB.js";import{L as m,S as r,la as s,pa as n,r as c}from"./chunk-ISMRT7VU.js";var _=(()=>{class i{constructor(t){this._http=t,this._connectorBaseURL=u.apiURL}getAll(){let t=new p().append(a.SkipError,"skipError");return this._http.get(`${this._connectorBaseURL}/api/pos-terminal`,{headers:t})}create(t){return this._http.post(`${this._connectorBaseURL}/api/pos-terminal`,t)}edit(t,e){return this._http.put(`${this._connectorBaseURL}/api/pos-terminal/${t}`,e)}delete(t){return this._http.delete(`${this._connectorBaseURL}/api/pos-terminal/${t}`)}payment(t,e){let o=new p().append(a.ActAsGet,"true");return this._http.post(`${this._connectorBaseURL}/api/pos-terminal/${t}/payment`,{amount:e},{headers:o})}refund(t,e){let o=new p().append(a.ActAsGet,"true");return this._http.post(`${this._connectorBaseURL}/api/pos-terminal/${t}/refund`,e,{headers:o})}static{this.\u0275fac=function(e){return new(e||i)(n(h))}}static{this.\u0275prov=s({token:i,factory:i.\u0275fac})}}return i})();var U=(()=>{class i{constructor(t,e,o){this._posTerminalServiceApi=t,this._toastService=e,this._localizationService=o}getAll(){return this._posTerminalServiceApi.getAll().pipe(m(()=>(this._toastService.add(d(this._localizationService.getSync.bind(this._localizationService))),c([]))),r(1))}create(t){return this._posTerminalServiceApi.create(t).pipe(r(1))}edit(t,e){return this._posTerminalServiceApi.edit(t,e).pipe(r(1))}delete(t){return this._posTerminalServiceApi.delete(t).pipe(r(1))}payment(t,e){return this._posTerminalServiceApi.payment(t,e).pipe(r(1))}refund(t,e){return this._posTerminalServiceApi.refund(t,e).pipe(r(1))}static{this.\u0275fac=function(e){return new(e||i)(n(_),n(l),n(f))}}static{this.\u0275prov=s({token:i,factory:i.\u0275fac})}}return i})();export{_ as a,U as b};
//# sourceMappingURL=chunk-6OSTDBVF.js.map
