import{u as c}from"./api.31efd825.js";import{x as m,k as d,b as f,y as p,h as e,N as v}from"./entry.83e061d6.js";import"./components.client.581405d2.js";import{d as b}from"./component.13bf56b8.js";import{b as h}from"./enity-nav.b8302727.js";import"./sidebar.vue_vue_type_script_lang.36571436.js";import"./LoginSVG.06b0ff46.js";import"./composables.633e7485.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};
