// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

import classNames from 'classnames';
import Alert from '../Alert';
import Icon from '../Icon';
import { CLS_PREFIX } from '../../constants';
import { intentIconMap } from '../intentIconMap';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
/**
 * `StatusMessage` is used for notifying users about events happened (or going to happen) in the system.
 * For showing results of performed operations [Toaster](#!/Toaster) should be used.
 * @since 1.12.0
 */
const StatusMessage = _ref => {
  let {
    baseClassName = `${CLS_PREFIX}status-message`,
    className,
    intent,
    children,
    ...props
  } = _ref;
  return /*#__PURE__*/_jsxs(Alert, {
    className: classNames(baseClassName, [`${baseClassName}--${intent}`], className),
    intent: intent,
    ...props,
    children: [/*#__PURE__*/_jsx(Icon, {
      name: intentIconMap[intent],
      className: `${baseClassName}__icon`
    }), children]
  });
};
export default StatusMessage;