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