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 a } 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 { resetComponent as n, genFocusStyle as e } from "../../style/index.mjs";
import { genStyleHooks as t } from "../../theme/util/genComponentStyleHook.mjs";
import { merge as c } from "../../theme/util/statistic.mjs";
const m = (r) => {
  const {
    componentCls: o,
    iconCls: i,
    calc: l
  } = r;
  return {
    [o]: Object.assign(Object.assign({}, n(r)), {
      color: r.itemColor,
      fontSize: r.fontSize,
      [i]: {
        fontSize: r.iconFontSize
      },
      ol: {
        display: "flex",
        flexWrap: "wrap",
        margin: 0,
        padding: 0,
        listStyle: "none"
      },
      a: Object.assign({
        color: r.linkColor,
        transition: `color ${r.motionDurationMid}`,
        padding: `0 ${a(r.paddingXXS)}`,
        borderRadius: r.borderRadiusSM,
        height: r.fontHeight,
        display: "inline-block",
        marginInline: l(r.marginXXS).mul(-1).equal(),
        "&:hover": {
          color: r.linkHoverColor,
          backgroundColor: r.colorBgTextHover
        }
      }, e(r)),
      "li:last-child": {
        color: r.lastItemColor
      },
      [`${o}-separator`]: {
        marginInline: r.separatorMargin,
        color: r.separatorColor
      },
      [`${o}-link`]: {
        [`
          > ${i} + span,
          > ${i} + a
        `]: {
          marginInlineStart: r.marginXXS
        }
      },
      [`${o}-overlay-link`]: {
        borderRadius: r.borderRadiusSM,
        height: r.fontHeight,
        display: "inline-block",
        padding: `0 ${a(r.paddingXXS)}`,
        marginInline: l(r.marginXXS).mul(-1).equal(),
        [`> ${i}`]: {
          marginInlineStart: r.marginXXS,
          fontSize: r.fontSizeIcon
        },
        "&:hover": {
          color: r.linkHoverColor,
          backgroundColor: r.colorBgTextHover,
          a: {
            color: r.linkHoverColor
          }
        },
        a: {
          "&:hover": {
            backgroundColor: "transparent"
          }
        }
      },
      // rtl style
      [`&${r.componentCls}-rtl`]: {
        direction: "rtl"
      }
    })
  };
}, p = (r) => ({
  itemColor: r.colorTextDescription,
  lastItemColor: r.colorText,
  iconFontSize: r.fontSize,
  linkColor: r.colorTextDescription,
  linkHoverColor: r.colorText,
  separatorColor: r.colorTextDescription,
  separatorMargin: r.marginXS
}), T = t("Breadcrumb", (r) => {
  const o = c(r, {});
  return m(o);
}, p);
export {
  T as default,
  p as prepareComponentToken
};
