import{u as c}from"./api.9517b989.js";import{x as m,k as d,b as f,y as p,h as e,N as v}from"./entry.30e55a5e.js";import"./components.client.df015f1b.js";import{d as b}from"./component.bb17d696.js";import{b as h}from"./enity-nav.0b568374.js";import"./sidebar.vue_vue_type_script_lang.1e604465.js";import"./LoginSVG.e12a909b.js";import"./composables.a8da7a35.js";const U=b({async setup(){const o=[{name:"General",icon:"fas fa-bars",urlSuffix:""},{name:"Scopes",icon:"fa-solid fa-meteor",urlSuffix:"/scopes"},{name:"URL",icon:"fa-solid fa-link",urlSuffix:"/url"}],n=m(),l=d(),s=f(null);try{s.value=await c().client.getOne(l.params.id,{fields:["+secret"]})}catch{return p({path:"/admin/clients"})}const r=a=>{n.success("The client was successfully updated.");const i=Object.keys(a);for(let t=0;t<i.length;t++)s.value[i[t]]=a[i[t]]},u=a=>{n.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"},[h(`/admin/clients/${s.value.id}`,o,{prevLink:!0})]),e("div",[e(v,{onUpdated:r,onFailed:u,entity:s.value})])])}});export{U as default};
