import{a as S,b as y}from"./chunk-JBITE5EX.js";import{a as o}from"./chunk-JV3665WI.js";import{a as f}from"./chunk-KBLC5N4S.js";import{d as h}from"./chunk-MX2TZFKO.js";import{a as m}from"./chunk-X73HYPLN.js";import{K as r,da as a,ja as c}from"./chunk-AO7NUUXN.js";import{d as p,n as d}from"./chunk-HE7HQ6LI.js";var l=function(i){return i[i.NoReturn=0]="NoReturn",i[i.Full=1]="Full",i[i.Partial=2]="Partial",i}(l||{});d();var u=class i{constructor(t,e,n){this._sellDocumentsServiceApi=t,this._paymentServiceApi=e,this._localization=n,this._defaultFilter={criteria:null,take:10,skip:0,orderBy:"id"}}getAll(t){return this._sellDocumentsServiceApi.getAll(t??this._defaultFilter).pipe(r(1))}getById(t){return this._sellDocumentsServiceApi.getById(t).pipe(r(1))}fiscalizeById(t){return this._sellDocumentsServiceApi.fiscalizeById(t).pipe(r(1))}externalFiscalize(t){return this._sellDocumentsServiceApi.externalFiscalize(t).pipe(r(1))}getPaymentMethods(t){return this._paymentServiceApi.getPaymentMethodsWithArchive(t).pipe(r(1))}getReturnTypeName(t){switch(t){case l.NoReturn:return this._localization.getSync("\u041D\u0435\u0442");case l.Full:return this._localization.getSync("\u041F\u043E\u043B\u043D\u044B\u0439");case l.Partial:return this._localization.getSync("\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u044B\u0439");default:return""}}getPaymentTypeName(t,e){if(!t?.length)return null;let n=t.includes(1),s=t.includes(2);switch(!0){case(n&&s&&e!=null||s&&e!=null):return this._localization.getSync("\u0421\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439 (\u0414\u043E\u043B\u0433)");case(n&&e!=null):return this._localization.getSync("\u041D\u0430\u043B\u0438\u0447\u043D\u044B\u0439 (\u0414\u043E\u043B\u0433)");case(n&&s):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 s:return this._localization.getSync("\u0411\u0435\u0437\u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0439");default:return null}}getPriceNameById(t){return t===null?this._localization.getSync("\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F"):this.prices.find(e=>e.id===t)?.name??this._localization.getSync("\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F")}syncSellDocument(t,e=!1){return this._sellDocumentsServiceApi.syncSellDocument(t,e).pipe(r(1))}delete(t,e=!1){return this._sellDocumentsServiceApi.delete(t,e).pipe(r(1))}static{this.\u0275fac=function(e){return new(e||i)(c(S),c(o),c(h))}}static{this.\u0275prov=a({token:i,factory:i.\u0275fac})}};p([m(f.prices)],u.prototype,"prices",void 0);var M=(()=>{class i{constructor(e,n){this._returnDocumentsServiceApi=e,this._paymentServiceApi=n,this._defaultFilter={criteria:null,take:10,skip:0,orderBy:"id"}}getAll(e){return this._returnDocumentsServiceApi.getAll(e??this._defaultFilter).pipe(r(1))}getById(e){return this._returnDocumentsServiceApi.getById(e).pipe(r(1))}fiscalizeById(e){return this._returnDocumentsServiceApi.fiscalizeById(e).pipe(r(1))}getPaymentMethodById(e){return this._paymentServiceApi.getPaymentMethodById(e).pipe(r(1))}externalFiscalize(e){return this._returnDocumentsServiceApi.externalFiscalize(e).pipe(r(1))}syncReturnSellDocument(e,n=!1){return this._returnDocumentsServiceApi.syncReturnSellDocument(e,n).pipe(r(1))}delete(e,n=!1){return this._returnDocumentsServiceApi.delete(e,n).pipe(r(1))}static{this.\u0275fac=function(n){return new(n||i)(c(y),c(o))}}static{this.\u0275prov=a({token:i,factory:i.\u0275fac})}}return i})();export{l as a,u as b,M as c};
