'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var clsx = require('clsx');
var theme = require('../common/theme.js');
require('../common/direction.js');
require('@transferwise/neptune-tokens');
require('../common/propsValues/control.js');
var size = require('../common/propsValues/size.js');
require('../common/propsValues/typography.js');
require('../common/propsValues/width.js');
require('../common/propsValues/type.js');
require('../common/propsValues/dateMode.js');
require('../common/propsValues/monthFormat.js');
require('../common/propsValues/position.js');
require('../common/propsValues/layouts.js');
require('../common/propsValues/status.js');
require('../common/propsValues/sentiment.js');
require('../common/propsValues/profileType.js');
require('../common/propsValues/variant.js');
require('../common/propsValues/scroll.js');
require('../common/propsValues/markdownNodeType.js');
require('../common/fileType.js');
require('@transferwise/formatting');
require('@transferwise/icons');
require('react');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');

const mapLegacySize = {
  16: size.Size.SMALL,
  24: size.Size.LARGE,
  // medium is no longer exists, so we map it to small
  [String(size.Size.MEDIUM)]: size.Size.SMALL
};
// Note: Badge component is not deprecated, we want stop it's direct usage on consumer side.
// Deprecation notice will hint consumers to migrate. Eventually the component will become internal.
/**
 * @deprecated Use `<AvatarView badge={..} />` instead.
 */
const Badge = ({
  badge,
  className = undefined,
  size: sizeProp = size.Size.SMALL,
  border = theme.Theme.LIGHT,
  'aria-label': ariaLabel,
  children,
  style
}) => {
  const size = mapLegacySize[sizeProp] ?? sizeProp;
  const classes = clsx.clsx('tw-badge', {
    [`tw-badge-border-${border}`]: border,
    [`tw-badge-${size}`]: size
  }, className);
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
    "aria-label": ariaLabel,
    className: classes,
    style: style,
    children: [/*#__PURE__*/jsxRuntime.jsx("div", {
      className: "tw-badge__children",
      children: children
    }), /*#__PURE__*/jsxRuntime.jsx("div", {
      className: "tw-badge__content",
      children: badge
    })]
  });
};

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