"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("element-plus"),p={class:"menu-item__collapse"},f={class:"menu-item__collapse"},k=e.defineComponent({name:"MenuItem",__name:"menu-item",props:{info:{type:Object},isCollapse:Boolean,iconSize:Number},setup(u){const n=u;return(d,_)=>{var r,a,s;const m=e.resolveComponent("MenuItem",!0);return(r=n.info)!=null&&r.routes?(e.openBlock(),e.createBlock(e.unref(l.ElSubMenu),{key:1,index:(s=n.info)==null?void 0:s.path},{title:e.withCtx(()=>{var t,i,c;return[(t=n.info)!=null&&t.icon?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:0,size:n.iconSize},{default:e.withCtx(()=>{var o;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((o=n.info)==null?void 0:o.icon)))]}),_:1},8,["size"])):e.createCommentVNode("",!0),!((i=n.info)!=null&&i.icon)&&n.isCollapse?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:1,size:16},{default:e.withCtx(()=>{var o;return[e.createElementVNode("span",f,e.toDisplayString((o=n.info)==null?void 0:o.name[0]),1)]}),_:1})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString((c=n.info)==null?void 0:c.name),1)]}),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.info.routes,t=>(e.openBlock(),e.createBlock(m,{key:t.path,info:t},null,8,["info"]))),128))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(l.ElMenuItem),{key:0,index:(a=n.info)==null?void 0:a.path},{default:e.withCtx(()=>{var t,i,c;return[(t=n.info)!=null&&t.icon?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:0,size:n.iconSize},{default:e.withCtx(()=>{var o;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((o=n.info)==null?void 0:o.icon)))]}),_:1},8,["size"])):e.createCommentVNode("",!0),!((i=n.info)!=null&&i.icon)&&n.isCollapse?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:1,size:16},{default:e.withCtx(()=>{var o;return[e.createElementVNode("span",p,e.toDisplayString((o=n.info)==null?void 0:o.name[0]),1)]}),_:1})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString((c=n.info)==null?void 0:c.name),1)]}),_:1},8,["index"]))}}});exports.default=k;
