import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

/**
 * BreadcrumbItem.jsx
 *
 * @Author: zhangce
 * @Date: 18/1/23 下午2:44
 */
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Button from '../button';
/**
 * BreadcrumbItem
 * */

var BreadcrumbItem =
/*#__PURE__*/
function (_React$PureComponent) {
  _inherits(BreadcrumbItem, _React$PureComponent);

  function BreadcrumbItem() {
    _classCallCheck(this, BreadcrumbItem);

    return _possibleConstructorReturn(this, _getPrototypeOf(BreadcrumbItem).apply(this, arguments));
  }

  _createClass(BreadcrumbItem, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          prefixCls = _this$props.prefixCls,
          className = _this$props.className,
          separator = _this$props.separator,
          children = _this$props.children,
          other = _objectWithoutProperties(_this$props, ["prefixCls", "className", "separator", "children"]);

      var classes = classNames(prefixCls, className);
      return React.createElement("span", {
        className: classes
      }, React.createElement(Button, _extends({
        variant: "text",
        className: "".concat(prefixCls, "-button")
      }, other), children), React.createElement("span", {
        className: "".concat(prefixCls, "-separator")
      }, separator));
    }
  }]);

  return BreadcrumbItem;
}(React.PureComponent);

_defineProperty(BreadcrumbItem, "propTypes", {
  /**
   * 类前缀
   * */
  prefixCls: PropTypes.string,

  /**
   * 类名
   * */
  className: PropTypes.string,

  /**
   * 分隔符
   * */
  separator: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),

  /**
   * 跳转链接
   * */
  href: PropTypes.string
});

_defineProperty(BreadcrumbItem, "defaultProps", {
  prefixCls: 'ne-breadcrumb-item'
});

export default BreadcrumbItem;