import { UseLoaderOptions, UseLoaderReturn } from '../types/hooks'; /** * useEnhancedLoader - Advanced loading state management with retry, success/error states, and history * * An enhanced version of useLoader with additional features: * - Retry logic with exponential backoff * - Success and error state management * - Loading history tracking * - Debounce and throttle support * - Lifecycle callbacks * * @param options - Configuration options * @returns Enhanced loading state and control functions * * @example * ```tsx * function MyComponent() { * const { * loading, * status, * error, * startLoading, * stopLoading, * setError, * retry, * history * } = useEnhancedLoader({ * delay: 200, * minDuration: 600, * retry: { * maxRetries: 3, * initialDelay: 1000, * backoffMultiplier: 2, * }, * successDuration: 2000, * onSuccess: () => console.log('Success!'), * onError: (err) => console.error('Error:', err), * }); * * const fetchData = async () => { * startLoading(); * try { * await api.fetchData(); * stopLoading(); * } catch (err) { * setError(err as Error); * } * }; * * return ( *
* {status === 'loading' && } * {status === 'success' && } * {status === 'error' && } * {error && } *
* ); * } * ``` */ export declare function useEnhancedLoader(options?: UseLoaderOptions): UseLoaderReturn; //# sourceMappingURL=useEnhancedLoader.d.ts.map