import{a as f}from"./chunk-M3XF2CJP.js";import{a as h}from"./chunk-TRRDA45L.js";import{a as m}from"./chunk-KH7NNLDD.js";import{a as p}from"./chunk-B7E4YH53.js";import{J as i,ca as u,ia as c}from"./chunk-3FIHWXA5.js";import{b as o,i as d}from"./chunk-QOJKCMZT.js";var l=function(t){return t[t.NoReturn=0]="NoReturn",t[t.Full=1]="Full",t[t.Partial=2]="Partial",t}(l||{});d();var a=class t{constructor(e,r){this._sellDocumentsServiceApi=e,this._paymentServiceApi=r,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,r){if(!e?.length)return null;let s=e.includes(1),n=e.includes(2);switch(!0){case(s&&n&&r!=null||n&&r!=null):return"\u0421\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439 (\u0414\u043E\u043B\u0433)";case(s&&r!=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(r=>r.id===e)?.name??"\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F"}syncSellDocument(e){return this._sellDocumentsServiceApi.syncSellDocument(e).pipe(i(1))}delete(e,r=!1){return this._sellDocumentsServiceApi.delete(e,r).pipe(i(1))}static{this.\u0275fac=function(r){return new(r||t)(c(f),c(h))}}static{this.\u0275prov=u({token:t,factory:t.\u0275fac})}};o([p(m.prices)],a.prototype,"prices",void 0);export{l as a,a as b};
