var $=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var V=(e,r)=>{var s={};for(var a in e)C.call(e,a)&&r.indexOf(a)<0&&(s[a]=e[a]);if(e!=null&&$)for(var a of $(e))r.indexOf(a)<0&&I.call(e,a)&&(s[a]=e[a]);return s};import{_ as T}from"./base-setting.vue_vue_type_script_setup_true_lang-CegSlQnN.js";import{_ as N}from"./notification-setting.vue_vue_type_script_setup_true_lang-DfeTBgzI.js";import{_ as P}from"./password-setting.vue_vue_type_script_setup_true_lang-Ha-3OFvm.js";import{_ as S}from"./security-setting.vue_vue_type_script_setup_true_lang-R4QAfduw.js";import{a1 as p,ap as k,aj as o,al as v,aR as j,a9 as t,aS as B,E as U,ai as n,ag as z,ak as l,aW as F,aX as M,az as m,p as d,Z as q,ay as b,F as E,aq as L,ax as A,L as h,an as _}from"../jse/index-index-BUJ_4tQs.js";import{_ as D}from"./page.vue_vue_type_script_setup_true_lang-Ba8GDlNd.js";import{T as R,_ as W,a as X,b as Z}from"./avatar.vue_vue_type_script_setup_true_lang-DrlZIc82.js";import{_ as G}from"./Separator.vue_vue_type_script_setup_true_lang-V0MBJaAb.js";import{bq as H,bV as J}from"./bootstrap-Bqxdt4iG.js";import"./Switch.vue_vue_type_script_setup_true_lang-Bq9OHPJn.js";const w=p({__name:"Card",props:{class:{}},setup(e){const r=e;return(s,a)=>(o(),k("div",{class:j(t(B)("rounded-xl border border-border bg-card text-card-foreground",r.class))},[v(s.$slots,"default")],2))}}),K=p({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const r=e,s=U(()=>{const i=r,{class:c}=i;return V(i,["class"])}),a=H(s);return(c,u)=>(o(),n(t(R),z(t(a),{class:t(B)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",r.class)}),{default:l(()=>[v(c.$slots,"default")]),_:3},16,["class"]))}}),O={class:"flex h-full w-full"},Q={class:"mt-4 flex h-40 flex-col items-center justify-center gap-4"},Y={class:"text-lg font-semibold"},ee={class:"text-foreground/80 text-sm"},ae=p({name:"ProfileUI",__name:"profile",props:F({title:{default:"关于项目"},userInfo:{},tabs:{default:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=M(e,"modelValue");return(s,a)=>(o(),n(t(D),{"auto-content-height":""},{default:l(()=>[m("div",O,[d(t(w),{class:"w-1/6 flex-none"},{default:l(()=>{var c,u,i,g,x,y;return[m("div",Q,[d(t(W),{src:(u=(c=e.userInfo)==null?void 0:c.avatar)!=null?u:t(q).app.defaultAvatar,class:"size-20"},null,8,["src"]),m("span",Y,b((g=(i=e.userInfo)==null?void 0:i.realName)!=null?g:""),1),m("span",ee,b((y=(x=e.userInfo)==null?void 0:x.username)!=null?y:""),1)]),d(t(G),{class:"my-4"}),d(t(X),{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=f=>r.value=f),orientation:"vertical",class:"m-4"},{default:l(()=>[d(t(Z),{class:"bg-card grid w-full grid-cols-1"},{default:l(()=>[(o(!0),k(E,null,L(e.tabs,f=>(o(),n(t(K),{key:f.value,value:f.value,class:"data-[state=active]:bg-primary data-[state=active]:text-primary-foreground h-12 justify-start"},{default:l(()=>[A(b(f.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"])]}),_:1}),d(t(w),{class:"ml-4 w-5/6 flex-auto p-8"},{default:l(()=>[v(s.$slots,"content")]),_:3})])]),_:3}))}}),me=p({__name:"index",setup(e){const r=J(),s=h("basic"),a=h([{label:"基本设置",value:"basic"},{label:"安全设置",value:"security"},{label:"修改密码",value:"password"},{label:"新消息提醒",value:"notice"}]);return(c,u)=>(o(),n(t(ae),{"model-value":s.value,"onUpdate:modelValue":u[0]||(u[0]=i=>s.value=i),title:"个人中心","user-info":t(r).userInfo,tabs:a.value},{content:l(()=>[s.value==="basic"?(o(),n(T,{key:0})):_("",!0),s.value==="security"?(o(),n(S,{key:1})):_("",!0),s.value==="password"?(o(),n(P,{key:2})):_("",!0),s.value==="notice"?(o(),n(N,{key:3})):_("",!0)]),_:1},8,["model-value","user-info","tabs"]))}});export{me as default};
