import { jsx, Fragment } from "react/jsx-runtime";
import { useCurrentRequest } from "../../routing/RequestContext.js";
const Page = (props) => {
  const request = useCurrentRequest();
  if (request === null) {
    return null;
  }
  return typeof props.children === "function" ? /* @__PURE__ */ jsx(props.children, { ...request.parameters }) : /* @__PURE__ */ jsx(Fragment, { children: props.children });
};
Page.displayName = "Page";
Page.getPageName = (props) => props.name;
export {
  Page
};
//# sourceMappingURL=Page.js.map
