import{a as d,b as y}from"./chunk-HH46YES3.js";import{a as u}from"./chunk-WV57B4F3.js";import{a as S}from"./chunk-M63JVBVE.js";import{d as h}from"./chunk-N2FMBWO7.js";import{a as f}from"./chunk-4QCIIFWS.js";import{L as i,ia as o,na as l}from"./chunk-C2QKZJOP.js";import{d as m,n as A}from"./chunk-INB5GR2I.js";var a=(function(c){return c[c.NoReturn=0]="NoReturn",c[c.Full=1]="Full",c[c.Partial=2]="Partial",c})(a||{});A();var s=class s{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){if(!e?.length)return null;let t=e.includes(1),n=e.includes(2);switch(!0){case(t&&n&&r!=null||n&&r!=null):return this._localization.getSync("\u0421\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439 (\u0414\u043E\u043B\u0433)");case(t&&r!=null):return this._localization.getSync("\u041D\u0430\u043B\u0438\u0447\u043D\u044B\u0439 (\u0414\u043E\u043B\u0433)");case(t&&n):return this._localization.getSync("\u0421\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439");case t:return this._localization.getSync("\u041D\u0430\u043B\u0438\u0447\u043D\u044B\u0439");case n:return this._localization.getSync("\u0411\u0435\u0437\u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0439");default:return null}}getPriceNameById(e){return e===null?this._localization.getSync("\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F"):this.prices.find(r=>r.id===e)?.name??this._localization.getSync("\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F")}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))}};s.\u0275fac=function(r){return new(r||s)(l(d),l(u),l(h))},s.\u0275prov=o({token:s,factory:s.\u0275fac});var p=s;m([f(S.prices)],p.prototype,"prices",void 0);var N=(()=>{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)(l(y),l(u))},e.\u0275prov=o({token:e,factory:e.\u0275fac});let c=e;return c})();export{a,p as b,N as c};
//# sourceMappingURL=chunk-KRNGHHA3.js.map
