/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.toAtlaskitBadgeProps = exports.default = void 0;
require("./index.compiled.css");
var React = _interopRequireWildcard(require("react"));
var _runtime = require("@compiled/react/runtime");
var _badge = _interopRequireDefault(require("@atlaskit/badge"));
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var badgeStyles = null;

/**
 * A base element that displays a visual indicator for a numeric value
 * @internal
 * @see StoryPoints
 * */

var BaseAtlaskitElementBadge = function BaseAtlaskitElementBadge(_ref) {
  var value = _ref.value,
    name = _ref.name,
    className = _ref.className,
    _ref$testId = _ref.testId,
    testId = _ref$testId === void 0 ? 'smart-element-atlaskit-badge' : _ref$testId;
  if (!value) {
    return null;
  }
  return /*#__PURE__*/React.createElement("span", {
    "data-smart-element": name,
    "data-smart-element-atlaskit-badge": true,
    "data-testid": testId
    // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
    ,
    className: (0, _runtime.ax)(["_4cvr1h6o _1e0c116y _1ul91ns9", className])
  }, /*#__PURE__*/React.createElement(_badge.default, null, value));
};
var _default = exports.default = BaseAtlaskitElementBadge;
var toAtlaskitBadgeProps = exports.toAtlaskitBadgeProps = function toAtlaskitBadgeProps(value) {
  return value ? {
    value: value
  } : undefined;
};