import { Await } from "../awaited.js";
import { RouterProvider } from "../RouterProvider.js";
import { jsx } from "react/jsx-runtime";
import { hydrate } from "@tanstack/router-core/ssr/client";
//#region src/ssr/RouterClient.tsx
var hydrationPromise;
function RouterClient(props) {
	if (!hydrationPromise) if (!props.router.stores.matchesId.get().length) hydrationPromise = hydrate(props.router);
	else hydrationPromise = Promise.resolve();
	return /* @__PURE__ */ jsx(Await, {
		promise: hydrationPromise,
		children: () => /* @__PURE__ */ jsx(RouterProvider, { router: props.router })
	});
}
//#endregion
export { RouterClient };

//# sourceMappingURL=RouterClient.js.map