interface UseScrollToTopOptions { behavior?: ScrollBehavior; onScrollComplete?: () => void; } interface UseScrollToTopReturn { scrollToTop: () => void; isScrolling: boolean; } /** * Hook that provides smooth scroll-to-top functionality with optional callback support. * * Scrolls the window to the top of the page and optionally executes a callback function * when the scroll operation completes. Uses a scroll event listener to detect when * the scroll position reaches the top (scrollY === 0). * * @param options - Configuration options for the scroll behavior * @param options.behavior - The scroll behavior: 'smooth', 'instant', or 'auto'. Defaults to 'smooth' * @param options.onScrollComplete - Optional callback function that fires when scrolling to top completes * * @returns Object containing scrollToTop function and isScrolling state * @returns scrollToTop - Function to trigger the scroll to top action * @returns isScrolling - Boolean indicating whether a scroll operation is currently in progress * * @example * ```tsx * // Basic usage * const { scrollToTop } = useScrollToTop(); * * // With callback * const { scrollToTop, isScrolling } = useScrollToTop({ * onScrollComplete: () => { * console.log('Reached the top!'); * } * }); * * // With instant scroll * const { scrollToTop } = useScrollToTop({ * behavior: 'instant', * onScrollComplete: () => { * // Fires immediately for instant scrolling * } * }); * ``` */ export declare const useScrollToTop: (options?: UseScrollToTopOptions) => UseScrollToTopReturn; export {}; //# sourceMappingURL=use-scroll-to-top.d.ts.map