const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/subItem.B4BgFwlw.js","assets/vue.BxlDVA1H.js","assets/index.lP_uh0LI.js","assets/index.TG7KVPIy.css"])))=>i.map(i=>d[i]);
import{u as I,_ as P,$ as R}from"./index.lP_uh0LI.js";import{d as g,N as T,R as $,r as x,c as _,o as V,X as W,m as q,b as r,h as m,f as i,w as a,e as C,F as k,k as E,g as p,u as M,Q as N,s as d,A as f,Y as O,Z as F}from"./vue.BxlDVA1H.js";const H=["onClick"],U=g({name:"navMenuVertical"}),Y=g({...U,props:{menuList:{type:Array,default:()=>[]}},setup(y){const A=N(()=>P(()=>import("./subItem.B4BgFwlw.js"),__vite__mapDeps([0,1,2,3]))),L=y,b=I(),{themeConfig:o}=T(b),l=$(),s=x({defaultActive:l.meta.isDynamic?l.meta.isDynamicPath:l.path,isCollapse:!1}),v=_(()=>L.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=>{R.handleOpenLink(n)};return V(()=>{s.defaultActive=h(l)}),W(n=>{s.defaultActive=h(n),document.body.clientWidth<1e3&&(o.value.isCollapse=!1)}),q(o.value,()=>{document.body.clientWidth<=1e3?s.isCollapse=!1:s.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":s.defaultActive,"background-color":"transparent",collapse:s.isCollapse,"unique-opened":D.value.isUniqueOpened,"collapse-transition":!1},{default:a(()=>[(i(!0),C(k,null,E(v.value,e=>(i(),C(k,null,[e.children&&e.children.length>0?(i(),m(u,{index:e.path,key:e.path},{title:a(()=>[p(t,{name:e.meta.icon},null,8,["name"]),d("span",null,f(n.$t(e.meta.title)),1)]),default:a(()=>[p(M(A),{chil:e.children},null,8,["chil"])]),_:2},1032,["index"])):(i(),m(w,{index:e.path,key:e.path},O({default:a(()=>[p(t,{name:e.meta.icon},null,8,["name"])]),_:2},[!e.meta.isLink||e.meta.isLink&&e.meta.isIframe?{name:"title",fn:a(()=>[d("span",null,f(n.$t(e.meta.title)),1)]),key:"0"}:{name:"title",fn:a(()=>[d("a",{class:"w100",onClick:F(j=>S(e),["prevent"])},f(n.$t(e.meta.title)),9,H)]),key:"1"}]),1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse","unique-opened"])}}});export{Y as default};
