import{h as B,e as I,B as w,f as b,n as N,c as f,o as n,a as s,v as r,I as p,b as c,w as o,d,t,g as e,L as V}from"./BzhixHsn.js";import{_ as A,a as T}from"./CRjpF7qy.js";import{_ as D,a as E}from"./DfqdNhl2.js";import{_ as H}from"./Di_95mgX.js";import{u as L}from"./G5O1m7ek.js";import"./BmLyE0U0.js";import"./CMS48I6h.js";const P={class:"container mx-auto space-y-6 py-6"},R={class:"flex items-center gap-4"},S={class:"text-3xl font-bold"},U={class:"grid grid-cols-2 gap-4 md:grid-cols-4"},j={class:"text-muted-foreground text-sm"},q={class:"font-medium"},z={class:"text-muted-foreground text-sm"},F={class:"font-medium"},G={class:"text-muted-foreground text-sm"},J={class:"mt-1 flex gap-2"},K={class:"text-muted-foreground text-sm"},M={class:"mt-1"},O={key:1,class:"text-muted-foreground"},ie=B({__name:"[id]",async setup(Q){let _,m;const{t:a}=I(),v=w().params.id,{data:i,refresh:X}=([_,m]=b(()=>L(`/v1/admin/users/${v}`)),_=await _,m(),_);return(g,u)=>{const h=N("Icon"),x=V,k=E,y=D,l=H,C=A,$=T;return n(),f("div",P,[s("div",R,[c(x,{variant:"outline",onClick:u[0]||(u[0]=Y=>g.$router.back())},{default:o(()=>[c(h,{name:"lucide:arrow-left",class:"mr-2 h-4 w-4"}),d(" "+t(e(a)("common.back")),1)]),_:1}),s("h1",S,t(e(a)("admin.pages.users.detail.title")),1)]),e(i)?(n(),r($,{key:0},{default:o(()=>[c(y,null,{default:o(()=>[c(k,null,{default:o(()=>[d(t(e(a)("admin.pages.users.detail.basicInfo")),1)]),_:1})]),_:1}),c(C,null,{default:o(()=>[s("div",U,[s("div",null,[s("div",j,t(e(a)("admin.pages.users.detail.email")),1),s("div",q,t(e(i).email),1)]),s("div",null,[s("div",z,t(e(a)("admin.pages.users.detail.name")),1),s("div",F,t(e(i).name||"-"),1)]),s("div",null,[s("div",G,t(e(a)("admin.pages.users.detail.status")),1),s("div",J,[e(i).is_active?(n(),r(l,{key:0,variant:"default"},{default:o(()=>[d(t(e(a)("admin.pages.users.detail.active")),1)]),_:1})):(n(),r(l,{key:1,variant:"secondary"},{default:o(()=>[d(t(e(a)("admin.pages.users.detail.inactive")),1)]),_:1})),e(i).is_verified?(n(),r(l,{key:2,variant:"default"},{default:o(()=>[d(t(e(a)("admin.pages.users.detail.verified")),1)]),_:1})):p("",!0)])]),s("div",null,[s("div",K,t(e(a)("admin.pages.users.detail.role")),1),s("div",M,[e(i).is_superuser?(n(),r(l,{key:0,variant:"destructive"},{default:o(()=>[d(t(e(a)("admin.pages.users.detail.admin")),1)]),_:1})):(n(),f("span",O,t(e(a)("admin.pages.users.detail.user")),1))])])])]),_:1})]),_:1})):p("",!0)])}}});export{ie as default};
