import React from "react"; import { ScrollView, Animated, NativeScrollEvent, NativeMethods } from "react-native"; import { GetProps } from "./helpers"; export declare type AnimatedScrollView = typeof Animated.ScrollView; interface ScrollListener { (event: NativeScrollEvent): void; } interface ScrollEventHandler { latest: NativeScrollEvent | null; subscribe(scrollListener: (event: NativeScrollEvent) => void): () => void; } /** * A React hook that returns an object for reading and subscribing to the scroll events * of the closest parent EnhancedScrollView. Use useAnimatedScrollValue() (not this) for * animations! */ export declare function useScrollEvents(): ScrollEventHandler; /** * @deprecated * A React hook that returns a function for subscribing to the scroll events of the * closest parent EnhancedScrollView. This is deprecated and will be removed soon - * use useScrollEvents() instead! */ export declare function useAddScrollListener(): (listener: ScrollListener) => () => void; /** * A React hook that returns a React ref pointing to the ScrollView instance * of the closest parent EnhancedScrollView. */ export declare function useScrollViewRef(): React.RefObject; export declare function useGetPositionInScrollView(): (viewRef: NativeMethods) => Promise<{ x: number; y: number; }>; export declare function useAnimatedScrollValue(): { x: Animated.Value; y: Animated.Value; }; interface Props { children: React.ReactNode; animatedYTracker?: Animated.Value; scrollViewRef?: { current: ScrollView | null; }; } export default function EnhancedScrollView(props: Props & GetProps): JSX.Element; export {};