globalThis.process ??= {}; globalThis.process.env ??= {};
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
export { renderers } from '../renderers.mjs';

const propsFilePath = join(process.cwd(), "dist", "props.json");
const propsData = readFileSync(propsFilePath);
const props = JSON.parse(propsData.toString());
const prerender = false;
async function GET({ request }) {
  const queryParams = new URL(request.url).searchParams;
  const components = queryParams.get("components");
  const componentsArray = components?.split(",");
  const propsData2 = componentsArray?.map((component) => props[component]);
  return new Response(JSON.stringify(propsData2));
}

const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
  __proto__: null,
  GET,
  prerender
}, Symbol.toStringTag, { value: 'Module' }));

const page = () => _page;

export { page };
