import { Download, ArrowRight, Check } from '@transferwise/icons';
import { clsx } from 'clsx';
import Body from '../body/Body.mjs';
import '../common/theme.mjs';
import '../common/direction.mjs';
import '@transferwise/neptune-tokens';
import '../common/propsValues/control.mjs';
import '../common/propsValues/size.mjs';
import { Typography } from '../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 '@transferwise/formatting';
import 'react';
import 'react-intl';
import '../common/closeButton/CloseButton.messages.mjs';
import { jsxs, jsx } from 'react/jsx-runtime';
import AvatarView from '../avatarView/AvatarView.mjs';

const PromoCardIndicator = ({
  className,
  children,
  label,
  icon,
  isSmall = false,
  testid,
  ...rest
}) => {
  const isIconString = icon && typeof icon === 'string';
  const IconComponent = isIconString && {
    check: Check,
    arrow: ArrowRight,
    download: Download
  }[icon];
  return /*#__PURE__*/jsxs("div", {
    className: clsx('np-Card-indicator', className),
    "data-testid": testid,
    ...rest,
    children: [label && /*#__PURE__*/jsx(Body, {
      as: "span",
      type: Typography.BODY_LARGE_BOLD,
      className: "np-Card-indicatorText",
      children: label
    }), icon && /*#__PURE__*/jsx(AvatarView, {
      interactive: true,
      size: isSmall ? 40 : 56,
      style: {
        backgroundColor: 'var(--Card-indicator-icon-background-color)'
      },
      className: "np-Card-indicatorIcon",
      children: IconComponent ? /*#__PURE__*/jsx(IconComponent, {
        size: 24,
        "aria-hidden": "true"
      }) : icon
    }), children]
  });
};

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