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