'use strict';

var icons = require('@transferwise/icons');
var clsx = require('clsx');
var avatarTypes = require('../avatar/avatarTypes.js');
var Avatar = require('../avatar/Avatar.js');
var Body = require('../body/Body.js');
require('../common/theme.js');
require('../common/direction.js');
require('../common/propsValues/control.js');
require('../common/propsValues/breakpoint.js');
require('../common/propsValues/size.js');
var typography = require('../common/propsValues/typography.js');
require('../common/propsValues/width.js');
require('../common/propsValues/type.js');
require('../common/propsValues/dateMode.js');
require('../common/propsValues/monthFormat.js');
require('../common/propsValues/position.js');
require('../common/propsValues/layouts.js');
require('../common/propsValues/status.js');
require('../common/propsValues/sentiment.js');
require('../common/propsValues/profileType.js');
require('../common/propsValues/variant.js');
require('../common/propsValues/scroll.js');
require('../common/propsValues/markdownNodeType.js');
require('../common/fileType.js');
require('react');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');

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

module.exports = PromoCardIndicator;
//# sourceMappingURL=PromoCardIndicator.js.map
