import{n as _}from"./chunk-VFLXIGOL.js";import{b as m}from"./chunk-LBB5SFMN.js";import{n as b}from"./chunk-YICJB6GR.js";import{b as y}from"./chunk-TTT4O4HK.js";import{c as z}from"./chunk-VJXA7ZH3.js";import{a as k}from"./chunk-P5XIDEFS.js";import{a as c}from"./chunk-Y75MWVBQ.js";import{o as S}from"./chunk-GW2OL5S3.js";import{i as g}from"./chunk-CO3WTSA4.js";import{I as e,ea as f,ja as r}from"./chunk-DYUFV4HF.js";import{d as p,n as d}from"./chunk-INB5GR2I.js";import{a as o,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`,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=u(o({},t),{criteria:{search:null,filter:{storeId:this._retailStoreId}}});return this._http.post("/api/fiscalization-settings/all",o({},i),{headers:k})}};s.\u0275fac=function(i){return new(i||s)(r(g))},s.\u0275prov=f({token:s,factory:s.\u0275fac});var l=s;p([c(z.selectedStoreId)],l.prototype,"_retailStoreId",void 0);var n=class n{constructor(t,i,a){this._fiscalizationSettingsServiceApi=t,this._trinityServiceApi=i,this._store=a}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(a=>a.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(a=>a.id===t);return i?i.isFiscalized&&i.fiscalizationSettings!=null&&i.fiscalizationSettings.integrationSystem===m.Trinity&&this.companySettings.simplifiedTaxRegime===!0:!1}hasWebkassaIntegration(){return this.cashboxes.some(t=>t.isFiscalized&&t.fiscalizationSettings!=null&&t.fiscalizationSettings?.integrationSystem===m.Webkassa)}};n.\u0275fac=function(i){return new(i||n)(r(l),r(_),r(S))},n.\u0275prov=f({token:n,factory:n.\u0275fac});var h=n;p([c(y.cashboxes)],h.prototype,"cashboxes",void 0);p([c(b.companySettings)],h.prototype,"companySettings",void 0);export{l as a,h as b};
//# sourceMappingURL=chunk-Z3IONLDX.js.map
