'use strict';

var StatusIcon = require('../statusIcon/StatusIcon.js');
var art = require('@wise/art');
var Circle = require('../common/circle/Circle.js');
var Image = require('../image/Image.js');
var icons = require('@transferwise/icons');
require('../common/theme.js');
require('../common/direction.js');
require('../common/propsValues/control.js');
require('../common/propsValues/breakpoint.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('clsx');
require('react');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');

function BadgeAssets({
  status,
  flagCode,
  imgSrc,
  icon = null,
  type = 'action',
  size: sizeProp
}) {
  // map to old size (sm, lg) to new ones (numeric)
  const size$1 = sizeProp === size.Size.LARGE ? 24 : 16;
  if (status) {
    return /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
      sentiment: status,
      size: size$1
    });
  }
  if (flagCode) {
    return /*#__PURE__*/jsxRuntime.jsx(Circle, {
      size: size$1,
      fixedSize: true,
      enableBorder: true,
      children: /*#__PURE__*/jsxRuntime.jsx(art.Flag, {
        code: flagCode,
        intrinsicSize: size$1
      })
    });
  }
  if (imgSrc) {
    return /*#__PURE__*/jsxRuntime.jsx(Circle, {
      size: size$1,
      fixedSize: true,
      enableBorder: true,
      children: /*#__PURE__*/jsxRuntime.jsx(Image.default, {
        src: imgSrc,
        alt: ""
      })
    });
  }
  if (['action', 'reference'].includes(type)) {
    return /*#__PURE__*/jsxRuntime.jsx(Circle, {
      size: size$1,
      fixedSize: true,
      style: {
        backgroundColor: type === 'action' ? 'var(--color-interactive-accent)' : 'var(--color-background-neutral)'
      },
      children: icon ?? /*#__PURE__*/jsxRuntime.jsx(icons.Plus, {})
    });
  }
  return null;
}

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