import{d as A,O as b,P as C,g as D,a8 as I,i as N,N as O,s as m,h as P,c as L,Q as j,I as n,a1 as g,a9 as q,l as w,w as z,v as H,u as l,o as S,a as $,x as f,y as F,b as K,K as Q,f as G,_ as J}from"./index.4042ed24.js";const U={class:"h100"},X=A({name:"layoutAside"}),Y=A({...X,setup(Z){const R=b(()=>C(()=>import("./index.722407ee.js"),["index.722407ee.js","index.4042ed24.js","index.dbc27bcc.css","logo-mini.da0d67fe.js"],import.meta.url)),T=b(()=>C(()=>import("./vertical.01ff4657.js"),["vertical.01ff4657.js","index.4042ed24.js","index.dbc27bcc.css","index.e7b6d9ba.js"],import.meta.url)),u=D(),p=I(),x=N(),B=O(),{routesList:M}=m(p),{themeConfig:i}=m(x),{isTagsViewCurrenFull:E}=m(B),a=P({menuList:[],clientWidth:0}),k=L(()=>{const{layout:e,isCollapse:t,menuBar:s}=i.value,o=["#FFFFFF","#FFF","#fff","#ffffff"].includes(s)?"layout-el-aside-br-color":"";if(a.clientWidth<=1e3)if(t){document.body.setAttribute("class","el-popup-parent--hidden");const W=document.querySelector(".layout-container"),d=document.createElement("div");return d.setAttribute("class","layout-aside-mobile-mode"),W.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"]}),V=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;a.menuList=y(M.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=>{a.clientWidth=e},_=e=>{let{layout:t}=i.value;if(t!=="columns")return!1;e||n.emit("restoreDefault"),p.setColumnsMenuHover(e)};return j(()=>{h(document.body.clientWidth),c(),n.on("setSendColumnsChildren",e=>{a.menuList=e.children}),n.on("setSendClassicChildren",e=>{let{layout:t,isClassicSplitMenu:s}=i.value;t==="classic"&&s&&(a.menuList=[],a.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(q.state,e=>{let{layout:t,isClassicSplitMenu:s}=e.themeConfig.themeConfig;if(t==="classic"&&s)return!1;c()},{deep:!0}),(e,t)=>{const s=w("el-scrollbar"),v=w("el-aside");return z((S(),$("div",U,[f(v,{class:G(["layout-aside",l(k)])},{default:F(()=>[l(V)?(S(),K(l(R),{key:0})):Q("v-if",!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:F(()=>[f(l(T),{menuList:a.menuList},null,8,["menuList"])]),_:1},512)]),_:1},8,["class"])],512)),[[H,!l(E)]])}}}),te=J(Y,[["__file","/data/jenkins/workspace/badp-bcxin-web-5.x-dispatchBusiness/src/layout/component/aside.vue"]]);export{te as default};
