import{u as l}from"./object.62d64729.js";import{u as f}from"./api.4ad3383d.js";import{y as d,u as c,t as v}from"./auth.8c936e9a.js";import{i as b}from"./utils.2e24de1e.js";import{u as h}from"./entry.0b5898f4.js";import{l as g,n as a}from"./nuxt-link.a91ddf68.js";import"./app.config.5ff5ca90.js";import"./components.client.8c0e2f0e.js";import{b as y}from"./enity-nav.95a7d016.js";import x from"./page.16487999.js";import{r as R,h as e}from"./runtime-core.esm-bundler.24b58585.js";import"./composables.050e3231.js";import"./utils.61cc85c6.js";import"./layout.1eaf47bc.js";import"./_plugin-vue_export-helper.c27b6911.js";import"./header.vue.a5725157.js";import"./sidebar.vue.f4078c43.js";import"./AccountSVG.3eaa8808.js";import"./LoginSVG.52eb3125.js";/* empty css                    */import"./nuxt-error-boundary.eaaf5a22.js";import"./client-only.eb4a3450.js";import"./dev-only.ae8b1c36.js";import"./server-placeholder.93f5b750.js";import"./nuxt-loading-indicator.65caef1d.js";import"./components.da5780c2.js";const K=d({async setup(){const o=[{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"}],r=h(),i=g(),s=R(null);try{s.value=await f().user.getOne(i.params.id,{fields:["+email"]})}catch{return a({path:"/admin/users"})}const m=c(),{realmManagement:u}=v(m);if(!b(u.value,s.value.realm_id))return a({path:"/admin/users"});const n=t=>{r.success("The user was successfully updated."),l(s,t)},p=t=>{r.warning(t.message)};return()=>e("div",[e("h1",{class:"title no-border mb-3"},[e("i",{class:"fa fa-user me-1"}),s.value.name,e("span",{class:"sub-title ms-1"},["Details"])]),e("div",{class:"mb-2"},[y(`/admin/users/${s.value.id}`,o,{prevLink:!0})]),e("div",[e(x,{onUpdated:n,onFailed:p,entity:s.value})])])}});export{K as default};
