import{d as A,O as C,_ as b,r as D,a5 as O,u as P,J as I,s as m,a as N,D as L,P as q,F as n,Y as g,a6 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 Y}from"./index.3a30a18d.js";const G={class:"h100"},Q=A({name:"layoutAside"}),Z=A({...Q,setup(U){const R=C(()=>b(()=>import("./index.5933a016.js"),["index.5933a016.js","index.vue_vue_type_script_setup_true_name_layoutLogo_lang.bdb919af.js","logo-mini.da0d67fe.js","index.3a30a18d.js","index.dbc27bcc.css"],import.meta.url)),M=C(()=>b(()=>import("./vertical.597ac146.js"),["vertical.597ac146.js","index.3a30a18d.js","index.dbc27bcc.css","index.vue_vue_type_script_setup_true_name_svgIcon_lang.a38ecbcd.js"],import.meta.url)),u=D(),p=O(),T=P(),B=I(),{routesList:E}=m(p),{themeConfig:i}=m(T),{isTagsViewCurrenFull:V}=m(B),l=N({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(l.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;l.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=>{l.clientWidth=e},_=e=>{let{layout:t}=i.value;if(t!=="columns")return!1;e||n.emit("restoreDefault"),p.setColumnsMenuHover(e)};return q(()=>{h(document.body.clientWidth),c(),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",()=>{c()}),n.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",G,[f(v,{class:Y(["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:l.menuList},null,8,["menuList"])]),_:1},512)]),_:1},8,["class"])],512)),[[$,!a(V)]])}}});export{Z as default};
