/**
 * useThrottle Hook
 *
 * Throttles a callback function, ensuring it can only be called
 * once within a specified time window. The first call executes
 * immediately, subsequent calls within the window are ignored.
 */
/**
 * Options for the useThrottle hook
 */
export interface UseThrottleOptions {
    /** Whether to call the function on the leading edge (default: true) */
    leading?: boolean;
    /** Whether to call the function on the trailing edge (default: false) */
    trailing?: boolean;
}
/**
 * Return type for useThrottle hook
 */
export interface UseThrottleResult<T extends (...args: unknown[]) => unknown> {
    /** The throttled function */
    throttledFn: (...args: Parameters<T>) => ReturnType<T> | undefined;
    /** Whether the throttle is currently active (blocking calls) */
    isThrottled: boolean;
    /** Cancel any pending trailing call */
    cancel: () => void;
    /** Reset the throttle timer, allowing immediate next call */
    reset: () => void;
}
/**
 * Throttles a callback function to limit execution frequency
 *
 * @param callback - The function to throttle
 * @param delay - Minimum time between calls in milliseconds
 * @param options - Throttle options
 * @returns Object with throttled function and control methods
 *
 * @example
 * const { throttledFn } = useThrottle(scanServers, 500);
 *
 * // First call executes immediately
 * throttledFn(); // Executes
 *
 * // Calls within 500ms are ignored
 * throttledFn(); // Ignored
 * throttledFn(); // Ignored
 *
 * // After 500ms, next call executes
 * setTimeout(() => throttledFn(), 600); // Executes
 */
export declare function useThrottle<T extends (...args: unknown[]) => unknown>(callback: T, delay: number, options?: UseThrottleOptions): UseThrottleResult<T>;
/**
 * Simple throttle hook that just returns the throttled function
 *
 * @param callback - The function to throttle
 * @param delay - Minimum time between calls in milliseconds
 * @returns The throttled function
 *
 * @example
 * const throttledScan = useThrottleFn(scanServers, 500);
 * throttledScan(); // Use like normal function
 */
export declare function useThrottleFn<T extends (...args: unknown[]) => unknown>(callback: T, delay: number): (...args: Parameters<T>) => ReturnType<T> | undefined;
export default useThrottle;
//# sourceMappingURL=useThrottle.d.ts.map