import{c as f}from"./chunk-UU4K5RCK.js";import{a as w}from"./chunk-F24KRXZV.js";import{a as u}from"./chunk-7N232KV6.js";import{i as m}from"./chunk-NDLDFKR2.js";import{K as r,fa as n,ka as c}from"./chunk-PVUKHE45.js";import{d as h,n as b}from"./chunk-VD6R3735.js";import{a as p}from"./chunk-MZPAXKJS.js";b();var a=class a{constructor(t){this._http=t,this._defaultFilter={criteria:null,take:100,skip:0,orderBy:"id",isAscending:!0}}getAll(t=this._defaultFilter){return this._http.post("/api/money-operation/all",p({},t),{headers:u})}getById(t){return this._http.get(`/api/money-operation/${t}`)}deposit(t,o){return this._http.post(`/api/money-operation/${t}/deposits`,p({},o))}withdraw(t,o){return this._http.post(`/api/money-operation/${t}/withdrawals`,p({},o))}fiscalDeposit(t){return this._http.post("/api/money-operation/fiscal-deposit",{documentId:t})}fiscalWithdraw(t){return this._http.post("/api/money-operation/fiscal-withdrawal",{documentId:t})}externalFiscalDeposit(t){return this._http.post("/api/money-operation/external-fiscal-deposit",t)}externalFiscalWithdraw(t){return this._http.post("/api/money-operation/external-fiscal-withdrawal",t)}};a.\u0275fac=function(o){return new(o||a)(c(m))},a.\u0275prov=n({token:a,factory:a.\u0275fac});var s=a;h([w(f.selectedStoreId)],s.prototype,"_selectedStoreId",void 0);var q=(()=>{let t=class t{constructor(e){this._moneyOperationServiceApi=e}getAll(e){return this._moneyOperationServiceApi.getAll(e).pipe(r(1))}getById(e){return this._moneyOperationServiceApi.getById(e).pipe(r(1))}deposit(e,i){return this._moneyOperationServiceApi.deposit(e,i).pipe(r(1))}withdraw(e,i){return this._moneyOperationServiceApi.withdraw(e,i).pipe(r(1))}fiscalDeposit(e){return this._moneyOperationServiceApi.fiscalDeposit(e).pipe(r(1))}fiscalWithdraw(e){return this._moneyOperationServiceApi.fiscalWithdraw(e).pipe(r(1))}externalFiscalDeposit(e,i){let l=this._toTrinityMoneyOperationRequestModel(e,i);return this._moneyOperationServiceApi.externalFiscalDeposit(l).pipe(r(1))}externalFiscalWithdraw(e,i){let l=this._toTrinityMoneyOperationRequestModel(e,i);return this._moneyOperationServiceApi.externalFiscalWithdraw(l).pipe(r(1))}_toTrinityMoneyOperationRequestModel(e,i){return{documentId:e,fiscalizationData:{shiftNumber:0,dateTime:i.data.dateTime,offlineMode:i.data.offlineMode,cashboxOfflineMode:i.data.cashboxOfflineMode,cashbox:{uniqueNumber:i.data.cashbox.uniqueNumber,registrationNumber:i.data.cashbox.registrationNumber,identificationNumber:i.data.cashbox.identityNumber,address:i.data.cashbox.address,ofd:i.data.cashbox.ofd}}}}};t.\u0275fac=function(i){return new(i||t)(c(s))},t.\u0275prov=n({token:t,factory:t.\u0275fac});let d=t;return d})();export{s as a,q as b};
//# sourceMappingURL=chunk-2VN2YHJS.js.map
