import { type RefObject } from "react"; export interface UseIntersectionObserverOptions extends IntersectionObserverInit { freezeOnceVisible?: boolean; } export interface UseIntersectionObserverReturn { isIntersecting: boolean; entry?: IntersectionObserverEntry; } /** * Detects whether a DOM element is currently visible in the viewport. * Ideal for lazy loading images, infinite scrolling, or triggering animations on scroll. * * @param ref - The React ref attached to the element to observe. * @param options - Standard IntersectionObserverInit options (threshold, rootMargin, etc.). * @returns The latest `IntersectionObserverEntry` or `null`. * * @example * ```tsx * const ref = useRef(null); * const entry = useIntersectionObserver(ref, { threshold: 0.1 }); * const isVisible = !!entry?.isIntersecting; * return ; * ``` */ export declare function useIntersectionObserver(ref: RefObject, options?: UseIntersectionObserverOptions): UseIntersectionObserverReturn;