"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 _ContentLoader = _interopRequireDefault(require("../ContentLoader"));
var _constants = require("../../constants");
var _jsxRuntime = require("react/jsx-runtime");
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

/**
 * `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 = `${_constants.CLS_PREFIX}extended-status-message`,
    className,
    intent,
    image,
    children = false,
    loading,
    ...props
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: `${baseClassName}__container`,
    children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      className: (0, _classnames.default)(baseClassName, {
        [`${baseClassName}--${intent}`]: intent,
        [`${baseClassName}--loading`]: loading
      }, className),
      ...props,
      children: [image ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: `${baseClassName}__image`,
        children: image
      }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: `${baseClassName}__body`,
        children: children
      }), loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ContentLoader.default, {
        overlay: true,
        text: loading === true ? null : loading
      })]
    })
  });
};
var _default = exports.default = ExtendedStatusMessage;