import{u as c}from"./object.62d64729.js";import{u as d}from"./api.160776dd.js";import{a as p,j as f,k as v,b as h,l as o,m as b,s as g,h as e,N as y}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 k=p({async setup(){const i=[{name:"General",icon:"fas fa-bars",urlSuffix:""},{name:"Clients",icon:"fa-solid fa-ghost",urlSuffix:"/clients"}],t=f(),n=v(),s=h(null);try{s.value=await d().scope.getOne(n.params.id)}catch{return o({path:"/admin/scopes"})}const r=b(),{realmManagement:u}=g(r);if(!x(u.value,s.value.realm_id))return o({path:"/admin/scopes"});const l=a=>{t.success("The scope was successfully updated."),c(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-ghost me-1"}),s.value.name,e("span",{class:"sub-title ms-1"},["Details"])]),e("div",{class:"mb-2"},[N(`/admin/scopes/${s.value.id}`,i,{prevLink:!0})]),e("div",[e(y,{onUpdated:l,onFailed:m,entity:s.value})])])}});export{k as default};
