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