import{A as D,i as N,C as z,k as n,D as H,n as C}from"./index.8a64ecdf.js";import{d as A,r as I,ak as d,Q as O,k as b,v as P,w as L,a8 as g,H as q,N as $,u as m,o as S,c as j,M as f,G as F,E as G,J,z as Q,am as w}from"./vue.95e072e2.js";import"./elementPlus.58179425.js";import"./echarts.72dc8373.js";const K={class:"h100"},U=A({name:"layoutAside"}),se=A({...U,setup(X){const R=w(()=>C(()=>import("./index.b1f8c938.js"),["assets/index.b1f8c938.js","assets/vue.95e072e2.js","assets/index.8a64ecdf.js","assets/elementPlus.58179425.js","assets/echarts.72dc8373.js","assets/index.c1001ae2.css","assets/ansjer_image.bff06960.js","assets/_plugin-vue_export-helper.c27b6911.js","assets/index.8f0cc000.css"])),M=w(()=>C(()=>import("./vertical.612fe56a.js"),["assets/vertical.612fe56a.js","assets/index.8a64ecdf.js","assets/vue.95e072e2.js","assets/elementPlus.58179425.js","assets/echarts.72dc8373.js","assets/index.c1001ae2.css"])),a=I(),p=D(),T=N(),E=z(),{routesList:k}=d(p),{themeConfig:i}=d(T),{isTagsViewCurrenFull:B}=d(E),l=O({menuList:[],clientWidth:0}),V=b(()=>{const{layout:e,isCollapse:t,menuBar:s}=i.value,o=["#FFFFFF","#FFF","#fff","#ffffff"].includes(s)?"layout-el-aside-br-color":"";if(l.clientWidth<=1e3)if(t){document.body.setAttribute("class","el-popup-parent--hidden");const x=document.querySelector(".layout-container"),c=document.createElement("div");return c.setAttribute("class","layout-aside-mobile-mode"),x.appendChild(c),c.addEventListener("click",u),[o,"layout-aside-mobile","layout-aside-mobile-open"]}else return u(),[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"]}),W=b(()=>{let{layout:e,isShowLogo:t}=i.value;return t&&e==="defaults"||t&&e==="columns"}),u=()=>{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","")},r=()=>{if(i.value.layout==="columns")return!1;l.menuList=y(k.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=>{l.clientWidth=e},v=e=>{let{layout:t}=i.value;if(t!=="columns")return!1;e||n.emit("restoreDefault"),p.setColumnsMenuHover(e)};return P(()=>{h(document.body.clientWidth),r(),n.on("setSendColumnsChildren",e=>{l.menuList=e.children}),n.on("setSendClassicChildren",e=>{let{layout:t,isClassicSplitMenu:s}=i.value;t==="classic"&&s&&(l.menuList=[],l.menuList=e.children)}),n.on("getBreadcrumbIndexSetFilterRoutes",()=>{r()}),n.on("layoutMobileResize",e=>{h(e.clientWidth),u()})}),L(i.value,e=>{e.isShowLogoChange!==e.isShowLogo&&a.value&&a.value.update()}),L(H.state,e=>{let{layout:t,isClassicSplitMenu:s}=e.themeConfig.themeConfig;if(t==="classic"&&s)return!1;r()},{deep:!0}),(e,t)=>{const s=g("el-scrollbar"),_=g("el-aside");return q((S(),j("div",K,[f(_,{class:Q(["layout-aside",V.value])},{default:F(()=>[W.value?(S(),G(m(R),{key:0})):J("",!0),f(s,{class:"flex-auto",ref_key:"layoutAsideScrollbarRef",ref:a,onMouseenter:t[0]||(t[0]=o=>v(!0)),onMouseleave:t[1]||(t[1]=o=>v(!1))},{default:F(()=>[f(m(M),{menuList:l.menuList},null,8,["menuList"])]),_:1},512)]),_:1},8,["class"])],512)),[[$,!m(B)]])}}});export{se as default};
