"use strict";

exports.__esModule = true;
exports.default = void 0;

require("aframe");

var _react = require("react");

var _reactDom = require("react-dom");

document.head.insertAdjacentHTML('beforeend', "<style>\n    canvas.a-canvas.a-mouse-cursor-hover:hover {\n      cursor: grab;\n    }\n  </style>");

var VRArenaSPA = function VRArenaSPA(props) {
  var _useState = (0, _react.useState)(),
      container = _useState[0],
      setContainer = _useState[1];

  var children = props.children;
  (0, _react.useEffect)(function () {
    var area = document.body;
    setContainer(area);
  }, []);
  return container ? /*#__PURE__*/(0, _reactDom.createPortal)(children, container) : null;
};

var _default = VRArenaSPA;
exports.default = _default;