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