"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _ContentLoader = _interopRequireDefault(require("../ContentLoader"));

var _constants = require("../../constants");

// Copyright 1999-2020. 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 = ({
  baseClassName = "".concat(_constants.CLS_PREFIX, "extended-status-message"),
  className,
  intent,
  image,
  children = false,
  loading,
  ...props
}) => /*#__PURE__*/_react.default.createElement("div", {
  className: "".concat(baseClassName, "__container")
}, /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
  className: (0, _classnames.default)(baseClassName, {
    ["".concat(baseClassName, "--").concat(intent)]: intent,
    ["".concat(baseClassName, "--loading")]: loading
  }, className)
}, props), image ? /*#__PURE__*/_react.default.createElement("div", {
  className: "".concat(baseClassName, "__image")
}, image) : null, /*#__PURE__*/_react.default.createElement("div", {
  className: "".concat(baseClassName, "__body")
}, children), loading && /*#__PURE__*/_react.default.createElement(_ContentLoader.default, {
  overlay: true,
  text: loading === true ? null : loading
})));

var _default = ExtendedStatusMessage;
exports.default = _default;