import { ModalProvider } from '../../components/Modal/Context';
import ModalViewer from '../../components/Modal/Viewer';
import ModalViewerFull from '../../components/Modal/ViewerFull';
import React from 'react';
const FallbackScreen = ({ openerElement, openerEvent, fallbackOptions: { alertMessage, fallback }, glb, }) => {
    if (alertMessage) {
        openerElement.addEventListener(openerEvent, () => {
            alert(alertMessage);
        });
    }
    if (fallback === 'viewer' && glb) {
        return (React.createElement(ModalProvider, { openerElement: openerElement, openerEvent: openerEvent },
            React.createElement(ModalViewer, { glb: glb })));
    }
    if (fallback === 'full' && glb) {
        return (React.createElement(ModalProvider, { openerElement: openerElement, openerEvent: openerEvent },
            React.createElement(ModalViewerFull, { glb: glb })));
    }
    return null;
};
export default FallbackScreen;
//# sourceMappingURL=index.js.map