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

import classNames from 'classnames';
import ContentLoader from '../ContentLoader';
import { CLS_PREFIX } from '../../constants';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
/**
 * `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 = _ref => {
  let {
    baseClassName = `${CLS_PREFIX}extended-status-message`,
    className,
    intent,
    image,
    children = false,
    loading,
    ...props
  } = _ref;
  return /*#__PURE__*/_jsx("div", {
    className: `${baseClassName}__container`,
    children: /*#__PURE__*/_jsxs("div", {
      className: classNames(baseClassName, {
        [`${baseClassName}--${intent}`]: intent,
        [`${baseClassName}--loading`]: loading
      }, className),
      ...props,
      children: [image ? /*#__PURE__*/_jsx("div", {
        className: `${baseClassName}__image`,
        children: image
      }) : null, /*#__PURE__*/_jsx("div", {
        className: `${baseClassName}__body`,
        children: children
      }), loading && /*#__PURE__*/_jsx(ContentLoader, {
        overlay: true,
        text: loading === true ? null : loading
      })]
    })
  });
};
export default ExtendedStatusMessage;