'use strict';

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

var icons = require('@transferwise/icons');
var art = require('@wise/art');
var StatusIcon = require('../statusIcon/StatusIcon.js');
var Circle = require('../common/circle/Circle.js');
var Image = require('../image/Image.js');
var jsxRuntime = require('react/jsx-runtime');

function BadgeAssets({
  status,
  flagCode,
  imgSrc,
  icon = null,
  type = 'action',
  size
}) {
  if (status) {
    return /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
      sentiment: status,
      size: size
    });
  }
  if (flagCode) {
    return /*#__PURE__*/jsxRuntime.jsx(Circle.default, {
      size: size,
      fixedSize: true,
      enableBorder: true,
      children: /*#__PURE__*/jsxRuntime.jsx(art.Flag, {
        code: flagCode,
        intrinsicSize: size
      })
    });
  }
  if (imgSrc) {
    return /*#__PURE__*/jsxRuntime.jsx(Circle.default, {
      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.default, {
      size: size,
      fixedSize: true,
      style: {
        backgroundColor: type === 'action' ? 'var(--color-interactive-accent)' : 'var(--color-background-neutral)',
        color: type === 'action' ? 'var(--color-interactive-control)' : 'var(--color-content-primary)'
      },
      children: icon ?? /*#__PURE__*/jsxRuntime.jsx(icons.Plus, {})
    });
  }
  return null;
}

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