import { GiftBox } from '@transferwise/icons';
import AvatarView from '../../avatarView/AvatarView.mjs';
import Image from '../../image/Image.mjs';
import StatusIcon from '../../statusIcon/StatusIcon.mjs';
import { jsx } from 'react/jsx-runtime';

function renderPromptMedia({
  media,
  sentiment,
  mediaId,
  imgClassName
}) {
  if (media?.imgSrc) {
    return /*#__PURE__*/jsx(Image, {
      id: mediaId,
      src: media.imgSrc,
      className: imgClassName,
      alt: media['aria-label'] ?? ''
    });
  }
  if (media?.avatar) {
    const badge = media.avatar.badge ? media.avatar.badge : sentiment === 'proposition' ? {} : {
      status: sentiment
    };
    return /*#__PURE__*/jsx(AvatarView, {
      ...media.avatar,
      badge: badge,
      "aria-label": media['aria-label'],
      "aria-hidden": media['aria-hidden'],
      id: mediaId,
      size: 48,
      children: media.avatar.asset
    });
  }
  return sentiment === 'proposition' ? /*#__PURE__*/jsx(AvatarView, {
    id: mediaId,
    size: 48,
    "aria-label": media['aria-label'],
    "aria-hidden": media['aria-hidden'],
    children: /*#__PURE__*/jsx(GiftBox, {})
  }) : /*#__PURE__*/jsx(StatusIcon, {
    id: mediaId,
    size: 48,
    sentiment: sentiment,
    iconLabel: media['aria-hidden'] ? null : media['aria-label']
  });
}

export { renderPromptMedia };
//# sourceMappingURL=promptMedia.mjs.map
