"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const render = require("./render.cjs");
const reactDevbar = require("@contember/react-devbar");
const runReactApp = (reactElement, domRoot, render$1 = render.legacyReactRenderer) => {
  const rootEl = domRoot instanceof HTMLElement ? domRoot : typeof domRoot === "string" ? document.querySelector(domRoot) : document.body.appendChild(document.createElement("div"));
  if (!rootEl) {
    throw new Error(`Undefined react root element`);
  }
  const errorHandler = reactDevbar.createErrorHandler(render$1);
  errorHandler((onRecoverableError) => render$1(rootEl, reactElement, onRecoverableError));
};
exports.runReactApp = runReactApp;
//# sourceMappingURL=runReactApp.cjs.map
