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