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