import '../../common/theme.mjs';
import '../../common/direction.mjs';
import '@transferwise/neptune-tokens';
import '../../common/propsValues/control.mjs';
import '../../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 { Sentiment } from '../../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 { BackslashCircle, GiftBox } from '@transferwise/icons';
import { clsx } from 'clsx';
import 'react';
import 'react-intl';
import '../../common/closeButton/CloseButton.messages.mjs';
import { jsx } from 'react/jsx-runtime';
import ProcessIndicator from '../../processIndicator/ProcessIndicator.mjs';
import StatusIcon from '../../statusIcon/StatusIcon.mjs';
import Body from '../../body/Body.mjs';
import { PrimitivePrompt } from '../PrimitivePrompt/PrimitivePrompt.mjs';

const InlinePrompt = ({
  sentiment = Sentiment.POSITIVE,
  muted = false,
  loading = false,
  className,
  children,
  media = null,
  mediaLabel,
  width = 'auto',
  'data-testid': dataTestId,
  ...restProps
}) => {
  const surfaceSentiment = sentiment === Sentiment.POSITIVE ? 'success' : sentiment;
  const renderMedia = () => {
    if (muted) {
      return /*#__PURE__*/jsx(BackslashCircle, {
        size: 16,
        "data-testid": "InlinePrompt_Muted",
        title: mediaLabel
      });
    }
    if (loading) {
      return /*#__PURE__*/jsx(ProcessIndicator, {
        "data-testid": "InlinePrompt_ProcessIndicator",
        size: "xxs",
        className: "wds-inline-prompt-process-indicator"
      });
    }
    if (sentiment === 'proposition') {
      return media || /*#__PURE__*/jsx(GiftBox, {
        title: mediaLabel
      });
    }
    return media || /*#__PURE__*/jsx(StatusIcon, {
      size: 16,
      sentiment: sentiment,
      iconLabel: mediaLabel
    });
  };
  return /*#__PURE__*/jsx(PrimitivePrompt, {
    sentiment: surfaceSentiment,
    media: renderMedia(),
    "data-testid": dataTestId,
    className: clsx('wds-inline-prompt', {
      'wds-inline-prompt--auto-width': width !== 'full',
      'wds-inline-prompt--muted': muted,
      'wds-inline-prompt--loading': loading
    }, className),
    ...restProps,
    children: /*#__PURE__*/jsx(Body, {
      children: children
    })
  });
};

export { InlinePrompt };
//# sourceMappingURL=InlinePrompt.mjs.map
