"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("element-plus"),u=require("../../node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.4.21/node_modules/@element-plus/icons-vue/dist/index.js"),k=require("./xmenu.vue.js"),C=require("./ymenu.vue.js"),h=require("./person.vue.js"),y=require("./types.js"),x={key:1},B={class:"ymenu-wrapper"},g={key:1},N={class:"header-menus-wrapper"},V={style:{flex:"1"}},E={class:"header-tools-wrapper"},S={style:{"margin-right":"20px"}},w=e.defineComponent({__name:"index",props:y.proLayoutProps,emits:["logout"],setup(i,{emit:d}){const a=l.useNamespace("pro-layout"),m=e.useSlots(),o=i,p=d,s=e.shallowRef(!1),f=e.computed(()=>[{label:"退出登录",icon:u.SwitchButton,action(){p("logout")}},...(o.avatarActions||[]).map(t=>({...t,iconSrc:typeof t.icon=="string"?t.icon:""}))]),r=e.computed(()=>({...{iconSize:20,menus:[]},...o.headerMenus})),n=e.computed(()=>({...{iconSize:20,menus:[],isCollapse:!1,maxWidth:300,minWidth:84},...o.asideMenus})),v=e.computed(()=>{var t;return(t=o.asideMenus)==null?void 0:t.isCollapse});e.watch(v,t=>{s.value=!!t,console.log(s.value,"xxxxx")},{immediate:!0,deep:!0});const _=()=>{s.value=!s.value};return(t,z)=>(e.openBlock(),e.createBlock(e.unref(l.ElContainer),{class:e.normalizeClass([e.unref(a).b()]),style:e.normalizeStyle({"--wet-pro-layout-aside-width":s.value?`${n.value.minWidth}px`:`${n.value.maxWidth}px`})},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElAside),{class:e.normalizeClass([e.unref(a).e("aside"),e.unref(a).is("fixed",n.value.fixed),o.asideClass])},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElHeader),{class:e.normalizeClass([e.unref(a).e("logo")])},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"logo",{},()=>[o.logo?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.logo),{key:0})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h1",x,e.toDisplayString(o.title),1))])]),_:3},8,["class"]),e.createElementVNode("div",B,[e.createVNode(C.default,{"icon-size":n.value.iconSize,"is-collapse":s.value,active:n.value.active,menus:n.value.menus},null,8,["icon-size","is-collapse","active","menus"])]),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"aside-tools")])]),_:3},8,["class"]),n.value.fixed?(e.openBlock(),e.createBlock(e.unref(l.ElAside),{key:0,class:e.normalizeClass([e.unref(a).e("aside"),o.asideClass])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(e.unref(l.ElContainer),null,{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElHeader),{class:e.normalizeClass([e.unref(a).e("header"),e.unref(a).is("fixed",r.value.fixed),e.unref(a).is("aside-fixed",n.value.fixed),o.headerClass])},{default:e.withCtx(()=>{var c;return[!n.value.fixed&&r.value.fixed?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(a).e("logo")])},[e.renderSlot(t.$slots,"logo",{},()=>[o.logo?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.logo),{key:0})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h1",g,e.toDisplayString(o.title),1))])],2)):e.createCommentVNode("",!0),e.createVNode(e.unref(l.ElButton),{link:"",onClick:_,style:{"margin-left":"20px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(e.unref(u.Expand),{key:1})):(e.openBlock(),e.createBlock(e.unref(u.Fold),{key:0}))]),_:1})]),_:1}),e.createElementVNode("div",N,[e.createElementVNode("div",V,[e.renderSlot(t.$slots,"header",{},()=>[e.createVNode(k.default,{active:r.value.active,"icon-size":r.value.iconSize,menus:r.value.menus},null,8,["active","icon-size","menus"])])]),e.createElementVNode("div",E,[o.backtop?(e.openBlock(),e.createBlock(e.unref(l.ElBacktop),{key:0})):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"header-tools")])]),e.createElementVNode("div",S,[e.createVNode(h.default,{nickname:(c=o.avatar)==null?void 0:c.nickname,"more-actions":f.value},null,8,["nickname","more-actions"])])]}),_:3},8,["class"]),r.value.fixed?(e.openBlock(),e.createBlock(e.unref(l.ElHeader),{key:0,class:e.normalizeClass([e.unref(a).e("header")])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(e.unref(l.ElMain),{style:{padding:"0"}},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3}),e.unref(m).footer?(e.openBlock(),e.createBlock(e.unref(l.ElFooter),{key:1},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"footer")]),_:3})):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["class","style"]))}});exports.default=w;
