import type { ClientRouter, Fetcher, FetcherState } from "@nifrajs/web"; /** Register (or clear) the router that owns fetchers - called by `mountRouter`. Not for app use. */ export declare function setMountedRouter(router: ClientRouter | undefined): void; /** A fetcher's reactive {@link FetcherState} plus its imperative `load`/`submit`. */ export interface FetcherHandle extends FetcherState { /** Load a route path's loader data into this fetcher (concurrent; doesn't touch the active view). */ readonly load: (path: string) => Promise; /** Submit an action into this fetcher (concurrent); honors `X-Nifra-Revalidate`. */ readonly submit: (action: string, body: NonNullable) => Promise; } /** * Subscribe to the independent fetcher for `key` (created lazily, stable across renders). Returns its * state (`pending`/`data`/`actionData`/`submission`) + `load`/`submit`. Multiple `useFetcher` calls * with different keys run concurrently without disturbing the active route or each other. */ export declare function useFetcher(key: string): FetcherHandle; /** * Subscribe to the whole live fetcher collection - for a global busy view (e.g. "3 saving…"). Read * each entry's `.snapshot()` for its state. Re-renders whenever any fetcher transitions or a new one * is created. */ export declare function useFetchers(): readonly Fetcher[]; //# sourceMappingURL=fetcher.d.ts.map