"use strict";

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

var _core = require("@emotion/core");

var _propTypes = _interopRequireDefault(require("prop-types"));

var _core2 = require("@material-ui/core");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _templateObject() {
  var data = _taggedTemplateLiteral(["\n  background-color: #ffffff;\n  span {\n    background-color: ", ";\n  }\n"]);

  _templateObject = function _templateObject() {
    return data;
  };

  return data;
}

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var badgeClass = function badgeClass(color) {
  return (0, _core.css)(_templateObject(), color);
};

function Badge(_ref) {
  var children = _ref.children,
      value = _ref.value,
      color = _ref.color;
  return (0, _core.jsx)(_core2.Badge, {
    css: badgeClass(color),
    badgeContent: value,
    color: "primary"
  }, children);
}

Badge.defaultProps = {
  value: 42,
  color: "#AAA4AB"
};
Badge.propTypes = {
  children: _propTypes["default"].node.isRequired,
  value: _propTypes["default"].number,
  color: _propTypes["default"].string
};
var _default = Badge;
exports["default"] = _default;