import { type NavigationCache, type NavigationCacheStorage } from "./navigationCache.js";
import type { RscPayloadMeta } from "./types.js";
export type { NavigationCache, NavigationCacheStorage };
export interface ClientNavigationOptions {
    onNavigate?: () => Promise<void> | void;
    scrollToTop?: boolean;
    scrollBehavior?: "auto" | "smooth" | "instant";
    cacheStorage?: NavigationCacheStorage;
}
export declare function validateClickEvent(event: MouseEvent, target: HTMLElement): boolean;
export interface NavigateOptions {
    history?: "push" | "replace";
    onNavigate?: () => Promise<void> | void;
    info?: {
        scrollToTop?: boolean;
        scrollBehavior?: "auto" | "smooth" | "instant";
    };
}
export declare function navigate(href: string, options?: NavigateOptions): Promise<void>;
/**
 * Initializes client-side navigation for Single Page App (SPA) behavior.
 *
 * Intercepts clicks on internal links and fetches page content without full-page reloads.
 * Returns handleResponse and onHydrated functions to pass to initClient.
 *
 * @param opts.scrollToTop - Scroll to top after navigation (default: true)
 * @param opts.scrollBehavior - How to scroll: 'instant', 'smooth', or 'auto' (default: 'instant')
 * @param opts.onNavigate - Callback executed after history push but before RSC fetch
 *
 * @example
 * // Basic usage
 * import { initClient, initClientNavigation } from "rwsdk/client";
 *
 * const { handleResponse, onHydrated } = initClientNavigation();
 * initClient({ handleResponse, onHydrated });
 *
 * @example
 * // With custom scroll behavior
 * const { handleResponse, onHydrated } = initClientNavigation({
 *   scrollBehavior: "smooth",
 *   scrollToTop: true,
 * });
 * initClient({ handleResponse, onHydrated });
 *
 * @example
 * // Preserve scroll position (e.g., for infinite scroll)
 * const { handleResponse, onHydrated } = initClientNavigation({
 *   scrollToTop: false,
 * });
 * initClient({ handleResponse, onHydrated });
 *
 * @example
 * // With navigation callback
 * const { handleResponse, onHydrated } = initClientNavigation({
 *   onNavigate: () => {
 *     console.log("Navigating to:", window.location.href);
 *   },
 * });
 * initClient({ handleResponse, onHydrated });
 */
export declare function initClientNavigation(opts?: ClientNavigationOptions): {
    handleResponse: (response: Response) => boolean;
    onHydrated: (meta?: RscPayloadMeta) => void;
};
