import StatusIcon from '../statusIcon/StatusIcon.mjs';
import { Flag } from '@wise/art';
import Circle from '../common/circle/Circle.mjs';
import Image from '../image/Image.mjs';
import { Plus } from '@transferwise/icons';
import '../common/theme.mjs';
import '../common/direction.mjs';
import '../common/propsValues/control.mjs';
import '../common/propsValues/breakpoint.mjs';
import { Size } from '../common/propsValues/size.mjs';
import '../common/propsValues/typography.mjs';
import '../common/propsValues/width.mjs';
import '../common/propsValues/type.mjs';
import '../common/propsValues/dateMode.mjs';
import '../common/propsValues/monthFormat.mjs';
import '../common/propsValues/position.mjs';
import '../common/propsValues/layouts.mjs';
import '../common/propsValues/status.mjs';
import '../common/propsValues/sentiment.mjs';
import '../common/propsValues/profileType.mjs';
import '../common/propsValues/variant.mjs';
import '../common/propsValues/scroll.mjs';
import '../common/propsValues/markdownNodeType.mjs';
import '../common/fileType.mjs';
import 'clsx';
import 'react';
import 'react-intl';
import '../common/closeButton/CloseButton.messages.mjs';
import { jsx } from '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 = sizeProp === Size.LARGE ? 24 : 16;
  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)'
      },
      children: icon ?? /*#__PURE__*/jsx(Plus, {})
    });
  }
  return null;
}

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