"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("element-plus"),h=require("vue-router");function p(r){let n=!1,t;const o=e.effectScope(!0);return(...a)=>(n||(t=o.run(()=>r(...a)),n=!0),t)}function m(r,n){if(typeof Symbol<"u"){const t={...r};return Object.defineProperty(t,Symbol.iterator,{enumerable:!1,value(){let o=0;return{next:()=>({value:n[o++],done:o>n.length})}}}),t}else return Object.assign([...n],r)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function _(r){const n=Object.create(null);return t=>n[t]||(n[t]=r(t))}const w=/-(\w)/g,x=_(r=>r.replace(w,(n,t)=>t?t.toUpperCase():""));function C(r={}){const{inheritAttrs:n=!0}=r,t=e.shallowRef(),o=e.defineComponent({setup(c,{slots:l}){return()=>{t.value=l.default}}}),a=e.defineComponent({inheritAttrs:n,setup(c,{attrs:l,slots:f}){return()=>{var d;if(!t.value&&process.env.NODE_ENV!=="production")throw new Error("[VueUse] Failed to find the definition of reusable template");const s=(d=t.value)==null?void 0:d.call(t,{...k(l),$slots:f});return n&&(s==null?void 0:s.length)===1?s[0]:s}}});return m({define:o,reuse:a},[o,a])}function k(r){const n={};for(const t in r)n[x(t)]=r[t];return n}const i=e.defineComponent({name:"If",__name:"If",props:{when:{}},setup(r){const n=t=>t;return(t,o)=>t.when?e.renderSlot(t.$slots,"default",{key:0,value:n(t.when)}):e.renderSlot(t.$slots,"fallback",{key:1})}}),v=e.defineComponent({name:"For",inheritAttrs:!1,__name:"For",props:{echo:{},rowKey:{}},setup(r){const n=r,t=e.computed(()=>n.echo);return(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.echo,(c,l)=>e.renderSlot(o.$slots,"default",{key:o.rowKey,item:c,index:l})),128)),e.createVNode(i,{when:!t.value||!t.value.length||t.value.length===0},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"fallback")]),_:3},8,["when"])],64))}}),y=e.defineComponent({name:"FsSideBarItem",__name:"Item",props:{items:{}},setup(r){const[n,t]=C();return(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(n),null,{default:e.withCtx(({list:c})=>[e.createVNode(e.unref(v),{echo:c,"row-key":"path"},{default:e.withCtx(({item:l})=>[e.createVNode(e.unref(i),{when:l.children&&l.children.length},{fallback:e.withCtx(()=>[e.createVNode(e.unref(u.ElMenuItem),{class:"fast-start-menu-item",index:l.path},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{when:l.icon},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElIcon),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon)))]),_:2},1024)]),_:2},1032,["when"]),e.createTextVNode(" "+e.toDisplayString(l.name),1)]),_:2},1032,["index"])]),default:e.withCtx(()=>[e.createVNode(e.unref(u.ElSubMenu),{class:"fast-start-menu-item-title",index:l.path},{title:e.withCtx(()=>[e.createVNode(e.unref(i),{when:l.icon},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElIcon),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon)))]),_:2},1024)]),_:2},1032,["when"]),e.createTextVNode(" "+e.toDisplayString(l.name),1)]),default:e.withCtx(()=>[e.createVNode(e.unref(t),{list:l.children||[]},null,8,["list"])]),_:2},1032,["index"])]),_:2},1032,["when"])]),_:2},1032,["echo"])]),_:1}),e.createVNode(e.unref(t),{list:o.items},null,8,["list"])],64))}}),b=60,S=p(()=>{const r=e.ref({menu:[]});function n(t){r.value.menu=t}return{state:e.readonly(r),setMenu:n}}),N=e.defineComponent({__name:"SideBar",setup(r){const{state:n}=S(),t=h.useRoute();return(o,a)=>(e.openBlock(),e.createBlock(e.unref(u.ElAside),{class:"fast-start-aside",width:"230px",style:e.normalizeStyle({height:`calc(100vh - ${e.unref(b)}px)`})},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElMenu),{"default-active":e.unref(t).path,router:"",class:"fast-start-menu"},{default:e.withCtx(()=>[e.createVNode(y,{items:e.unref(n).menu},null,8,["items"])]),_:1},8,["default-active"])]),_:1},8,["style"]))}});exports.default=N;
//# sourceMappingURL=SideBar.js.map
