import{clearFix as S,resetComponent as y,resetIcon as v}from"../../style/index.mjs";import z from"../../style/motion/collapse.mjs";import"../../_util/cssinjs/StyleContext.mjs";import"vue";import"../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";import{initSlideMotion as f}from"../../style/motion/slide.mjs";import{initZoomMotion as A}from"../../style/motion/zoom.mjs";import"../../theme/internal.mjs";import D from"./horizontal.mjs";import M from"./rtl.mjs";import h from"./theme.mjs";import C from"./vertical.mjs";import E from"../../theme/util/genComponentStyleHook.mjs";import{merge as x}from"../../theme/util/statistic.mjs";import{TinyColor as B}from"../../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.mjs";const T=l=>{const{componentCls:n,fontSize:o,motionDurationSlow:e,motionDurationMid:t,motionEaseInOut:i,motionEaseOut:r,iconCls:m,controlHeightSM:c}=l;return{[`${n}-item, ${n}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${e}`,`background ${e}`,`padding ${e} ${i}`].join(","),[`${n}-item-icon, ${m}`]:{minWidth:o,fontSize:o,transition:[`font-size ${t} ${r}`,`margin ${e} ${i}`,`color ${e}`].join(","),"+ span":{marginInlineStart:c-o,opacity:1,transition:[`opacity ${e} ${i}`,`margin ${e}`,`color ${e}`].join(",")}},[`${n}-item-icon`]:{...v()},[`&${n}-item-only-child`]:{[`> ${m}, > ${n}-item-icon`]:{marginInlineEnd:0}}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${n}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},w=l=>{const{componentCls:n,motionDurationSlow:o,motionEaseInOut:e,borderRadius:t,menuArrowSize:i,menuArrowOffset:r}=l;return{[`${n}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:l.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${o} ${e}, opacity ${o}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:i*.6,height:i*.15,backgroundColor:"currentcolor",borderRadius:t,transition:[`background ${o} ${e}`,`transform ${o} ${e}`,`top ${o} ${e}`,`color ${o} ${e}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${r})`},"&::after":{transform:`rotate(-45deg) translateY(${r})`}}}}},R=l=>{const{antCls:n,componentCls:o,fontSize:e,motionDurationSlow:t,motionDurationMid:i,motionEaseInOut:r,lineHeight:m,paddingXS:c,padding:$,colorSplit:s,lineWidth:u,zIndexPopup:b,borderRadiusLG:g,radiusSubMenuItem:a,menuArrowSize:p,menuArrowOffset:d,lineType:H,menuPanelMaskInset:I}=l;return[{"":{[`${o}`]:{...S(),"&-hidden":{display:"none"}}},[`${o}-submenu-hidden`]:{display:"none"}},{[o]:{...y(l),...S(),marginBottom:0,paddingInlineStart:0,fontSize:e,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${t} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${o}-item`]:{flex:"none"}},[`${o}-item, ${o}-submenu, ${o}-submenu-title`]:{borderRadius:l.radiusItem},[`${o}-item-group-title`]:{padding:`${c}px ${$}px`,fontSize:e,lineHeight:m,transition:`all ${t}`},[`&-horizontal ${o}-submenu`]:{transition:[`border-color ${t} ${r}`,`background ${t} ${r}`].join(",")},[`${o}-submenu, ${o}-submenu-inline`]:{transition:[`border-color ${t} ${r}`,`background ${t} ${r}`,`padding ${i} ${r}`].join(",")},[`${o}-submenu ${o}-sub`]:{cursor:"initial",transition:[`background ${t} ${r}`,`padding ${t} ${r}`].join(",")},[`${o}-title-content`]:{transition:`color ${t}`},[`${o}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${o}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:s,borderStyle:H,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}},...T(l),[`${o}-item-group`]:{[`${o}-item-group-list`]:{margin:0,padding:0,[`${o}-item, ${o}-submenu-title`]:{paddingInline:`${e*2}px ${$}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:b,background:"transparent",borderRadius:g,boxShadow:"none",transformOrigin:"0 0","&::before":{position:"absolute",inset:`${I}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:I},[`> ${o}`]:{borderRadius:g,...T(l),...w(l),[`${o}-item, ${o}-submenu > ${o}-submenu-title`]:{borderRadius:a},[`${o}-submenu-title::after`]:{transition:`transform ${t} ${r}`}}},...w(l),[`&-inline-collapsed ${o}-submenu-arrow,
        &-inline ${o}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${d})`},"&::after":{transform:`rotate(45deg) translateX(-${d})`}},[`${o}-submenu-open${o}-submenu-inline > ${o}-submenu-title > ${o}-submenu-arrow`]:{transform:`translateY(-${p*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${d})`},"&::before":{transform:`rotate(45deg) translateX(${d})`}}}},{[`${n}-layout-header`]:{[o]:{lineHeight:"inherit"}}}]},N=(l,n)=>E("Menu",(e,{overrideComponentToken:t})=>{if(n?.value===!1)return[];const{colorBgElevated:i,colorPrimary:r,colorBgSub:m,colorError:c,colorErrorHover:$,colorTextLightSolid:s}=e,{controlHeightLG:u,fontSize:b}=e,g=b/7*5,a=x(e,{menuItemHeight:u,menuItemPaddingInline:e.margin,menuArrowSize:g,menuHorizontalHeight:u*1.15,menuArrowOffset:`${g*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:i}),p=new B(s).setAlpha(.65).toRgbString(),d=x(a,{colorItemText:p,colorItemTextHover:s,colorGroupTitle:p,colorItemTextSelected:s,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:m,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new B(s).setAlpha(.25).toRgbString(),colorDangerItemText:c,colorDangerItemTextHover:$,colorDangerItemTextSelected:s,colorDangerItemBgActive:c,colorDangerItemBgSelected:c,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:s,colorItemBgSelectedHorizontal:m},{...t});return[R(a),D(a),C(a),h(a,"light"),h(d,"dark"),M(a),z(a),f(a,"slide-up"),f(a,"slide-down"),A(a,"zoom-big")]},e=>{const{colorPrimary:t,colorError:i,colorTextDisabled:r,colorErrorBg:m,colorText:c,colorTextDescription:$,colorBgContainer:s,colorFillAlter:u,colorFillContent:b,lineWidth:g,lineWidthBold:a,controlItemBgActive:p,colorBgTextHover:d}=e;return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,colorItemText:c,colorItemTextHover:c,colorItemTextHoverHorizontal:t,colorGroupTitle:$,colorItemTextSelected:t,colorItemTextSelectedHorizontal:t,colorItemBg:s,colorItemBgHover:d,colorItemBgActive:b,colorSubItemBg:u,colorItemBgSelected:p,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:a,colorActiveBarBorderSize:g,colorItemTextDisabled:r,colorDangerItemText:i,colorDangerItemTextHover:i,colorDangerItemTextSelected:i,colorDangerItemBgActive:m,colorDangerItemBgSelected:m,itemMarginInline:e.marginXXS}})(l);export{N as default};
