import{u as c}from"./api.160776dd.js";import{a as d,j as f,k as p,b as v,l as r,m as b,s as h,h as e,N as g}from"./entry.e097670d.js";import{i as x}from"./utils.c307b373.js";/* empty css                    */import{b as y}from"./enity-nav.bde0d636.js";import{u as N}from"./object.62d64729.js";import"./nuxt-link.1a4e25e4.js";const j=d({async setup(){const o=[{name:"General",icon:"fas fa-bars",urlSuffix:""},{name:"Permissions",icon:"fas fa-user-secret",urlSuffix:"permissions"},{name:"Users",icon:"fas fa-users",urlSuffix:"users"}],t=f(),i=p(),s=v(null);try{s.value=await c().role.getOne(i.params.id)}catch{return r({path:"/admin/roles"})}const n=b(),{realmManagement:u}=h(n);if(!x(u.value,s.value.realm_id))return r({path:"/admin/roles"});const l=a=>{t.success("The role was successfully updated."),N(s,a)},m=a=>{t.warning(a.message)};return()=>e("div",[e("h1",{class:"title no-border mb-3"},[e("i",{class:"fa-solid fa-user-group me-1"}),s.value.name,e("span",{class:"sub-title ms-1"},["Details"])]),e("div",{class:"mb-2"},[y(`/admin/roles/${s.value.id}`,o,{prevLink:!0})]),e("div",[e(g,{onUpdated:l,onFailed:m,entity:s.value})])])}});export{j as default};
