'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');
var jsxRuntime = require('react/jsx-runtime');

function BadgeAssets({
  status,
  flagCode,
  imgSrc,
  icon = null,
  type = 'action',
  size
}) {
  if (status) {
    return /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
      sentiment: status,
      size: size
    });
  }
  if (flagCode) {
    return /*#__PURE__*/jsxRuntime.jsx(Circle, {
      size: size,
      fixedSize: true,
      enableBorder: true,
      children: /*#__PURE__*/jsxRuntime.jsx(art.Flag, {
        code: flagCode,
        intrinsicSize: size
      })
    });
  }
  if (imgSrc) {
    return /*#__PURE__*/jsxRuntime.jsx(Circle, {
      size: size,
      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,
      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
