
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.github.io
 */

import{d as y,u as k,a8 as w,g as a,z as v,w as S,i as t,c as s,b as M,e as r,F as C,s as B,A as c,aa as j,Q as h,t as z,j as N,l as V}from"./index-nGFMSQGw.js";import{_ as $}from"./index.vue_vue_type_script_setup_true_lang-irk5Dcs5.js";import{u as F}from"./useMenu-CjAI3aXu.js";const I={key:0,class:"main-sidebar-container"},T={class:"menu flex flex-col of-hidden transition-all"},A=["title","onClick"],D={class:"w-full inline-flex flex-1 flex-col items-center justify-center gap-[2px]"},E={class:"w-full flex-1 truncate text-center text-sm transition-height transition-opacity transition-width"},L=y({name:"MainSidebar",__name:"index",setup(Q){const i=k(),o=w(),{switchTo:b}=F();return(q,G)=>{const x=N;return a(),v(j,{name:"main-sidebar"},{default:S(()=>[t(i).settings.menu.menuMode==="side"||t(i).mode==="mobile"&&t(i).settings.menu.menuMode!=="single"?(a(),s("div",I,[M($,{"show-title":!1,class:"sidebar-logo"}),r("div",T,[(a(!0),s(C,null,B(t(o).allMenus,(e,n)=>{var l,m,u,d,f,_,g,p;return a(),s("div",{key:n,class:h(["menu-item relative transition-all",{active:n===t(o).actived}])},[e.children&&e.children.length!==0?(a(),s("div",{key:0,class:h(["group menu-item-container h-full w-full flex cursor-pointer items-center justify-between gap-1 py-4 text-[var(--g-main-sidebar-menu-color)] transition-all hover-bg-[var(--g-main-sidebar-menu-hover-bg)] hover-text-[var(--g-main-sidebar-menu-hover-color)] px-2!",{"text-[var(--g-main-sidebar-menu-active-color)]! bg-[var(--g-main-sidebar-menu-active-bg)]!":n===t(o).actived}]),title:typeof((l=e.meta)==null?void 0:l.title)=="function"?(m=e.meta)==null?void 0:m.title():(u=e.meta)==null?void 0:u.title,onClick:H=>t(b)(n)},[r("div",D,[(d=e.meta)!=null&&d.icon?(a(),v(x,{key:0,name:(f=e.meta)==null?void 0:f.icon,size:20,class:"menu-item-container-icon transition-transform group-hover-scale-120",async:""},null,8,["name"])):c("",!0),r("span",E,z(typeof((_=e.meta)==null?void 0:_.title)=="function"?(g=e.meta)==null?void 0:g.title():(p=e.meta)==null?void 0:p.title),1)])],10,A)):c("",!0)],2)}),128))])])):c("",!0)]),_:1})}}}),P=V(L,[["__scopeId","data-v-74880cce"]]);export{P as default};
