import { singleRow as n } from "../../style/index.mjs";
const a = (o) => {
  const { componentCls: t } = o, i = `${t}-select-popup`;
  return {
    [`${i}`]: {
      padding: o.space,
      [`${i}-all-option`]: {
        width: "100%",
        display: "inline-flex",
        cursor: "pointer",
        paddingInline: o.space,
        paddingBlock: o.spaceSM,
        [`${i}-all-option-label`]: {
          paddingInline: o.space
        }
      },
      [`${i}-option-outter`]: {
        borderRadius: o.antdv.borderRadiusSM,
        paddingInline: o.space
      },
      [`${i}-option-wrapper`]: {
        minHeight: "30px"
      },
      [`${i}-option-content-wrapper`]: {
        flex: 1,
        flexShrink: 1,
        minWidth: 0
      },
      [`${i}-option-label`]: {
        ...n(o),
        color: "inherit"
      },
      [`${i}-option-custom`]: {
        flex: 1,
        flexShrink: 1,
        minWidth: 0
      },
      [`${i}-option-action`]: {
        display: "none",
        color: o.colorPrimary,
        paddingInline: o.spaceSM,
        paddingBlock: o.spaceXXS,
        "&:hover": {
          background: o.colorPrimary,
          color: "#fff",
          borderRadius: "2px"
        }
      },
      "div.ant-select-item": {
        padding: 0,
        paddingBlockEnd: o.spaceXS,
        fontWeight: "normal !important",
        "&.ant-select-item-option-active:not(.ant-select-item-option-disabled)": {
          backgroundColor: "unset",
          [`& ${i}-option-outter`]: {
            backgroundColor: o.antdv.controlItemBgHover
          }
        },
        "&.ant-select-item-option-selected:not(.ant-select-item-option-disabled)": {
          backgroundColor: "unset",
          [`& ${i}-option-outter`]: {
            backgroundColor: o.antdv.controlItemBgActive
          }
        },
        "&.ant-select-item-option-disabled.ant-select-item-option-selected": {
          backgroundColor: "unset",
          [`& ${i}-option-outter`]: {
            backgroundColor: o.antdv.colorBgContainerDisabled
          }
        },
        "&:hover": {
          [`${i}-option-action`]: {
            display: "inline"
          }
        },
        "&:last-child": {
          paddingBlockEnd: 0
        }
      },
      [`&:has(${i}-all-option)`]: {
        "div.ant-select-item:first-child": {
          paddingBlockStart: o.spaceXS
        }
      }
    }
  };
};
export {
  a as genSelectStyle
};
