import{C as e,D as t,E as n,M as r,N as i,S as a,_ as o,a as s,b as c,f as l,g as u,h as d,i as f,j as p,m,o as h,p as g,s as _,v,w as y,y as b}from"./index-jy40eMQa.js";import"./admin-CqpMrZ_s.js";import"./types-WIP_Oieg.js";import{t as x}from"./auth-BtSAcF4e.js";var S={class:`header-left`},C={class:`header-right`},w={class:`user-info`},T=h(c({__name:`LayoutView`,setup(i){let c=s(),h=f(),T=x(),E=g(()=>T.user),D=[{path:`/`,title:`仪表盘`,icon:`DataAnalysis`},{path:`/users`,title:`用户管理`,icon:`User`}];async function O(){try{await _.confirm(`确定要退出登录吗？`,`提示`,{confirmButtonText:`确定`,cancelButtonText:`取消`,type:`warning`}),await T.logout(),c.push(`/login`)}catch{}}return(i,s)=>{let c=y(`el-icon`),f=y(`el-menu-item`),g=y(`el-menu`),_=y(`el-aside`),x=y(`el-breadcrumb-item`),T=y(`el-breadcrumb`),k=y(`el-avatar`),A=y(`ArrowDown`),j=y(`SwitchButton`),M=y(`el-dropdown-item`),N=y(`el-dropdown-menu`),P=y(`el-dropdown`),F=y(`el-header`),I=y(`router-view`),L=y(`el-main`),R=y(`el-container`);return a(),d(R,{class:`layout-container`},{default:t(()=>[b(_,{width:`220px`,class:`layout-aside`},{default:t(()=>[s[0]||=m(`div`,{class:`logo`},[m(`span`,null,`📊 管理后台`)],-1),b(g,{"default-active":p(h).path,router:``,class:`aside-menu`,"background-color":`#1a1a2e`,"text-color":`#b0b0b0`,"active-text-color":`#fff`},{default:t(()=>[(a(),o(l,null,e(D,e=>b(f,{key:e.path,index:e.path},{default:t(()=>[b(c,null,{default:t(()=>[(a(),d(n(e.icon)))]),_:2},1024),m(`span`,null,r(e.title),1)]),_:2},1032,[`index`])),64))]),_:1},8,[`default-active`])]),_:1}),b(R,null,{default:t(()=>[b(F,{class:`layout-header`},{default:t(()=>[m(`div`,S,[b(T,{separator:`/`},{default:t(()=>[b(x,{to:{path:`/`}},{default:t(()=>[...s[1]||=[v(`首页`,-1)]]),_:1}),p(h).meta.title?(a(),d(x,{key:0},{default:t(()=>[v(r(p(h).meta.title),1)]),_:1})):u(``,!0)]),_:1})]),m(`div`,C,[b(P,{trigger:`click`,onCommand:O},{dropdown:t(()=>[b(N,null,{default:t(()=>[b(M,{command:`logout`},{default:t(()=>[b(c,null,{default:t(()=>[b(j)]),_:1}),s[2]||=v(` 退出登录 `,-1)]),_:1})]),_:1})]),default:t(()=>[m(`div`,w,[b(k,{size:32},{default:t(()=>[v(r(E.value?.userName?.[0]||`A`),1)]),_:1}),m(`span`,null,r(E.value?.userName||`管理员`),1),b(c,null,{default:t(()=>[b(A)]),_:1})])]),_:1})])]),_:1}),b(L,{class:`layout-main`},{default:t(()=>[b(I)]),_:1})]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-369082cb`]]);export{T as default};