import { genComponentStyleHook as a } from "../../../utils/cssinjs/index.mjs";
const o = (i) => {
  const { componentCls: e } = i, l = `${e}-wrapper`, r = `${e}-inner-wrapper`;
  return {
    [l]: {
      textWrap: "nowrap",
      whiteSpace: "nowrap",
      display: "inline-flex",
      maxWidth: "100%",
      [r]: {
        borderRadius: i.borderRadius,
        boxSizing: "border-box",
        overflow: "hidden",
        textOverflow: "ellipsis",
        width: "100%",
        "&--large": {
          padding: i.spaceSM,
          lineHeight: i.lineHeightLG,
          fontSize: i.fontSizeLG
        },
        "&--middle": {
          lineHeight: i.lineHeight,
          paddingInline: i.spaceSM,
          paddingBlock: i.calc(i.spaceSM).div(2).equal(),
          fontSize: i.fontSize
        },
        "&--small": {
          paddingInline: i.spaceXS,
          paddingBlock: 0,
          lineHeight: i.lineHeight,
          fontSize: i.fontSize,
          borderRadius: i.borderRadiusSM
        }
      }
    },
    [`${l}-purely`]: {
      "& > *": {
        backgroundColor: "var(--tag-main-color-background)",
        color: i.textColor1
      },
      [`${r}--disabled`]: {
        backgroundColor: i.calc(i.textColor3).colorMix(15, "white")
      }
    },
    [`${l}-border`]: {
      "& > *": {
        outline: `${i.lineWidth} ${i.lineType} var(--tag-main-color)`,
        outlineOffset: i.calc(i.lineWidth).mul(-1).equal(),
        backgroundColor: "var(--tag-main-color-opacity)",
        color: "var(--tag-main-color)"
      },
      [`${r}--disabled`]: {
        outline: `${i.lineWidth} ${i.lineType} ${i.borderColorBase}`,
        outlineOffset: i.calc(i.lineWidth).mul(-1).equal(),
        backgroundColor: i.calc(i.textColor2).colorMix(6, "white"),
        color: i.textColor2
      }
    }
  };
}, c = a("ApTag", (i) => [
  o(i)
]);
export {
  c as default,
  o as genApTagStyle
};
