import React from 'react'; import type { ReactNode, CSSProperties } from 'react'; declare global { interface Window { IntersectionObserver: typeof IntersectionObserver; } } interface IntersectionObserverContextValue { initialized: boolean; register: (params: { ref: React.RefObject; callback: (entry: IntersectionObserverEntry) => void; }) => void; unregister: (params: { ref: React.RefObject; }) => void; } declare type PriorityMode = 'top' | 'bottom' | 'left' | 'right' | undefined; interface IntersectionObserverProps { children: ReactNode; root?: Element | null; rootMargin?: string; threshold?: number | number[]; priorityMode?: PriorityMode; } interface IntersectionTriggerOptions { once?: boolean; onHide?: (cleanup: () => void) => void; onShow?: (cleanup: () => void) => void; } interface IntersectionTriggerProps extends IntersectionTriggerOptions { children?: ReactNode; className?: string; style?: CSSProperties; } declare const IntersectionObserverContext: React.Context; declare const Consumer: React.Consumer; export declare const IntersectionObserverProvider: React.FC; export declare const IntersectionTrigger: React.FC; export type { IntersectionObserverProps, IntersectionTriggerProps, IntersectionTriggerOptions, IntersectionObserverContextValue, PriorityMode, }; export { IntersectionObserverContext, Consumer as IntersectionObserverConsumer, }; export default IntersectionObserverProvider;