import{_}from"./BPigo5_n.js";import{f,g as h,r as y,h as l,n as m,i as u,j as b,s as v,_ as g,o as w,c as R,a as n,d as F,t as N,b as p,k as $}from"./qGWCsquX.js";import{u as T}from"./koeG6dC5.js";import{u as U}from"./CvqZkrWf.js";import{u as k}from"./DjfSO2bY.js";import{i as x}from"./D2p94zMK.js";import"./BNEsDCLV.js";const E=f({async setup(){let e,t;const d=[{name:"General",icon:"fas fa-bars",urlSuffix:""}],a=k(),c=h(),s=y(null);try{s.value=([e,t]=l(()=>U().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=b(),{realmManagement:r}=v(i);if(!x(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.show({variant:"success",body:"The realm was successfully updated."}),T(s,o)},handleFailed:o=>{a&&a.show({variant:"warning",body:o.message})}}}},"$PR2RFRhE3G"),P={class:"title no-border mb-3"},A=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=$;return w(),R("div",null,[n("h1",P,[A,F(" "+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 z=g(E,[["render",S]]);export{z as default};
