import{u as m}from"./api.31efd825.js";import{x as c,k as d,b as f,y as p,h as s,N as v}from"./entry.83e061d6.js";import"./components.client.581405d2.js";import{d as b}from"./component.13bf56b8.js";import{b as y}from"./enity-nav.b8302727.js";import"./sidebar.vue_vue_type_script_lang.36571436.js";import"./LoginSVG.06b0ff46.js";import"./composables.633e7485.js";const T=b({async setup(){const r=[{name:"General",icon:"fas fa-bars",urlSuffix:""},{name:"Permissions",icon:"fas fa-user-secret",urlSuffix:"permissions"},{name:"Users",icon:"fas fa-users",urlSuffix:"users"}],o=c(),n=d(),e=f(null);try{e.value=await m().role.getOne(n.params.id)}catch{return p({path:"/admin/roles"})}const u=a=>{o.success("The role was successfully updated.");const i=Object.keys(a);for(let t=0;t<i.length;t++)e.value[i[t]]=a[i[t]]},l=a=>{o.warning(a.message)};return()=>s("div",[s("h1",{class:"title no-border mb-3"},[s("i",{class:"fa-solid fa-user-group me-1"}),e.value.name,s("span",{class:"sub-title ms-1"},["Details"])]),s("div",{class:"mb-2"},[y(`/admin/roles/${e.value.id}`,r,{prevLink:!0})]),s("div",[s(v,{onUpdated:u,onFailed:l,entity:e.value})])])}});export{T as default};
