import { jsx } from "react/jsx-runtime";
import { hydrate } from "@tanstack/router-core/ssr/client";
import { Await } from "../awaited.js";
import { RouterProvider } from "../RouterProvider.js";
let hydrationPromise;
function RouterClient(props) {
  if (!hydrationPromise) {
    if (!props.router.state.matches.length) {
      hydrationPromise = hydrate(props.router);
    } else {
      hydrationPromise = Promise.resolve();
    }
  }
  return /* @__PURE__ */ jsx(
    Await,
    {
      promise: hydrationPromise,
      children: () => /* @__PURE__ */ jsx(RouterProvider, { router: props.router })
    }
  );
}
export {
  RouterClient
};//# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/e0b7a2bcf575cfba10528c4e7c10bd3ce2d7769a/node_modules/@tanstack/react-router/dist/esm/ssr/RouterClient.js.map
