"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Badge = Badge;

var _jsxRuntime = require("react/jsx-runtime");

function Badge(_ref) {
  var text = _ref.text,
      value = _ref.value,
      _ref$size = _ref.size,
      size = _ref$size === void 0 ? "sm" : _ref$size,
      dot = _ref.dot,
      title = _ref.title,
      className = _ref.className,
      _ref$colorClass = _ref.colorClass,
      colorClass = _ref$colorClass === void 0 ? "bg-indigo-100 text-indigo-800" : _ref$colorClass,
      _ref$roundedClass = _ref.roundedClass,
      roundedClass = _ref$roundedClass === void 0 ? "rounded" : _ref$roundedClass;
  var spanClassname = "text-xs px-1.5";
  var svgClassName = "-ml-0.5 mr-1.5 h-2 w-2";

  if (size === "sm") {
    spanClassname = "text-sm px-2.5";
    svgClassName = "mr-1.5 h-2 w-2";
  }

  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
      className: "".concat(className, " ").concat(spanClassname, " inline-flex items-center py-0.5 ").concat(roundedClass, " font-medium ").concat(colorClass),
      title: title,
      children: [dot != null && /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
        className: "".concat(svgClassName, " text-indigo-400\" fill=\"").concat(dot, "\" viewBox=\"0 0 8 8\""),
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
          cx: 4,
          cy: 4,
          r: 3
        })
      }), text]
    }), value != null && ": ".concat(value)]
  });
}