import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
import Viewer from '@r2u/viewer';
import { Content } from './styles';
import WaterMark from '../../WaterMark';
import { FiArrowLeft } from '../../../assets/icons';
import { ModalContext } from '../Context';
import Canvas from '../Canvas';
const ModalViewer = ({ glb }) => {
    const { closeModal } = useContext(ModalContext);
    const { t } = useTranslation();
    return (React.createElement(Canvas, null,
        React.createElement(Content, null,
            React.createElement(FiArrowLeft, { width: 30, height: 30, color: "#707070", cursor: "pointer", className: "exit", onClick: () => {
                    closeModal();
                } }),
            React.createElement("div", { className: "text error" }, t('fallback.viewer.title')),
            React.createElement("div", { className: "text top" }, t('fallback.viewer.topText')),
            React.createElement("div", { className: "fallback-viewer-container" },
                React.createElement(Viewer, { glbSrc: glb })),
            React.createElement("div", { className: "text bottom" }, t('fallback.viewer.bottomText')),
            React.createElement("div", { className: "watermark" },
                React.createElement(WaterMark, { position: "centerAbsolute" })))));
};
export default ModalViewer;
//# sourceMappingURL=index.js.map