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

import classNames from 'classnames';
import { CLS_PREFIX } from '../../constants';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
/**
 * `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 = _ref => {
  let {
    baseClassName = `${CLS_PREFIX}alert`,
    className,
    intent,
    children,
    onClose,
    ...props
  } = _ref;
  return /*#__PURE__*/_jsxs("div", {
    className: classNames(baseClassName, {
      [`${baseClassName}--${intent}`]: intent
    }, className),
    ...props,
    children: [onClose && /*#__PURE__*/_jsx("span", {
      className: "close",
      onClick: onClose
    }), children]
  });
};
export default Alert;