import{a as n}from"./chunk-C72E7DYO.js";import{S as s,X as m,q as r}from"./chunk-56X5LYJH.js";var p=class t{constructor(o){this.api=o}loadPermissionsAsAccordion(){return this.api.Get("role").pipe(r(o=>o.data.map(i=>({type:"accordion",controlName:"",title:i.name,fields:[{type:"checkbox",controlName:"permissions_ids",title:"",options:i.permissions.map(e=>({id:e.id,name:e.name})),validators:[]}]}))))}loadPermissionsAsAccordionWithID(o){return this.api.Get("role").pipe(r(i=>i.data.filter(e=>e.id===o).map(e=>({type:"accordion",controlName:"",title:e.name,fields:[{type:"checkbox",controlName:"permissions_ids",title:"",options:e.permissions.map(a=>({id:a.id,name:a.name})),validators:[]}]}))))}static \u0275fac=function(i){return new(i||t)(m(n))};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{p as a};
