import{n as k}from"./chunk-C3XMRR5W.js";import{b as m}from"./chunk-LBB5SFMN.js";import{b as z}from"./chunk-X6G2MEQP.js";import{n as b}from"./chunk-B3CI2H5S.js";import{c as y}from"./chunk-BYOG7O4N.js";import{a as c}from"./chunk-4QCIIFWS.js";import{n as S}from"./chunk-DC6G5OHZ.js";import{a as _}from"./chunk-JUPKAJPM.js";import{i as g}from"./chunk-Z2AWIQRI.js";import{L as e,ia as f,na as n}from"./chunk-C2QKZJOP.js";import{d as p,n as d}from"./chunk-INB5GR2I.js";import{a,b as u}from"./chunk-B7YGBANW.js";d();d();var s=class s{constructor(t){this._http=t,this._defaultFilter={criteria:null,take:100,skip:0,orderBy:"id",isAscending:!0}}bind(t,i){return this._http.post(`/api/fiscalization-settings/${t}/bind`,a({},i))}unbind(t){return this._http.post(`/api/fiscalization-settings/${t}/unbind`,{})}use(t,i){return this._http.post(`/api/fiscalization-settings/${t}/use`,a({},i))}updateToken(t,i){return this._http.post(`/api/fiscalization-settings/${t}/update-token`,{token:i})}getToken(t){return this._http.get(`/api/fiscalization-settings/${t}/get-token`)}getAll(t=this._defaultFilter){let i=u(a({},t),{criteria:{search:null,filter:{storeId:this._retailStoreId}}});return this._http.post("/api/fiscalization-settings/all",a({},i),{headers:_})}};s.\u0275fac=function(i){return new(i||s)(n(g))},s.\u0275prov=f({token:s,factory:s.\u0275fac});var l=s;p([c(y.selectedStoreId)],l.prototype,"_retailStoreId",void 0);var r=class r{constructor(t,i,o){this._fiscalizationSettingsServiceApi=t,this._trinityServiceApi=i,this._store=o}bind(t,i){return this._fiscalizationSettingsServiceApi.bind(t,i).pipe(e(1))}unbind(t){return this._fiscalizationSettingsServiceApi.unbind(t).pipe(e(1))}use(t,i){return this._fiscalizationSettingsServiceApi.use(i,{useFiscalizationSettings:t}).pipe(e(1))}getAll(t){return this._fiscalizationSettingsServiceApi.getAll(t).pipe(e(1))}updateToken(t,i){return this._fiscalizationSettingsServiceApi.updateToken(t,i).pipe(e(1))}getToken(t){return this._fiscalizationSettingsServiceApi.getToken(t).pipe(e(1))}canCashboxWKFiscalize(t){let i=this.cashboxes.find(o=>o.id===t);return i?i.isFiscalized&&i.fiscalizationSettings!=null&&i.fiscalizationSettings.integrationSystem===m.Webkassa&&this.companySettings.simplifiedTaxRegime===!1:!1}canCashboxTrinityFiscalize(t){let i=this.cashboxes.find(o=>o.id===t);return i?i.isFiscalized&&i.fiscalizationSettings!=null&&i.fiscalizationSettings.integrationSystem===m.Trinity&&this.companySettings.simplifiedTaxRegime===!0:!1}};r.\u0275fac=function(i){return new(i||r)(n(l),n(k),n(S))},r.\u0275prov=f({token:r,factory:r.\u0275fac});var h=r;p([c(z.cashboxes)],h.prototype,"cashboxes",void 0);p([c(b.companySettings)],h.prototype,"companySettings",void 0);export{l as a,h as b};
//# sourceMappingURL=chunk-EVZ6YIL4.js.map
