import{n as _}from"./chunk-5UF3IW32.js";import{b as h}from"./chunk-WLNOQDND.js";import{m as g}from"./chunk-CRYLJ7SE.js";import{b}from"./chunk-IANHTRR4.js";import{c as z}from"./chunk-YZGKFE6P.js";import{a as c}from"./chunk-MKXPJTAW.js";import{m as d}from"./chunk-3VQS547U.js";import{a as y}from"./chunk-YO44C22F.js";import{f as S}from"./chunk-6VC7H3CZ.js";import{K as s,da as l,ja as n}from"./chunk-QMYHTLAJ.js";import{d as a,n as u}from"./chunk-HE7HQ6LI.js";import{a as o,b as m}from"./chunk-K4ALXBGI.js";u();u();var p=class e{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`,o({},i))}unbind(t){return this._http.post(`/api/fiscalization-settings/${t}/unbind`,{})}use(t,i){return this._http.post(`/api/fiscalization-settings/${t}/use`,o({},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=m(o({},t),{criteria:{search:null,filter:{storeId:this._retailStoreId}}});return this._http.post("/api/fiscalization-settings/all",o({},i),{headers:y})}static{this.\u0275fac=function(i){return new(i||e)(n(S))}}static{this.\u0275prov=l({token:e,factory:e.\u0275fac})}};a([c(z.selectedStoreId)],p.prototype,"_retailStoreId",void 0);var f=class e{constructor(t,i,r){this._fiscalizationSettingsServiceApi=t,this._trinityServiceApi=i,this._store=r}bind(t,i){return this._fiscalizationSettingsServiceApi.bind(t,i).pipe(s(1))}unbind(t){return this._fiscalizationSettingsServiceApi.unbind(t).pipe(s(1))}use(t,i){return this._fiscalizationSettingsServiceApi.use(i,{useFiscalizationSettings:t}).pipe(s(1))}getAll(t){return this._fiscalizationSettingsServiceApi.getAll(t).pipe(s(1))}updateToken(t,i){return this._fiscalizationSettingsServiceApi.updateToken(t,i).pipe(s(1))}getToken(t){return this._fiscalizationSettingsServiceApi.getToken(t).pipe(s(1))}canCashboxWKFiscalize(t){let i=this.cashboxes.find(r=>r.id===t);return i?i.isFiscalized&&i.fiscalizationSettings!=null&&i.fiscalizationSettings.integrationSystem===h.Webkassa&&this.companySettings.simplifiedTaxRegime===!1:!1}canCashboxTrinityFiscalize(t){let i=this.cashboxes.find(r=>r.id===t);return i?i.isFiscalized&&i.fiscalizationSettings!=null&&i.fiscalizationSettings.integrationSystem===h.Trinity&&this.companySettings.simplifiedTaxRegime===!0:!1}static{this.\u0275fac=function(i){return new(i||e)(n(p),n(_),n(d))}}static{this.\u0275prov=l({token:e,factory:e.\u0275fac})}};a([c(b.cashboxes)],f.prototype,"cashboxes",void 0);a([c(g.companySettings)],f.prototype,"companySettings",void 0);export{p as a,f as b};
