import{d as v}from"./chunk-NP3DX5RH.js";import{Pc as h,U as r,V as l,X as i,Yf as m,_b as f,aa as d,ac as p,of as M,pf as n}from"./chunk-LPALGY4Q.js";var I=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=d({type:e})}static{this.\u0275inj=l({imports:[f]})}}return e})();var g=(()=>{class e{constructor(t){this.restService=t}getModulesForBussinesUnit(t){let o=new p;return o=o.append("businessUnitID",t),this.restService.get(h.MODULES,o)}static{this.\u0275fac=function(o){return new(o||e)(i(v))}}static{this.\u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var j=(()=>{class e{constructor(t){this.modulesService=t}getModulesForBussinesUnit(t){return this.modulesService.getModulesForBussinesUnit(t)}static{this.\u0275fac=function(o){return new(o||e)(i(g))}}static{this.\u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var u=(()=>{class e{constructor(t){this.modulesFacade=t}loadModules(t){return n.isNullOrUndefined(this.modulesList)?new Promise((o,c)=>{this.modulesFacade.getModulesForBussinesUnit(t).subscribe({next:s=>{this.modulesList=s,o(s)},error:s=>{c(s)}})}):this.modulesList}hasModule(t){if(n.isNullOrUndefined(this.modulesList))return!1;let o=this.modulesList.find(c=>c.name===t);return!n.isNullOrUndefined(o)&&m.fromNumberToDate(o.expireDate)>m.getCurrentDateNoTime()}clearModulesList(){this.modulesList=null}static{this.\u0275fac=function(o){return new(o||e)(i(j))}}static{this.\u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var S=(()=>{class e{constructor(t){this.modulesManager=t}resolve(){return this.modulesManager.loadModules(M.getBusinessUnit().id)}static{this.\u0275fac=function(o){return new(o||e)(i(u))}}static{this.\u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{u as a,S as b,I as c};
