'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var clsx = require('clsx');
require('../common/theme.js');
require('../common/direction.js');
require('../common/propsValues/control.js');
require('../common/propsValues/breakpoint.js');
var size = require('../common/propsValues/size.js');
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');
var sentiment = 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('@transferwise/icons');
require('react');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');
var StatusIcon = require('../statusIcon/StatusIcon.js');
var Body = require('../body/Body.js');

const iconTypes = new Set([sentiment.Sentiment.NEGATIVE, sentiment.Sentiment.ERROR, sentiment.Sentiment.POSITIVE, sentiment.Sentiment.SUCCESS, sentiment.Sentiment.WARNING]);
/**
 * @deprecated Use [<InlinePrompt />](https://storybook.wise.design/?path=/docs/prompts-inlineprompt--docs) or [<Field />](https://storybook.wise.design/?path=/docs/forms-field--docs) instead.
 */
function InlineAlert({
  id,
  type = 'neutral',
  iconLabel,
  className,
  children
}) {
  return /*#__PURE__*/jsxRuntime.jsxs(Body.default, {
    role: "alert",
    id: id,
    className: clsx.clsx('alert alert-detach', `alert-${type === sentiment.Sentiment.NEGATIVE || type === sentiment.Sentiment.ERROR ? 'danger' : type}`, 'd-flex', className),
    children: [iconTypes.has(type) && /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
      sentiment: type,
      size: size.Size.SMALL,
      iconLabel: iconLabel
    }), /*#__PURE__*/jsxRuntime.jsx("div", {
      children: children
    })]
  });
}

exports.default = InlineAlert;
//# sourceMappingURL=InlineAlert.js.map
