import{a as u}from"./chunk-LSDU4UD5.js";import{a as l}from"./chunk-PVSWDINP.js";import{a as p}from"./chunk-KOXD6BDO.js";import{t as s,x as h}from"./chunk-OIJW4GMG.js";import{E as m,J as i,ca as o,ia as n,l as c}from"./chunk-3FIHWXA5.js";var f=(()=>{class r{constructor(e){this._http=e,this._connectorBaseURL=u.apiURL}getAll(){let e=new s().append(p.SkipError,"skipError");return this._http.get(`${this._connectorBaseURL}/api/pos-terminal`,{headers:e})}create(e){return this._http.post(`${this._connectorBaseURL}/api/pos-terminal`,e)}edit(e,t){return this._http.put(`${this._connectorBaseURL}/api/pos-terminal/${e}`,t)}delete(e){return this._http.delete(`${this._connectorBaseURL}/api/pos-terminal/${e}`)}payment(e,t){let a=new s().append(p.ActAsGet,"true");return this._http.post(`${this._connectorBaseURL}/api/pos-terminal/${e}/payment`,{amount:t},{headers:a})}refund(e,t){let a=new s().append(p.ActAsGet,"true");return this._http.post(`${this._connectorBaseURL}/api/pos-terminal/${e}/refund`,t,{headers:a})}static{this.\u0275fac=function(t){return new(t||r)(n(h))}}static{this.\u0275prov=o({token:r,factory:r.\u0275fac})}}return r})();var B=(()=>{class r{constructor(e,t){this._posTerminalServiceApi=e,this._toastService=t}getAll(){return this._posTerminalServiceApi.getAll().pipe(m(()=>(this._toastService.add({header:"\u041E\u0448\u0438\u0431\u043A\u0430",message:"Birsan Connector \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",type:"error"}),c([]))),i(1))}create(e){return this._posTerminalServiceApi.create(e).pipe(i(1))}edit(e,t){return this._posTerminalServiceApi.edit(e,t).pipe(i(1))}delete(e){return this._posTerminalServiceApi.delete(e).pipe(i(1))}payment(e,t){return this._posTerminalServiceApi.payment(e,t).pipe(i(1))}refund(e,t){return this._posTerminalServiceApi.refund(e,t).pipe(i(1))}static{this.\u0275fac=function(t){return new(t||r)(n(f),n(l))}}static{this.\u0275prov=o({token:r,factory:r.\u0275fac})}}return r})();export{f as a,B as b};
