import { prepareComponentToken as r, prepareToken as m } from "./index.mjs";
import { genCompactItemStyle as l } from "../../style/compact-item.mjs";
import { genCompactItemVerticalStyle as p } from "../../style/compact-item-vertical.mjs";
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 e } 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 { genSubStyleComponent as n } from "../../theme/util/genComponentStyleHook.mjs";
const a = (t) => {
  const {
    componentCls: i,
    calc: o
  } = t;
  return {
    [i]: {
      // Special styles for Primary Button
      [`&-compact-item${i}-primary`]: {
        [`&:not([disabled]) + ${i}-compact-item${i}-primary:not([disabled])`]: {
          position: "relative",
          "&:before": {
            position: "absolute",
            top: o(t.lineWidth).mul(-1).equal(),
            insetInlineStart: o(t.lineWidth).mul(-1).equal(),
            display: "inline-block",
            width: t.lineWidth,
            height: `calc(100% + ${e(t.lineWidth)} * 2)`,
            backgroundColor: t.colorPrimaryHover,
            content: '""'
          }
        }
      },
      // Special styles for Primary Button
      "&-compact-vertical-item": {
        [`&${i}-primary`]: {
          [`&:not([disabled]) + ${i}-compact-vertical-item${i}-primary:not([disabled])`]: {
            position: "relative",
            "&:before": {
              position: "absolute",
              top: o(t.lineWidth).mul(-1).equal(),
              insetInlineStart: o(t.lineWidth).mul(-1).equal(),
              display: "inline-block",
              width: `calc(100% + ${e(t.lineWidth)} * 2)`,
              height: t.lineWidth,
              backgroundColor: t.colorPrimaryHover,
              content: '""'
            }
          }
        }
      }
    }
  };
}, T = n(["Button", "compact"], (t) => {
  const i = m(t);
  return [
    // Space Compact
    l(i),
    p(i),
    a(i)
  ];
}, r);
export {
  T as default
};
