import{a as A,b as D}from"./chunk-4TUZRTJV.js";import{a as p}from"./chunk-K5H4JP2W.js";import{b as d}from"./chunk-SMAIR2YP.js";import{e as S}from"./chunk-BNNGG6ED.js";import{a as y}from"./chunk-F24KRXZV.js";import{K as i,fa as u,ka as s}from"./chunk-PVUKHE45.js";import{d as f,n as g}from"./chunk-VD6R3735.js";var a=(function(l){return l[l.NoReturn=0]="NoReturn",l[l.Full=1]="Full",l[l.Partial=2]="Partial",l})(a||{});g();var c=class c{constructor(e,r,t){this._sellDocumentsServiceApi=e,this._paymentServiceApi=r,this._localization=t,this._defaultFilter={criteria:null,take:10,skip:0,orderBy:"id"}}getAll(e){return this._sellDocumentsServiceApi.getAll(e??this._defaultFilter).pipe(i(1))}getById(e){return this._sellDocumentsServiceApi.getById(e).pipe(i(1))}fiscalizeById(e){return this._sellDocumentsServiceApi.fiscalizeById(e).pipe(i(1))}externalFiscalize(e){return this._sellDocumentsServiceApi.externalFiscalize(e).pipe(i(1))}getPaymentMethods(e){return this._paymentServiceApi.getPaymentMethodsWithArchive(e).pipe(i(1))}getReturnTypeName(e){switch(e){case a.NoReturn:return this._localization.getSync("\u041D\u0435\u0442");case a.Full:return this._localization.getSync("\u041F\u043E\u043B\u043D\u044B\u0439");case a.Partial:return this._localization.getSync("\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u044B\u0439");default:return""}}getPaymentTypeName(e,r,t=null){let n=e?.includes(1),o=e?.includes(2),h=r!=null&&t!=null&&r===t,v=r!=null&&r>0,_=r!=null&&!h;switch(!0){case(h||!n&&!o&&v):return this._localization.getSync("\u0414\u043E\u043B\u0433");case(n&&o):case((n||o)&&_):return this._localization.getSync("\u0421\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439");case n:return this._localization.getSync("\u041D\u0430\u043B\u0438\u0447\u043D\u044B\u0439");case o:return this._localization.getSync("\u0411\u0435\u0437\u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0439");default:return null}}getSellDocumentsDataView(e){return this._sellDocumentsServiceApi.getSellDocumentsDataView(e)}syncSellDocument(e,r=!1){return this._sellDocumentsServiceApi.syncSellDocument(e,r).pipe(i(1))}delete(e,r=!1){return this._sellDocumentsServiceApi.delete(e,r).pipe(i(1))}lastSellDocument(e,r=!1){return this._sellDocumentsServiceApi.delete(e,r).pipe(i(1))}getLastSellDocument(){let e={criteria:null,take:1,skip:0,orderBy:"operationDate"};return this._sellDocumentsServiceApi.getAll(e).pipe(i(1))}};c.\u0275fac=function(r){return new(r||c)(s(A),s(p),s(S))},c.\u0275prov=u({token:c,factory:c.\u0275fac});var m=c;f([y(d.prices)],m.prototype,"prices",void 0);var R=(()=>{let e=class e{constructor(t,n){this._returnDocumentsServiceApi=t,this._paymentServiceApi=n,this._defaultFilter={criteria:null,take:10,skip:0,orderBy:"id"}}getAll(t){return this._returnDocumentsServiceApi.getAll(t??this._defaultFilter).pipe(i(1))}getById(t){return this._returnDocumentsServiceApi.getById(t).pipe(i(1))}fiscalizeById(t){return this._returnDocumentsServiceApi.fiscalizeById(t).pipe(i(1))}getPaymentMethodById(t){return this._paymentServiceApi.getPaymentMethodById(t).pipe(i(1))}externalFiscalize(t){return this._returnDocumentsServiceApi.externalFiscalize(t).pipe(i(1))}syncReturnSellDocument(t,n=!1){return this._returnDocumentsServiceApi.syncReturnSellDocument(t,n).pipe(i(1))}delete(t,n=!1){return this._returnDocumentsServiceApi.delete(t,n).pipe(i(1))}};e.\u0275fac=function(n){return new(n||e)(s(D),s(p))},e.\u0275prov=u({token:e,factory:e.\u0275fac});let l=e;return l})();export{a,m as b,R as c};
//# sourceMappingURL=chunk-5PADAU55.js.map
