import "../../../../@ant-design/cssinjs/es/extractStyle.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
import "react";
import "../../../../@ant-design/cssinjs/es/StyleContext.mjs";
import { unit as l } from "../../../../@ant-design/cssinjs/es/util/index.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useHMR.mjs";
import "../../../../rc-util/es/warning.mjs";
import "../../../../@ant-design/cssinjs/es/theme/createTheme.mjs";
import "../../../../@ant-design/cssinjs/es/theme/ThemeCache.mjs";
import "../../../../@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
import { getStyle as n } from "../../checkbox/style/index.mjs";
import { textEllipsis as a } from "../../style/index.mjs";
const d = (o) => {
  const {
    prefixCls: e,
    componentCls: r
  } = o, i = `${r}-menu-item`, t = `
  &${i}-expand ${i}-expand-icon,
  ${i}-loading-icon
`;
  return [
    // ==================== Checkbox ====================
    n(`${e}-checkbox`, o),
    {
      [r]: {
        // ================== Checkbox ==================
        "&-checkbox": {
          top: 0,
          marginInlineEnd: o.paddingXS
        },
        // ==================== Menu ====================
        // >>> Menus
        "&-menus": {
          display: "flex",
          flexWrap: "nowrap",
          alignItems: "flex-start",
          [`&${r}-menu-empty`]: {
            [`${r}-menu`]: {
              width: "100%",
              height: "auto",
              [i]: {
                color: o.colorTextDisabled
              }
            }
          }
        },
        // >>> Menu
        "&-menu": {
          flexGrow: 1,
          flexShrink: 0,
          minWidth: o.controlItemWidth,
          height: o.dropdownHeight,
          margin: 0,
          padding: o.menuPadding,
          overflow: "auto",
          verticalAlign: "top",
          listStyle: "none",
          "-ms-overflow-style": "-ms-autohiding-scrollbar",
          // https://github.com/ant-design/ant-design/issues/11857
          "&:not(:last-child)": {
            borderInlineEnd: `${l(o.lineWidth)} ${o.lineType} ${o.colorSplit}`
          },
          "&-item": Object.assign(Object.assign({}, a), {
            display: "flex",
            flexWrap: "nowrap",
            alignItems: "center",
            padding: o.optionPadding,
            lineHeight: o.lineHeight,
            cursor: "pointer",
            transition: `all ${o.motionDurationMid}`,
            borderRadius: o.borderRadiusSM,
            "&:hover": {
              background: o.controlItemBgHover
            },
            "&-disabled": {
              color: o.colorTextDisabled,
              cursor: "not-allowed",
              "&:hover": {
                background: "transparent"
              },
              [t]: {
                color: o.colorTextDisabled
              }
            },
            [`&-active:not(${i}-disabled)`]: {
              "&, &:hover": {
                fontWeight: o.optionSelectedFontWeight,
                backgroundColor: o.optionSelectedBg
              }
            },
            "&-content": {
              flex: "auto"
            },
            [t]: {
              marginInlineStart: o.paddingXXS,
              color: o.colorTextDescription,
              fontSize: o.fontSizeIcon
            },
            "&-keyword": {
              color: o.colorHighlight
            }
          })
        }
      }
    }
  ];
}, I = d;
export {
  I as default
};
