"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.Splash = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _mobxReactLite = require("mobx-react-lite");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/Splash/Splash.tsx";
function _Splash(props) {
  const {
    state,
    children,
    renderError,
    height = '100vh',
    ...rest
  } = props;
  const {
    status
  } = state;
  let child;
  if (status.isIdle || status.isLoading) {
    child = /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
      height: "100%",
      align: "center",
      verticalAlign: "middle",
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 22,
        columnNumber: 7
      }
    }, /*#__PURE__*/_react.default.createElement(_designSystem.Loader, {
      dataHook: "initial-loader",
      size: "large",
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 23,
        columnNumber: 9
      }
    }));
  } else {
    child = children;
  }
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, (0, _extends2.default)({
    boxSizing: "border-box",
    align: "center",
    width: "100%",
    direction: "vertical"
  }, rest, {
    height: height,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 5
    }
  }), child);
}
const Splash = exports.Splash = (0, _mobxReactLite.observer)(_Splash);
//# sourceMappingURL=Splash.js.map