import { UseModuleHydrationReturn, HydrationPriority, HydrationTrigger } from '../types';
/**
* Hook for controlling module hydration.
* Provides hydration state, manual triggers, and hydration data access.
*
* @returns Hydration state and controls
* @throws Error if used outside a ModuleBoundary
*
* @example
* ```tsx
* function HeavyComponent() {
* const {
* hydrationState,
* isHydrated,
* isPending,
* hydrate,
* progress,
* data,
* } = useModuleHydration();
*
* if (!isHydrated) {
* return (
*
*
Loading... {Math.round(progress * 100)}%
*
*
* );
* }
*
* return ;
* }
* ```
*/
export declare function useModuleHydration(): UseModuleHydrationReturn;
/**
* Hook to check if the module is hydrated.
* @returns Whether module is hydrated
*/
export declare function useIsHydrated(): boolean;
/**
* Hook to trigger hydration imperatively.
* @returns Hydration trigger function
*/
export declare function useHydrateTrigger(): () => Promise;
/**
* Hook to get hydration progress.
* @returns Progress value (0-1)
*/
export declare function useHydrationProgress(): number;
/**
* Hook to execute callback when hydration completes.
* @param callback - Callback to execute
*
* @example
* ```tsx
* useOnHydrated(() => {
* analytics.track('module_hydrated', { moduleId });
* });
* ```
*/
export declare function useOnHydrated(callback: () => void): void;
/**
* Hook to execute callback when hydration fails.
* @param callback - Callback to execute with error
*
* @example
* ```tsx
* useOnHydrationError((error) => {
* errorReporter.capture(error);
* });
* ```
*/
export declare function useOnHydrationError(callback: (error: Error) => void): void;
/**
* Hook to defer rendering until hydration is complete.
* @param fallback - Content to show while hydrating
* @param children - Content to show when hydrated
* @returns Appropriate content based on hydration state
*
* @example
* ```tsx
* function MyComponent() {
* return useHydrationGuard(
* ,
*
* );
* }
* ```
*/
export declare function useHydrationGuard(fallback: T, content: T): T;
/**
* Hook for controlling hydration timing.
* @param options - Hydration timing options
* @returns Hydration controls
*/
export declare function useHydrationTiming(options: {
delay?: number;
priority?: HydrationPriority;
trigger?: HydrationTrigger;
}): {
shouldHydrate: boolean;
scheduleHydration: () => void;
cancelHydration: () => void;
};