import{c as h}from"./chunk-YZGKFE6P.js";import{a as f}from"./chunk-MKXPJTAW.js";import{a as m}from"./chunk-YO44C22F.js";import{f as l}from"./chunk-6VC7H3CZ.js";import{K as a,da as p,ja as n}from"./chunk-QMYHTLAJ.js";import{d,n as u}from"./chunk-HE7HQ6LI.js";import{a as s}from"./chunk-K4ALXBGI.js";u();var o=class r{constructor(e){this._http=e,this._defaultFilter={criteria:null,take:100,skip:0,orderBy:"id",isAscending:!0}}getAll(e=this._defaultFilter){return this._http.post("/api/money-operation/all",s({},e),{headers:m})}getById(e){return this._http.get(`/api/money-operation/${e}`)}deposit(e,t){return this._http.post(`/api/money-operation/${e}/deposits`,s({},t))}withdraw(e,t){return this._http.post(`/api/money-operation/${e}/withdrawals`,s({},t))}fiscalDeposit(e){return this._http.post("/api/money-operation/fiscal-deposit",{documentId:e})}fiscalWithdraw(e){return this._http.post("/api/money-operation/fiscal-withdrawal",{documentId:e})}externalFiscalDeposit(e){return this._http.post("/api/money-operation/external-fiscal-deposit",e)}externalFiscalWithdraw(e){return this._http.post("/api/money-operation/external-fiscal-withdrawal",e)}static{this.\u0275fac=function(t){return new(t||r)(n(l))}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac})}};d([f(h.selectedStoreId)],o.prototype,"_selectedStoreId",void 0);var F=(()=>{class r{constructor(t){this._moneyOperationServiceApi=t}getAll(t){return this._moneyOperationServiceApi.getAll(t).pipe(a(1))}getById(t){return this._moneyOperationServiceApi.getById(t).pipe(a(1))}deposit(t,i){return this._moneyOperationServiceApi.deposit(t,i).pipe(a(1))}withdraw(t,i){return this._moneyOperationServiceApi.withdraw(t,i).pipe(a(1))}fiscalDeposit(t){return this._moneyOperationServiceApi.fiscalDeposit(t).pipe(a(1))}fiscalWithdraw(t){return this._moneyOperationServiceApi.fiscalWithdraw(t).pipe(a(1))}externalFiscalDeposit(t,i){let c=this._toTrinityMoneyOperationRequestModel(t,i);return this._moneyOperationServiceApi.externalFiscalDeposit(c).pipe(a(1))}externalFiscalWithdraw(t,i){let c=this._toTrinityMoneyOperationRequestModel(t,i);return this._moneyOperationServiceApi.externalFiscalWithdraw(c).pipe(a(1))}_toTrinityMoneyOperationRequestModel(t,i){return{documentId:t,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}}}}static{this.\u0275fac=function(i){return new(i||r)(n(o))}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac})}}return r})();export{o as a,F as b};
