"use strict";

exports.__esModule = true;
exports["default"] = void 0;
var _react = require("react");
var _default = exports["default"] = function _default() {
  var el = (0, _react.useMemo)(function () {
    var div = document.createElement("div");
    document.body.append(div);
    return div;
  }, []);
  (0, _react.useLayoutEffect)(function () {
    return function () {
      try {
        document.body.removeChild(el);
      } catch (e) {
        // Do nothing
      }
    };
  }, []);
  return el;
};