"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _Alert = _interopRequireDefault(require("../Alert"));
var _Icon = _interopRequireDefault(require("../Icon"));
var _constants = require("../../constants");
var _intentIconMap = require("../intentIconMap");
var _jsxRuntime = require("react/jsx-runtime");
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

/**
 * `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 = `${_constants.CLS_PREFIX}status-message`,
    className,
    intent,
    children,
    ...props
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Alert.default, {
    className: (0, _classnames.default)(baseClassName, [`${baseClassName}--${intent}`], className),
    intent: intent,
    ...props,
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
      name: _intentIconMap.intentIconMap[intent],
      className: `${baseClassName}__icon`
    }), children]
  });
};
var _default = exports.default = StatusMessage;