const o = (n, r) => ({
  // Border
  [`> span, > ${n}`]: {
    "&:not(:last-child)": {
      [`&, & > ${n}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: r
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${n}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: r
        }
      }
    }
  }
}), a = (n) => {
  const {
    componentCls: r,
    fontSize: t,
    lineWidth: e,
    groupBorderColor: d,
    colorErrorHover: i
  } = n;
  return {
    [`${r}-group`]: [
      {
        position: "relative",
        display: "inline-flex",
        // Border
        [`> span, > ${r}`]: {
          "&:not(:last-child)": {
            [`&, & > ${r}`]: {
              borderStartEndRadius: 0,
              borderEndEndRadius: 0
            }
          },
          "&:not(:first-child)": {
            marginInlineStart: n.calc(e).mul(-1).equal(),
            [`&, & > ${r}`]: {
              borderStartStartRadius: 0,
              borderEndStartRadius: 0
            }
          }
        },
        [r]: {
          position: "relative",
          zIndex: 1,
          "&:hover,\n          &:focus,\n          &:active": {
            zIndex: 2
          },
          "&[disabled]": {
            zIndex: 0
          }
        },
        [`${r}-icon-only`]: {
          fontSize: t
        }
      },
      // Border Color
      o(`${r}-primary`, d),
      o(`${r}-danger`, i)
    ]
  };
}, l = a;
export {
  l as default
};
