import B from"./menu-search-bottom.2dfeb8f5.js";import P from"./BasicMenu.d96dd5a8.js";import R from"./SimpleMenu.1e5e8313.js";import"./SimpleMenuTag.2ed8a98d.js";import{w as C,D as g,N as f,o as U,s as $,x as D,c as W,r as j,v as G,F as Q,O as V,Q as Z}from"./index.f528fccb.js";import{useSplitMenu as q}from"./useLayoutMenu.cd946244.js";import{f as J,w as K,b as X,c as o,u as e,F as M,d as Y,B as ee,e as s,aZ as w}from"./vendor-@vue.d54eea3a.js";var ie=J({name:"LayoutMenu",props:{theme:C.oneOf(["light","dark"]),splitType:{type:Number,default:g.NONE},isHorizontal:C.bool,menuMode:{type:[String],default:""},bottomFixShow:{type:Boolean,default:!1}},setup(n){K(n,()=>o(M,null,[d(),e(c)?o(f,{style:e(p)},{default:()=>u()}):u()])),X(()=>{abp.event.on("reFreshMenu",()=>o(M,null,[d(),e(c)?o(f,{style:e(p)},{default:()=>u()}):u(),T()]))}),Y(()=>{});const b=U(),{getMenuMode:x,getMenuType:F,getMenuTheme:_,getCollapsed:r,getCollapsedShowTitle:N,getAccordion:L,getIsHorizontal:v,getIsSidebarType:h,getSplit:H}=$(),{getShowLogo:I}=D(),{prefixCls:y}=W("layout-menu"),{menusRef:i}=q(ee(n,"splitType")),{getIsMobile:a}=j(),z=s(()=>e(a)?Q.INLINE:n.menuMode||e(x)),m=s(()=>n.theme||e(_)),S=s(()=>e(I)&&e(h)),c=s(()=>!e(v)&&(e(h)||n.splitType===g.LEFT||n.splitType===g.NONE)),p=s(()=>({height:`calc(100vh - 60px - ${n.bottomFixShow?" 48px":"0px"} - 42px)`})),E=s(()=>[`${y}-logo`,e(m),{[`${y}--mobile`]:e(a)}]),k=s(()=>{const t=e(i);return{menus:t,beforeClickFn:A,items:t,theme:e(m),accordion:e(L),collapse:e(r),collapsedShowTitle:e(N),onMenuClick:O}});function O(t){b(t)}async function A(t){return V(t)?(Z(t),!1):!0}function d(){return!e(S)&&!e(a)?null:o(G,{showTitle:!e(r),class:e(E),theme:e(m)},null)}function T(){let t=e(i);return!t||!t.length||n.isHorizontal?null:o(B,{items:t,mode:e(r)},null)}function u(){const{...t}=e(k);let l=e(i);return!l||!l.length?null:n.isHorizontal?o(P,w(t,{isHorizontal:n.isHorizontal,type:e(F),showLogo:e(S),mode:e(z),items:l}),null):o(R,w(t,{isSplitMenu:e(H),items:l}),null)}return()=>o(M,null,[d(),e(c)?o(f,{style:e(p)},{default:()=>u()}):u(),T()])}});export{ie as _};
