globalThis.process ??= {}; globalThis.process.env ??= {};
import { p as pascalCase, r as removeSubsection } from '../../../../../chunks/case_DUYSM3-g.mjs';
import { c as createJsonResponse } from '../../../../../chunks/apiHelpers_CD8DANYs.mjs';
import { f as fetchProps } from '../../../../../chunks/fetch_C_ctcuMR.mjs';
export { r as renderers } from '../../../../../chunks/_@astro-renderers_DcHY5gmj.mjs';

const prerender = false;
const GET = async ({ params, url }) => {
  const { page } = params;
  if (!page) {
    return createJsonResponse(
      { error: "Page parameter is required" },
      400
    );
  }
  try {
    const props = await fetchProps(url);
    const propsData = props[pascalCase(removeSubsection(page))];
    if (propsData === void 0) {
      return createJsonResponse(
        { error: `Props data for ${page} not found` },
        404
      );
    }
    return createJsonResponse(propsData);
  } catch (error) {
    const details = error instanceof Error ? error.message : String(error);
    return createJsonResponse(
      { error: "Failed to load props data", details },
      500
    );
  }
};

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

const page = () => _page;

export { page };
