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

import{d as C,u as M,a8 as B,r as $,g as t,z as y,w as j,i as a,c as r,e as o,b as x,x as z,F as N,s as V,A as c,aa as F,Q as k,t as H,j as I,l as L}from"./index-nGFMSQGw.js";import{_ as R}from"./index.vue_vue_type_script_setup_true_lang-irk5Dcs5.js";import{_ as T}from"./rightSide.vue_vue_type_script_setup_true_lang-oHdyjiaC.js";import{u as Y}from"./useMenu-CjAI3aXu.js";import"./HDropdownMenu.vue_vue_type_script_setup_true_lang-Dgz-jknv.js";import"./index.vue_vue_type_script_setup_true_lang-1hGRIBXM.js";import"./HDropdown-BjwO9ikd.js";import"./HTabList.vue_vue_type_script_setup_true_lang-P9EIXJZ1.js";import"./use-resolve-button-type-CVaAVCZ2.js";import"./index.vue_vue_type_script_setup_true_lang-BWhJNsuM.js";import"./index-CyI3Kccs.js";import"./index.vue_vue_type_script_setup_true_lang-CXCJ8paG.js";import"./HKbd-By3ZrrUU.js";import"./index.vue_vue_type_script_setup_true_lang-DwWyQI_t.js";import"./useMainPage-C9MASyfo.js";const A={key:0},D={class:"header-container"},E={class:"menu flex of-hidden transition-all"},Q=["title","onClick"],W={class:"inline-flex flex-1 items-center justify-center gap-1"},q={class:"w-full flex-1 truncate text-sm transition-height transition-opacity transition-width"},G=C({name:"LayoutHeader",__name:"index",setup(J){const l=M(),i=B(),{switchTo:w}=Y(),m=$();function S(n){(n.deltaY||n.detail!==0)&&m.value.scrollBy({left:(n.deltaY||n.detail)>0?50:-50})}return(n,K)=>{const b=I;return t(),y(F,{name:"header"},{default:j(()=>[a(l).mode==="pc"&&a(l).settings.menu.menuMode==="head"?(t(),r("header",A,[o("div",D,[x(R,{class:"title"}),o("div",{ref_key:"menuRef",ref:m,class:"menu-container",onWheel:z(S,["prevent"])},[o("div",E,[(t(!0),r(N,null,V(a(i).allMenus,(e,s)=>{var u,d,f,p,_,h,v,g;return t(),r("div",{key:s,class:k(["menu-item relative transition-all",{active:s===a(i).actived}])},[e.children&&e.children.length!==0?(t(),r("div",{key:0,class:k(["group menu-item-container h-full w-full flex cursor-pointer items-center justify-between gap-1 px-3 text-[var(--g-header-menu-color)] transition-all hover-bg-[var(--g-header-menu-hover-bg)] hover-text-[var(--g-header-menu-hover-color)]",{"text-[var(--g-header-menu-active-color)]! bg-[var(--g-header-menu-active-bg)]!":s===a(i).actived}]),title:typeof((u=e.meta)==null?void 0:u.title)=="function"?(d=e.meta)==null?void 0:d.title():(f=e.meta)==null?void 0:f.title,onClick:O=>a(w)(s)},[o("div",W,[(p=e.meta)!=null&&p.icon?(t(),y(b,{key:0,name:(_=e.meta)==null?void 0:_.icon,size:20,class:"menu-item-container-icon transition-transform group-hover-scale-120",async:""},null,8,["name"])):c("",!0),o("span",q,H(typeof((h=e.meta)==null?void 0:h.title)=="function"?(v=e.meta)==null?void 0:v.title():(g=e.meta)==null?void 0:g.title),1)])],10,Q)):c("",!0)],2)}),128))])],544),x(T)])])):c("",!0)]),_:1})}}}),ue=L(G,[["__scopeId","data-v-98464ad0"]]);export{ue as default};
