import{d as m,u as h,U as f,G as v,w as u,o as n,c as i,F as _,j as g,a as r,k,v as b,t as x}from"../index.js";async function j(o){const a=o.currentRoute.value.path,c=a.substring(1).split("/");c.pop();const t="/"+c.join("/");console.info(`Navigating from child '${a}' to parent '${t}'`),await o.push({path:t})}const P={class:"list-group"},B={class:"ml-2 align-items-center"},U=["onUpdate:modelValue"],y={for:"permissionCheckBox",class:"form-check-label"},M=m({__name:"PermissionList",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(o){const a=h(o,"modelValue"),c=Object.values(f),t=v(c.map(d));function d(e){return{value:e,selected:!1}}return u(a,e=>{t.forEach(s=>{s.selected=(e==null?void 0:e.includes(s.value))??!1})}),u(t,e=>{a.value=e.filter(s=>s.selected).map(s=>s.value)}),(e,s)=>(n(),i("ul",P,[(n(!0),i(_,null,g(t,l=>(n(),i("li",{key:l.value,class:"list-group-item"},[r("div",B,[k(r("input",{id:"permissionCheckBox",type:"checkbox","onUpdate:modelValue":p=>l.selected=p,class:"form-check-input"},null,8,U),[[b,l.selected]]),r("label",y,x(l.value),1)])]))),128))]))}});export{M as _,j as n};
