import{d as A,O as C,_ as b,r as D,a8 as O,u as I,J as N,s as m,a as P,D as L,W as q,F as l,V as g,a9 as z,c as F,w as H,v as $,e as a,f as S,g as j,l as f,m as w,M as J,K,n as G}from"./index.2c7321ca.js";const Q={class:"h100"},U=A({name:"layoutAside"}),Z=A({...U,setup(X){const R=C(()=>b(()=>import("./index.cc9064ae.js"),["assets/index.cc9064ae.js","assets/index.vue_vue_type_script_setup_true_name_layoutLogo_lang.07ba3ad8.js","assets/logo-mini.da0d67fe.js","assets/index.2c7321ca.js","assets/index.319ce9dc.css"])),M=C(()=>b(()=>import("./vertical.b347cdb2.js"),["assets/vertical.b347cdb2.js","assets/index.2c7321ca.js","assets/index.319ce9dc.css","assets/index.vue_vue_type_script_setup_true_name_svgIcon_lang.bc6c7912.js"])),u=D(),p=O(),T=I(),B=N(),{routesList:E}=m(p),{themeConfig:i}=m(T),{isTagsViewCurrenFull:V}=m(B),n=P({menuList:[],clientWidth:0}),W=L(()=>{const{layout:e,isCollapse:t,menuBar:s}=i.value,o=["#FFFFFF","#FFF","#fff","#ffffff"].includes(s)?"layout-el-aside-br-color":"";if(n.clientWidth<=1e3)if(t){document.body.setAttribute("class","el-popup-parent--hidden");const x=document.querySelector(".layout-container"),d=document.createElement("div");return d.setAttribute("class","layout-aside-mobile-mode"),x.appendChild(d),d.addEventListener("click",r),[o,"layout-aside-mobile","layout-aside-mobile-open"]}else return r(),[o,"layout-aside-mobile","layout-aside-mobile-close"];else return e==="columns"?t?[o,"layout-aside-pc-1"]:[o,"layout-aside-pc-220"]:t?[o,"layout-aside-pc-64"]:[o,"layout-aside-pc-220"]}),k=L(()=>{let{layout:e,isShowLogo:t}=i.value;return t&&e==="defaults"||t&&e==="columns"}),r=()=>{const e=document.querySelector(".layout-aside-mobile-mode");e==null||e.setAttribute("style","animation: error-img-two 0.3s"),setTimeout(()=>{var s;(s=e==null?void 0:e.parentNode)==null||s.removeChild(e)},300),document.body.clientWidth<1e3&&(i.value.isCollapse=!1),document.body.setAttribute("class","")},c=()=>{if(i.value.layout==="columns")return!1;n.menuList=y(E.value)},y=e=>e.filter(t=>{var s;return!((s=t.meta)!=null&&s.isHide)}).map(t=>(t=Object.assign({},t),t.children&&(t.children=y(t.children)),t)),h=e=>{n.clientWidth=e},_=e=>{let{layout:t}=i.value;if(t!=="columns")return!1;e||l.emit("restoreDefault"),p.setColumnsMenuHover(e)};return q(()=>{h(document.body.clientWidth),c(),l.on("setSendColumnsChildren",e=>{n.menuList=e.children}),l.on("setSendClassicChildren",e=>{let{layout:t,isClassicSplitMenu:s}=i.value;t==="classic"&&s&&(n.menuList=[],n.menuList=e.children)}),l.on("getBreadcrumbIndexSetFilterRoutes",()=>{c()}),l.on("layoutMobileResize",e=>{h(e.clientWidth),r()})}),g(i.value,e=>{e.isShowLogoChange!==e.isShowLogo&&u.value&&u.value.update()}),g(z.state,e=>{let{layout:t,isClassicSplitMenu:s}=e.themeConfig.themeConfig;if(t==="classic"&&s)return!1;c()},{deep:!0}),(e,t)=>{const s=F("el-scrollbar"),v=F("el-aside");return H((S(),j("div",Q,[f(v,{class:G(["layout-aside",a(W)])},{default:w(()=>[a(k)?(S(),J(a(R),{key:0})):K("",!0),f(s,{class:"flex-auto",ref_key:"layoutAsideScrollbarRef",ref:u,onMouseenter:t[0]||(t[0]=o=>_(!0)),onMouseleave:t[1]||(t[1]=o=>_(!1))},{default:w(()=>[f(a(M),{menuList:n.menuList},null,8,["menuList"])]),_:1},512)]),_:1},8,["class"])],512)),[[$,!a(V)]])}}});export{Z as default};
