import _extends from "@babel/runtime/helpers/extends";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
var _excluded = ["className", "color", "size", "borderColor", "borderTint"];

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

import React, { PureComponent } from 'react';
import Box from '../box';
import cx from 'classnames';
import theme from './theme.css';

var Bullet = /*#__PURE__*/function (_PureComponent) {
  _inherits(Bullet, _PureComponent);

  var _super = _createSuper(Bullet);

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

    return _super.apply(this, arguments);
  }

  _createClass(Bullet, [{
    key: "render",
    value: function render() {
      var _cx;

      var _this$props = this.props,
          className = _this$props.className,
          _this$props$color = _this$props.color,
          color = _this$props$color === void 0 ? 'neutral' : _this$props$color,
          _this$props$size = _this$props.size,
          size = _this$props$size === void 0 ? 'medium' : _this$props$size,
          borderColor = _this$props.borderColor,
          borderTint = _this$props.borderTint,
          others = _objectWithoutProperties(_this$props, _excluded);

      var classNames = cx(theme['bullet'], theme[color], theme[size], (_cx = {}, _defineProperty(_cx, theme["border-".concat(borderColor, "-").concat(borderTint)], borderColor && borderTint), _defineProperty(_cx, theme["border-".concat(borderColor)], borderColor && !borderTint), _cx), className);
      return /*#__PURE__*/React.createElement(Box, _extends({
        "data-teamleader-ui": "bullet",
        className: classNames,
        element: "span"
      }, others));
    }
  }]);

  return Bullet;
}(PureComponent);

export default Bullet;