text: "use strict";(self.webpackChunksolidapp=self.webpackChunksolidapp||[]).push([[5171],{5171:(D,l,a)=>{a.r(l),a.d(l,{PermissionsModule:()=>U,createTranslateLoader:()=>v});var P=a(9808),d=a(520),S=a(2155),p=a(3075),i=a(1062),y=a(40),m=a(3918),c=a(7006),I=a(3583),h=a(900),u=a(9291),r=a(7618),t=a(5e3),f=a(2329);let E=(()=>{class e{constructor(s){this.permissionService=s}}return e.\u0275fac=function(s){return new(s||e)(t.Y36(f.$))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-permission-edit"]],decls:2,vars:0,template:function(s,n){1&s&&(t.TgZ(0,"p"),t._uU(1,"permission-edit works!"),t.qZA())},styles:[""]}),e})(),M=(()=>{class e{constructor(){}}return e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-permission-new"]],decls:2,vars:0,template:function(s,n){1&s&&(t.TgZ(0,"p"),t._uU(1,"permission-new works!"),t.qZA())},styles:[""]}),e})();var g=a(2340);let T=(()=>{class e{constructor(s){this.http=s}getAll(){return this.http.get(`${g.N.apiEndpoint}/metadata/permissions?additional_fields=name%2Cparent_id`)}}return e.\u0275fac=function(s){return new(s||e)(t.LFG(d.eN))},e.\u0275prov=t.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var N=a(291),C=a(722),A=a(4763),L=a(4833),R=a(7093);const F=[{canActivate:[r.a],path:"",component:(()=>{class e{constructor(s,n){this.permissionService=s,this.dataService=n,this.dataLoaded=!1,this.parentProp="name",this.childProp="parent_id",this.displayLabel="display_name",this.isItemSelectable=!1,this.isEditable=!1,this.hasMenuIcon=!0,this.hasMultipleSelection=!1,this.savedMenuItem={},this.isItemSelected=!1,this.showNew=!1,this.showEdit=!1}ngOnInit(){this.dataLoaded=!1,this.dataService.getAll().subscribe({next:s=>{this.data=s,this.dataLoaded=!0},error:s=>{this.dataLoaded=!0}})}}return e.\u0275fac=function(s){return new(s||e)(t.Y36(f.$),t.Y36(T))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-permissions"]],decls:5,vars:11,consts:[[3,"title"],["fxFlexFill","",3,"dataLoaded","parentProperty","childProperty","displayLabel","treedata","isItemSelectable","hasIcon","hasMultipleSelection"]],template:function(s,n){1&s&&(t.TgZ(0,"app-page"),t._UZ(1,"app-page-header",0),t.ALo(2,"translate"),t.TgZ(3,"app-page-body"),t._UZ(4,"app-shared-tree",1),t.qZA(),t.qZA()),2&s&&(t.xp6(1),t.Q6J("title",t.lcZ(2,9,"PERMISSIONS.PAGE-TITLE")),t.xp6(3),t.Q6J("dataLoaded",n.dataLoaded)("parentProperty",n.parentProp)("childProperty",n.childProp)("displayLabel",n.displayLabel)("treedata",n.data)("isItemSelectable",n.isItemSelectable)("hasIcon",n.hasMenuIcon)("hasMultipleSelection",n.hasMultipleSelection))},directives:[N.I,C.q,A.H,L.q,R.s9],pipes:[i.X$],styles:[""]}),e})(),data:{breadcrumb:"MENU.USER-MGMT.PERMISSION",permission_code:"PERMISSION-READ"}},{canActivate:[r.a],path:"new",component:M,data:{breadcrumb:"BUTTON.NEW",permission_code:"PERMISSION-CREATE"}},{canActivate:[r.a],path:"edit/:id",component:E,data:{breadcrumb:"BUTTON.EDIT",permission_code:"PERMISSION-UPDATE||PERMISSION-READ||PERMISSION-DELETE"}}];let O=(()=>{class e{}return e.\u0275fac=function(s){return new(s||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[u.Bz.forChild(F)],u.Bz]}),e})();function v(e){return new y.w(e,"assets/i18n/",".json")}let U=(()=>{class e{}return e.\u0275fac=function(s){return new(s||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[P.ez,O,m.hx,h.m,c.q,S.o9,i.aw.forChild({loader:{provide:i.Zw,useFactory:v,deps:[d.eN]},isolate:!0}),c.q,p.UX,p.u5,h.m,I._,m.hx]]}),e})()}}]);