"use strict";

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

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

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

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

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

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 _classnames = _interopRequireDefault(require("classnames"));

// eslint-disable-next-line react/prefer-stateless-function
var Element = /*#__PURE__*/function (_React$Component) {
  (0, _inherits2["default"])(Element, _React$Component);

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

  function Element() {
    (0, _classCallCheck2["default"])(this, Element);
    return _super.apply(this, arguments);
  }

  (0, _createClass2["default"])(Element, [{
    key: "render",
    value: function render() {
      var _classNames, _classNames2;

      var _this$props = this.props,
          prefixCls = _this$props.prefixCls,
          className = _this$props.className,
          style = _this$props.style,
          size = _this$props.size,
          shape = _this$props.shape;
      var sizeCls = (0, _classnames["default"])((_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames));
      var shapeCls = (0, _classnames["default"])((_classNames2 = {}, (0, _defineProperty2["default"])(_classNames2, "".concat(prefixCls, "-circle"), shape === 'circle'), (0, _defineProperty2["default"])(_classNames2, "".concat(prefixCls, "-square"), shape === 'square'), (0, _defineProperty2["default"])(_classNames2, "".concat(prefixCls, "-round"), shape === 'round'), _classNames2));
      var sizeStyle = typeof size === 'number' ? {
        width: size,
        height: size,
        lineHeight: "".concat(size, "px")
      } : {};
      return /*#__PURE__*/React.createElement("span", {
        className: (0, _classnames["default"])(prefixCls, className, sizeCls, shapeCls),
        style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, sizeStyle), style)
      });
    }
  }]);
  return Element;
}(React.Component);

var _default = Element;
exports["default"] = _default;
//# sourceMappingURL=Element.js.map
