import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _extends from "@babel/runtime/helpers/esm/extends";
import { genComponentStyleHook, mergeToken } from '../../theme';
import { resetComponent } from '../../style/css';

var genBreadcrumbStyle = function genBreadcrumbStyle(token) {
  var _extends2;

  var componentCls = token.componentCls,
      iconCls = token.iconCls;
  return _defineProperty({}, componentCls, _extends(_extends({}, resetComponent(token)), (_extends2 = {
    color: token.breadcrumbBaseColor,
    fontSize: token.breadcrumbFontSize
  }, _defineProperty(_extends2, iconCls, {
    fontSize: token.breadcrumbIconFontSize
  }), _defineProperty(_extends2, "ol", {
    display: 'flex',
    flexWrap: 'wrap',
    margin: 0,
    padding: 0,
    listStyle: 'none'
  }), _defineProperty(_extends2, "a", {
    color: token.breadcrumbLinkColor,
    transition: "color ".concat(token.motionDurationSlow),
    '&:hover': {
      color: token.breadcrumbLinkColorHover
    }
  }), _defineProperty(_extends2, 'li:last-child', {
    color: token.breadcrumbLastItemColor,
    a: {
      color: token.breadcrumbLastItemColor
    }
  }), _defineProperty(_extends2, "li:last-child > ".concat(componentCls, "-separator"), {
    display: 'none'
  }), _defineProperty(_extends2, "".concat(componentCls, "-separator"), {
    marginInline: token.breadcrumbSeparatorMargin,
    color: token.breadcrumbSeparatorColor
  }), _defineProperty(_extends2, "".concat(componentCls, "-link"), _defineProperty({}, "\n        > ".concat(iconCls, " + span,\n        > ").concat(iconCls, " + a\n       "), {
    marginInlineStart: token.marginXXS
  })), _defineProperty(_extends2, "".concat(componentCls, "-overlay-link"), _defineProperty({}, "> ".concat(iconCls), {
    marginInlineStart: token.marginXXS
  })), _defineProperty(_extends2, "&".concat(token.componentCls, "-rtl"), {
    direction: 'rtl'
  }), _extends2)));
}; // ============================== Export ==============================


export default genComponentStyleHook('Breadcrumb', function (token) {
  var BreadcrumbToken = mergeToken(token, {
    breadcrumbBaseColor: token.colorTextSecondary,
    breadcrumbFontSize: token.fontSizeBase,
    breadcrumbIconFontSize: token.fontSizeBase,
    breadcrumbLinkColor: token.colorTextSecondary,
    breadcrumbLinkColorHover: token.colorText,
    breadcrumbLastItemColor: token.colorText,
    breadcrumbSeparatorMargin: token.paddingXS,
    breadcrumbSeparatorColor: token.colorTextSecondary
  });
  return [genBreadcrumbStyle(BreadcrumbToken)];
});