import React from 'react';
import {
  Modal, ModalBody,
} from 'reactstrap';

import { usePagePresentationModal } from '~/stores/ui';

const PagePresentationModal = () => {

  const { data: presentationData, close: closePresentationModal } = usePagePresentationModal();

  return (
    <Modal isOpen={presentationData.isOpened} toggle={closePresentationModal} className="grw-presentation-modal" unmountOnClose={false}>
      <ModalBody className="modal-body">
        <iframe src={presentationData.href} />
      </ModalBody>
    </Modal>
  );
};

export default PagePresentationModal;
