import React from 'react';
import { Box, Loader } from '@wix/design-system';
import { observer } from 'mobx-react-lite';
function _Splash(props) {
    const { state, children, renderError, height = '100vh', ...rest } = props;
    const { status } = state;
    let child;
    if (status.isIdle || status.isLoading) {
        child = (React.createElement(Box, { height: "100%", align: "center", verticalAlign: "middle" },
            React.createElement(Loader, { dataHook: "initial-loader", size: "large" })));
    }
    else {
        child = children;
    }
    return (React.createElement(Box, { boxSizing: "border-box", align: "center", width: "100%", direction: "vertical", ...rest, height: height }, child));
}
export const Splash = observer(_Splash);
//# sourceMappingURL=Splash.js.map