import{i as E,n as I,E as P}from"./index.ae7ce77b.js";import{d as y,al as T,ao as W,Q as x,k as _,j as M,as as R,w as V,a9 as r,o as i,E as m,G as s,c as C,F as k,a0 as $,M as p,a as d,L as f,u as q,a2 as O,W as j,an as F}from"./vue.6daa721c.js";import"./elementPlus.346c766a.js";import"./echarts.72dc8373.js";const H=y({name:"navMenuVertical"}),J=y({...H,props:{menuList:{type:Array,default:()=>[]}},setup(g){const L=F(()=>I(()=>import("./subItem.ef2c342e.js"),["assets/subItem.ef2c342e.js","assets/vue.6daa721c.js","assets/index.ae7ce77b.js","assets/elementPlus.346c766a.js","assets/echarts.72dc8373.js","assets/index.a2a4e7ac.css"])),A=g,b=E(),{themeConfig:o}=T(b),l=W(),a=x({defaultActive:l.meta.isDynamic?l.meta.isDynamicPath:l.path,isCollapse:!1}),v=_(()=>A.menuList),D=_(()=>o.value),h=n=>{const{path:c,meta:t}=n,u=t!=null&&t.isDynamic?t.isDynamicPath.split("/"):c.split("/");return u.length>=4&&(t!=null&&t.isHide)?u.splice(0,3).join("/"):c},S=n=>{P.handleOpenLink(n)};return M(()=>{a.defaultActive=h(l)}),R(n=>{a.defaultActive=h(n),document.body.clientWidth<1e3&&(o.value.isCollapse=!1)}),V(o.value,()=>{document.body.clientWidth<=1e3?a.isCollapse=!1:a.isCollapse=o.value.isCollapse},{immediate:!0}),(n,c)=>{const t=r("SvgIcon"),u=r("el-sub-menu"),w=r("el-menu-item"),B=r("el-menu");return i(),m(B,{router:"","default-active":a.defaultActive,"background-color":"transparent",collapse:a.isCollapse,"unique-opened":D.value.isUniqueOpened,"collapse-transition":!1,class:"font-medium"},{default:s(()=>[(i(!0),C(k,null,$(v.value,e=>(i(),C(k,null,[e.children&&e.children.length>0?(i(),m(u,{index:e.path,key:e.path},{title:s(()=>[p(t,{name:e.meta.icon},null,8,["name"]),d("span",null,f(n.$t(e.meta.title)),1)]),default:s(()=>[p(q(L),{chil:e.children},null,8,["chil"])]),_:2},1032,["index"])):(i(),m(w,{style:{color:"#eaeaea"},index:e.path,key:e.path},O({default:s(()=>[p(t,{name:e.meta.icon},null,8,["name"])]),_:2},[!e.meta.isLink||e.meta.isLink&&e.meta.isIframe?{name:"title",fn:s(()=>[d("span",null,f(n.$t(e.meta.title)),1)]),key:"0"}:{name:"title",fn:s(()=>[d("a",{class:"w100",onClick:j(N=>S(e),["prevent"])},f(n.$t(e.meta.title)),9,["onClick"])]),key:"1"}]),1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse","unique-opened"])}}});export{J as default};
