import{_ as f}from"./DomainEntityNav.b582554d.js";import{f as _,B as h,n as b,k as y,q as l,s as u,v as m,x as v,y as g,_ as x,o as N,c as $,a as o,d as w,t as B,b as p,z as F}from"./entry.cc52a3f2.js";import{u as R}from"./object.62d64729.js";import{u as S}from"./api.8d75df99.js";import{i as U}from"./utils.65cfe9e7.js";import"./nuxt-link.83112a4b.js";const k=_({async setup(){let e,t;const d=[{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"}],s=h(),c=b(),a=y(null);try{a.value=([e,t]=l(()=>S().robot.getOne(c.params.id,{fields:["+secret"]})),e=await e,t(),e)}catch{[e,t]=l(()=>u({path:"/admin/robots"})),await e,t(),m({})}const i=v(),{realmManagement:r}=g(i);return U(r.value,a.value.realm_id)||([e,t]=l(()=>u({path:"/admin/robots"})),await e,t(),m({})),{entity:a,items:d,handleUpdated:n=>{s&&s.success({body:"The robot was successfully updated."}),R(a,n)},handleFailed:n=>{s&&s.warning({body:n.message})}}}},"$m3bphLu3X1"),P={class:"title no-border mb-3"},T=o("i",{class:"fa-solid fa-robot me-1"},null,-1),A=o("span",{class:"sub-title ms-1"},"Details",-1),D={class:"mb-2"};function E(e,t,d,s,c,a){const i=f,r=F;return N(),$("div",null,[o("h1",P,[T,w(" "+B(e.entity.name)+" ",1),A]),o("div",D,[p(i,{path:"/admin/robots/"+e.entity.id,items:e.items,"prev-link":!0},null,8,["path","items"])]),o("div",null,[p(r,{entity:e.entity,onUpdated:e.handleUpdated,onFailed:e.handleFailed},null,8,["entity","onUpdated","onFailed"])])])}const L=x(k,[["render",E]]);export{L as default};
