'use strict';

var clsx = require('clsx');
var Circle = require('../common/circle/Circle.js');
var jsxRuntime = require('react/jsx-runtime');
var size = require('../common/propsValues/size.js');
var theme = require('../common/theme.js');

const mapLegacySize = {
  [String(size.Size.SMALL)]: 16,
  // medium is deprecated, so we map it to small
  [String(size.Size.MEDIUM)]: 16,
  [String(size.Size.LARGE)]: 24
};
const Badge = ({
  badge,
  className = undefined,
  size: sizeProp = size.Size.SMALL,
  border = theme.Theme.LIGHT,
  'aria-label': ariaLabel,
  children
}) => {
  // medium is deprecated, so we map it to small
  const size$1 = sizeProp === size.Size.MEDIUM ? size.Size.SMALL : sizeProp;
  const classes = clsx.clsx('tw-badge', {
    [`tw-badge-border-${border}`]: border,
    [`tw-badge-${size$1}`]: size$1
  }, className);
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
    "aria-label": ariaLabel,
    className: classes,
    children: [/*#__PURE__*/jsxRuntime.jsx("div", {
      className: "tw-badge__children",
      children: children
    }), /*#__PURE__*/jsxRuntime.jsx(Circle, {
      size: mapLegacySize[size$1],
      fixedSize: true,
      className: "tw-badge__content",
      children: badge
    })]
  });
};

module.exports = Badge;
//# sourceMappingURL=Badge.js.map
