import { Plus } from '@transferwise/icons';
import { Flag } from '@wise/art';
import StatusIcon from '../statusIcon/StatusIcon.mjs';
import Circle from '../common/circle/Circle.mjs';
import Image from '../image/Image.mjs';
import { jsx } from 'react/jsx-runtime';

function BadgeAssets({
  status,
  flagCode,
  imgSrc,
  icon = null,
  type = 'action',
  size
}) {
  if (status) {
    return /*#__PURE__*/jsx(StatusIcon, {
      sentiment: status,
      size: size
    });
  }
  if (flagCode) {
    return /*#__PURE__*/jsx(Circle, {
      size: size,
      fixedSize: true,
      enableBorder: true,
      children: /*#__PURE__*/jsx(Flag, {
        code: flagCode,
        intrinsicSize: size
      })
    });
  }
  if (imgSrc) {
    return /*#__PURE__*/jsx(Circle, {
      size: size,
      fixedSize: true,
      enableBorder: true,
      children: /*#__PURE__*/jsx(Image, {
        src: imgSrc,
        alt: ""
      })
    });
  }
  if (['action', 'reference'].includes(type)) {
    return /*#__PURE__*/jsx(Circle, {
      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__*/jsx(Plus, {})
    });
  }
  return null;
}

export { BadgeAssets as default };
//# sourceMappingURL=BadgeAssets.mjs.map
