const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.Cm2mk542.js","assets/vue.BxlDVA1H.js","assets/index.lP_uh0LI.js","assets/index.TG7KVPIy.css","assets/logo-mini.D83j9Aw9.js","assets/_plugin-vue_export-helper.DlAUqK2U.js","assets/index.DPIELCQg.css","assets/vertical.DLd1rjCo.js"])))=>i.map(i=>d[i]);
import{W as P,u as j,y as q,S as H,t as u,Z as $,_ as F}from"./index.lP_uh0LI.js";import{d as B,R as Q,a as w,N as p,r as Z,c as v,O as G,m as x,b as R,z as J,E as K,u as y,e as U,f as A,g as _,w as M,h as X,j as Y,Q as T,t as ee}from"./vue.BxlDVA1H.js";const te={class:"h100"},se=B({name:"layoutAside"}),le=B({...se,setup(oe){const E=Q(),I=T(()=>F(()=>import("./index.Cm2mk542.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),W=T(()=>F(()=>import("./vertical.DLd1rjCo.js"),__vite__mapDeps([7,2,1,3]))),d=w(),f=w(0),C=P(),V=j(),k=q(),{routesList:r}=p(C),{themeConfig:n}=p(V),{isTagsViewCurrenFull:D}=p(k),i=Z({menuList:[],clientWidth:0}),N=v(()=>!H.get("hideSide")),O=v(()=>{const{layout:e,isCollapse:t,menuBar:s}=n.value,o=["#FFFFFF","#FFF","#fff","#ffffff"].includes(s)?"layout-el-aside-br-color":"";if(i.clientWidth<=1e3)if(t){document.body.setAttribute("class","el-popup-parent--hidden");const L=document.querySelector(".layout-container"),a=document.createElement("div");return a.setAttribute("class","layout-aside-mobile-mode"),L.appendChild(a),a.addEventListener("click",m),[o,"layout-aside-mobile","layout-aside-mobile-open"]}else return m(),[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"]}),z=v(()=>{let{layout:e,isShowLogo:t}=n.value;return t&&e==="defaults"||t&&e==="columns"}),m=()=>{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&&(n.value.isCollapse=!1),document.body.setAttribute("class","")},b=(e,t)=>{for(let s=0;s<e.length;s++){const l=e[s];if(l.children&&l.children.length>0&&(l.children.findIndex(a=>a.path===t)!==-1||b(l.children,t)!==null))return s}return null},c=(e="")=>{if(n.value.layout==="columns")return!1;let{layout:t,isClassicSplitMenu:s}=n.value;t==="classic"&&s?(f.value=b(r.value,e||E.path)||0,i.menuList=h(r.value[f.value].children||[r.value[f.value]])):i.menuList=h(r.value)},h=e=>e.filter(t=>{var s;return!((s=t.meta)!=null&&s.isHide)}).map(t=>(t=Object.assign({},t),t.children&&(t.children=h(t.children)),t)),S=e=>{i.clientWidth=e},g=e=>{let{layout:t}=n.value;if(t!=="columns")return!1;e||u.emit("restoreDefault"),C.setColumnsMenuHover(e)};return G(()=>{S(document.body.clientWidth),c(),u.on("setSendColumnsChildren",e=>{i.menuList=e.children}),u.on("setSendClassicChildren",e=>{let{layout:t,isClassicSplitMenu:s}=n.value;t==="classic"&&s&&(i.menuList=[],c(e.path))}),u.on("getBreadcrumbIndexSetFilterRoutes",()=>{c()}),u.on("layoutMobileResize",e=>{S(e.clientWidth),m()})}),x(n.value,e=>{e.isShowLogoChange!==e.isShowLogo&&d.value&&d.value.update()}),x($.state,e=>{let{layout:t,isClassicSplitMenu:s}=e.themeConfig.themeConfig;if(t==="classic"&&s)return!1;c()},{deep:!0}),(e,t)=>{const s=R("el-scrollbar"),l=R("el-aside");return J((A(),U("div",te,[_(l,{class:ee(["layout-aside",O.value])},{default:M(()=>[z.value?(A(),X(y(I),{key:0})):Y("",!0),_(s,{class:"flex-auto",ref_key:"layoutAsideScrollbarRef",ref:d,onMouseenter:t[0]||(t[0]=o=>g(!0)),onMouseleave:t[1]||(t[1]=o=>g(!1))},{default:M(()=>[_(y(W),{menuList:i.menuList},null,8,["menuList"])]),_:1},512)]),_:1},8,["class"])],512)),[[K,!y(D)&&N.value]])}}});export{le as default};
