import{p as u}from"./chunk-UET2LJ27.js";import{S as a,V as o,tc as c}from"./chunk-YEIQIJLV.js";var l=(()=>{class t{constructor(i,s){this.store=i,this.router=s}canActivate(i,s){let n=this.store.selectSnapshot(e=>e.account).permissions?.map(e=>e?.name),r=i.data?.permission;return!r||!Array.isArray(r)&&n?.includes(r)||Array.isArray(r)&&r?.length&&r.every(e=>n?.includes(e))?!0:(this.router.navigate(["/error/403"]),!1)}static{this.\u0275fac=function(s){return new(s||t)(o(u),o(c))}}static{this.\u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{l as a};
