import{u as m}from"./sidebar.vue_vue_type_script_lang.a371e2e8.js";import{m as c,k as d,b as f,p,h as s,N as b}from"./entry.731fa101.js";import"./components.client.e8e3e180.js";import{d as v}from"./component.6c997487.js";import{b as h}from"./enity-nav.3debeb1d.js";import"./LoginSVG.150727e9.js";import"./composables.3f41d4a8.js";const S=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"},[h(`/admin/robots/${e.value.id}`,r,{prevLink:!0})]),s("div",[s(b,{onUpdated:u,onFailed:l,entity:e.value})])])}});export{S as default};
