import{_}from"./DomainEntityNav.05a2f50d.js";import{f,n as h,q as y,k as b,s as l,v as m,x as u,y as v,z as g,_ as w,o as R,c as F,a as n,d as N,t as $,b as p,A as x}from"./entry.c7cd0af6.js";import{u as U}from"./object.62d64729.js";import{u as k}from"./api.45358b0b.js";import{i as A}from"./utils.1db1ba01.js";import"./nuxt-link.40687dc5.js";const E=f({async setup(){let e,t;const d=[{name:"General",icon:"fas fa-bars",urlSuffix:""}],a=h(),c=y(),s=b(null);try{s.value=([e,t]=l(()=>k().realm.getOne(c.params.id)),e=await e,t(),e)}catch{throw[e,t]=l(()=>m({path:"/admin/realms"})),await e,t(),u({})}const i=v(),{realmManagement:r}=g(i);if(!A(r.value,s.value.id))throw[e,t]=l(()=>m({path:"/admin/realms"})),await e,t(),u({});return{entity:s,items:d,handleUpdated:o=>{a&&a.success({body:"The realm was successfully updated."}),U(s,o)},handleFailed:o=>{a&&a.warning({body:o.message})}}}},"$PR2RFRhE3G"),P={class:"title no-border mb-3"},T=n("i",{class:"fa-solid fa-building me-1"},null,-1),B=n("span",{class:"sub-title ms-1"},"Details",-1),D={class:"mb-2"};function S(e,t,d,a,c,s){const i=_,r=x;return R(),F("div",null,[n("h1",P,[T,N(" "+$(e.entity.name)+" ",1),B]),n("div",D,[p(i,{path:"/admin/realms/"+e.entity.id,items:e.items,"prev-link":!0},null,8,["path","items"])]),n("div",null,[p(r,{entity:e.entity,onUpdated:e.handleUpdated,onFailed:e.handleFailed},null,8,["entity","onUpdated","onFailed"])])])}const M=w(E,[["render",S]]);export{M as default};
