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 ContentLoader from '../ContentLoader';
import { CLS_PREFIX } from '../../constants';

/**
 * `ExtendedStatusMessage` component is similar to regular [StatusMessage](#!/StatusMessage)
 * but it is used when the message itself is the primary content on the page.
 * @since 0.0.35
 */
const ExtendedStatusMessage = ({
  baseClassName = `${CLS_PREFIX}extended-status-message`,
  className,
  intent,
  image,
  children = false,
  loading,
  ...props
}) => /*#__PURE__*/React.createElement("div", {
  className: `${baseClassName}__container`
}, /*#__PURE__*/React.createElement("div", _extends({
  className: classNames(baseClassName, {
    [`${baseClassName}--${intent}`]: intent,
    [`${baseClassName}--loading`]: loading
  }, className)
}, props), image ? /*#__PURE__*/React.createElement("div", {
  className: `${baseClassName}__image`
}, image) : null, /*#__PURE__*/React.createElement("div", {
  className: `${baseClassName}__body`
}, children), loading && /*#__PURE__*/React.createElement(ContentLoader, {
  overlay: true,
  text: loading === true ? null : loading
})));

export default ExtendedStatusMessage;