import{u as m}from"./sidebar.vue_vue_type_script_lang.a371e2e8.js";import{m as f,k as c,b as d,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 R=v({async setup(){const n=[{name:"General",icon:"fas fa-bars",urlSuffix:""},{name:"Users",icon:"fas fa-user",urlSuffix:"users"},{name:"Robots",icon:"fas fa-robot",urlSuffix:"robots"},{name:"Roles",icon:"fas fa-user-group",urlSuffix:"roles"}],i=f(),r=c(),e=d(null);try{e.value=await m().permission.getOne(r.params.id)}catch{return p({path:"/admin/permissions"})}const u=a=>{i.success("The permission 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.id,s("span",{class:"sub-title ms-1"},["Details"])]),s("div",{class:"mb-2"},[h(`/admin/permissions/${e.value.id}`,n,{prevLink:!0})]),s("div",[s(b,{onUpdated:u,onFailed:l,entity:e.value})])])}});export{R as default};
