import { Fragment, jsx } from "react/jsx-runtime";
import { act } from "react";
import "@testing-library/jest-dom";
import { render } from "@testing-library/react";
import { ReactRuntime } from "../../runtimes/react/react-runtime";
import { MakeswiftComponentType } from "../../components/builtin/constants";
import { Page as MakeswiftPage } from "../components/page";
import { ReactProvider } from "./react-provider";
async function testMakeswiftPageHeadRendering(props, { forcePagesRouter = false } = {}) {
  const runtime = new ReactRuntime();
  runtime.registerComponent(() => /* @__PURE__ */ jsx(Fragment, {}), {
    type: MakeswiftComponentType.Root,
    label: "Root",
    props: {}
  });
  return await act(
    async () => render(
      /* @__PURE__ */ jsx(ReactProvider, { runtime, siteVersion: null, forcePagesRouter, children: /* @__PURE__ */ jsx(MakeswiftPage, { ...props }) }),
      {
        container: document.body.appendChild(document.createElement("head"))
      }
    )
  );
}
async function testMakeswiftPageRendering(props, { forcePagesRouter = false } = {}) {
  const runtime = new ReactRuntime();
  return await act(
    async () => render(
      /* @__PURE__ */ jsx(ReactProvider, { runtime, siteVersion: null, forcePagesRouter, children: /* @__PURE__ */ jsx(MakeswiftPage, { ...props }) }),
      {
        container: document.body.appendChild(document.createElement("div"))
      }
    )
  );
}
export {
  testMakeswiftPageHeadRendering,
  testMakeswiftPageRendering
};
//# sourceMappingURL=page-rendering.js.map