import _extends from "@babel/runtime/helpers/extends";
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
import React from 'react';
import classNames from 'classnames';
import { CLS_PREFIX } from '../../constants';

/**
 * `Alert` component is used for highlighting important content.
 *  For showing messages about state of the system it is recommended to use [StatusMessage](#!/StatusMessage)
 *  or [ExtendedStatusMessage](#!/ExtendedStatusMessage).
 * @since 0.0.35
 */
const Alert = ({
  baseClassName = `${CLS_PREFIX}alert`,
  className,
  intent,
  children,
  onClose,
  ...props
}) => /*#__PURE__*/React.createElement("div", _extends({
  className: classNames(baseClassName, {
    [`${baseClassName}--${intent}`]: intent
  }, className)
}, props), onClose && /*#__PURE__*/React.createElement("span", {
  className: "close",
  onClick: onClose
}), children);

export default Alert;