import { ClientRuntimeConfig } from "../types.cjs";
import { ClientServiceConfig } from "./api.cjs";
import { AppRouterFactory } from "./types.cjs";
import { index_d_exports } from "./manifest/index.cjs";
import { QueryClient } from "@tanstack/react-query";
//#region src/ui/hydrate.d.ts
declare global {
  interface Window {
    __EVERYTHING_DEV_HYDRATE_PROMISE__?: Promise<void>;
    __EVERYTHING_DEV_SSR__?: boolean;
    __CLIENT_PROGRESS__?: string[];
    $_TSR?: unknown;
  }
}
interface CoreHydrateOptions {
  /**
   * Loads the app's generated core route config — the only app-specific
   * input; clients, compose machinery, and the router come from the package.
   */
  routeConfig: () => Promise<index_d_exports.RouteConfigModule | {
    default: index_d_exports.RouteConfigModule;
  }>;
  /**
   * Loads the app's generated core manifest — the degradation target when the
   * runtime config carries no (or no usable) compose payload: a plugin-free
   * deployment has no payload at all, yet the core-only tree is still the
   * tree. Absent, a payload-less page cannot construct a tree. The value is
   * parsed through the manifest contract at the boundary (a skewed version
   * or shape fails loudly here).
   */
  manifest?: () => Promise<unknown>;
  /**
   * The app's authored router factory — notFound/pending/error components,
   * scroll behavior, and router defaults live there. Absent, the framework's
   * own factory runs.
   */
  createRouter?: AppRouterFactory;
  /** The app's query client factory (staleTime, gcTime, …). Absent, the framework default. */
  createQueryClient?: () => QueryClient;
  /** Overrides the runtime config source (tests, embeds). */
  config?: ClientRuntimeConfig;
  /** Localized copy for the API connection-failure toast (see `createApiClient`). */
  apiConnectionError?: ClientServiceConfig["connectionError"];
}
declare function hydrate(options: CoreHydrateOptions): Promise<void>;
//#endregion
export { type AppRouterFactory, CoreHydrateOptions, hydrate as default, hydrate };
//# sourceMappingURL=hydrate.d.cts.map