import{a as f}from"./chunk-NIEFQRZP.js";import{a as h}from"./chunk-6AYVED3B.js";import{a as m}from"./chunk-R4R2IYFG.js";import{a as p}from"./chunk-LANMKLUZ.js";import{K as i,da as u,ja as c}from"./chunk-ZGECHOBP.js";import{b as o,i as d}from"./chunk-QOJKCMZT.js";var l=function(r){return r[r.NoReturn=0]="NoReturn",r[r.Full=1]="Full",r[r.Partial=2]="Partial",r}(l||{});d();var a=class r{constructor(e,t){this._sellDocumentsServiceApi=e,this._paymentServiceApi=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 l.NoReturn:return"\u041D\u0435\u0442";case l.Full:return"\u041F\u043E\u043B\u043D\u044B\u0439";case l.Partial:return"\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u044B\u0439";default:return""}}getPaymentTypeName(e,t){if(!e?.length)return null;let s=e.includes(1),n=e.includes(2);switch(!0){case(s&&n&&t!=null||n&&t!=null):return"\u0421\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439 (\u0414\u043E\u043B\u0433)";case(s&&t!=null):return"\u041D\u0430\u043B\u0438\u0447\u043D\u044B\u0439 (\u0414\u043E\u043B\u0433)";case(s&&n):return"\u0421\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439";case s: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?"\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F":this.prices.find(t=>t.id===e)?.name??"\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F"}syncSellDocument(e,t=!1){return this._sellDocumentsServiceApi.syncSellDocument(e,t).pipe(i(1))}delete(e,t=!1){return this._sellDocumentsServiceApi.delete(e,t).pipe(i(1))}static{this.\u0275fac=function(t){return new(t||r)(c(f),c(h))}}static{this.\u0275prov=u({token:r,factory:r.\u0275fac})}};o([p(m.prices)],a.prototype,"prices",void 0);export{l as a,a as b};
