"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));

var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));

var React = _interopRequireWildcard(require("react"));

var _configProvider = require("../config-provider");

var BreadcrumbSeparator = /*#__PURE__*/function (_React$Component) {
  (0, _inherits2["default"])(BreadcrumbSeparator, _React$Component);

  var _super = (0, _createSuper2["default"])(BreadcrumbSeparator);

  function BreadcrumbSeparator() {
    var _this;

    (0, _classCallCheck2["default"])(this, BreadcrumbSeparator);
    _this = _super.apply(this, arguments);

    _this.renderSeparator = function (_ref) {
      var getPrefixCls = _ref.getPrefixCls;
      var children = _this.props.children;
      var prefixCls = getPrefixCls('breadcrumb');
      return /*#__PURE__*/React.createElement("span", {
        className: "".concat(prefixCls, "-separator")
      }, children || '/');
    };

    return _this;
  }

  (0, _createClass2["default"])(BreadcrumbSeparator, [{
    key: "render",
    value: function render() {
      return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, this.renderSeparator);
    }
  }]);
  return BreadcrumbSeparator;
}(React.Component);

exports["default"] = BreadcrumbSeparator;
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;