"use strict";

require("core-js/modules/es.object.define-property.js");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FcrBadge = void 0;
require("core-js/modules/es.array.concat.js");
require("./index.css");
var _jsxRuntime = require("react/jsx-runtime");
var FcrBadge = exports.FcrBadge = function FcrBadge(props) {
  var count = props.count,
    children = props.children,
    _props$maxShowCount = props.maxShowCount,
    maxShowCount = _props$maxShowCount === void 0 ? 99 : _props$maxShowCount,
    _props$unit = props.unit,
    unit = _props$unit === void 0 ? '+' : _props$unit,
    _props$minShowCount = props.minShowCount,
    minShowCount = _props$minShowCount === void 0 ? 0 : _props$minShowCount;
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
    className: "fcr-badge",
    children: [count > minShowCount && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      className: "fcr-badge-value",
      children: count <= 0 ? 0 : count > maxShowCount ? "".concat(maxShowCount).concat(unit) : count
    }), children]
  });
};