import type { OutlineItem } from './types';
interface UseScrollSpyOptions {
    activeId?: string;
    items: OutlineItem[];
    onActiveIdChange?: (id: string) => void;
    rootRef: React.RefObject<HTMLElement | null>;
    /**
     * Height in px of a fixed header overlaying the top of the scroll root.
     * Shifts both the activation line and the scroll landing by the same amount,
     * on top of each heading's own `scroll-margin-top`.
     */
    offset?: number;
    /** Scroll container to track, instead of the nearest scrollable ancestor. */
    scrollContainerRef?: React.RefObject<HTMLElement | null>;
    /** Whether {@link UseScrollSpyResult.scrollTo} performs the smooth scroll. */
    hasScrollOnClick?: boolean;
    /** Called when a navigation begins, before the scroll starts. */
    onNavigateStart?: (id: string) => void;
    /** Called once per navigation, when the scroll settles or is interrupted. */
    onNavigateEnd?: (id: string) => void;
}
interface UseScrollSpyResult {
    activeId: string | undefined;
    /** Set the active id (notifies onActiveIdChange). For controlled consumers. */
    setActiveId: (id: string) => void;
    /**
     * Navigate to the item with id `id` — the single path shared by click and
     * keyboard activation.
     *
     * Fires `onNavigateStart(id)`, scrolls (unless `hasScrollOnClick` is false),
     * and fires `onNavigateEnd(id)` exactly once when the scroll settles or the
     * user interrupts it. While uncontrolled, scroll-spy is suppressed for the
     * duration so the indicator doesn't chase the scroll through intervening
     * sections; it lands on the target once the scroll settles, or resumes
     * position tracking if the user scrolls away mid-flight.
     *
     * Returns false (and does nothing) when no element with `id` exists.
     */
    scrollTo: (id: string) => boolean;
}
export declare function useScrollSpy({ activeId, items, onActiveIdChange, rootRef, offset, scrollContainerRef, hasScrollOnClick, onNavigateStart, onNavigateEnd, }: UseScrollSpyOptions): UseScrollSpyResult;
export {};
//# sourceMappingURL=useScrollSpy.d.ts.map