import type { FlatList, NativeScrollEvent, NativeSyntheticEvent, SectionList, ScrollView as RNScrollView } from "react-native"; import type { ScrollView as RNGHScrollView } from "react-native-gesture-handler"; export interface ScrollTrackOptions { /** Whether the scroll track should always be visible (no fade out). Default: false */ alwaysVisible?: boolean; /** Disable drag and tap gestures on the scroll track. Default: false */ disableGestures?: boolean; /** Delay in milliseconds before the track fades out when not alwaysVisible. Default: 1000 */ fadeOutDelay?: number; /** Hit area expansion for gesture detection (in pixels). Default: 22 */ hitSlop?: number; /** Whether scrolling direction is inverted (thumb moves opposite to scroll). Default: false */ inverted?: boolean; /** Minimum scroll distance required before showing the track. Default: 20 */ minScrollDistanceToShow?: number; /** Callback when user starts pressing/dragging the track. Default: empty function */ onPressEnd?: () => void; /** Callback when user stops pressing/dragging the track. Default: empty function */ onPressStart?: () => void; /** Throttle scroll events (lower = more responsive, higher = better performance). Default: 1 */ scrollThrottle?: number; /** Visual styling configuration for the scroll track */ styling?: { /** Color of the scroll thumb. Default: '#00CED1' */ thumbColor?: string; /** Border radius of the thumb. Default: 0 */ thumbBorderRadius?: number; /** Fixed height of the thumb in pixels. Overrides dynamic sizing and `minThumbHeight`; clamped to the track height. Default: undefined */ thumbHeight?: number; /** Minimum height of the dynamically sized thumb in pixels. Ignored when `thumbHeight` is set. Default: undefined */ minThumbHeight?: number; /** Opacity of the thumb (0-1). Default: 0.8 */ thumbOpacity?: number; /** Shadow configuration for the thumb */ thumbShadow?: { /** Shadow color. Default: '#000000' */ color?: string; /** Shadow opacity (0-1). Default: 0.3 */ opacity?: number; /** Shadow blur radius. Default: 4 */ radius?: number; /** Shadow offset. Default: { width: 0, height: 2 } */ offset?: { width: number; height: number; }; }; /** Color of the track background. Default: '#637777' */ trackColor?: string; /** Opacity of the track (0-1). Default: 0.3 */ trackOpacity?: number; /** Whether to show the track background. Default: true */ trackVisible?: boolean; /** Width of the track and thumb. Default: 4 */ trackWidth?: number; /** Z-index for the scroll track container. Default: 1000 */ zIndex?: number; }; /** External ref to the scrollable component. Default: null */ externalRef?: React.RefObject | React.RefObject; } export type SupportedScrollRef = RNScrollView | RNGHScrollView | FlatList | SectionList; /** * Default configuration options for the scroll track */ export declare const defaultScrollTrackOptions: { readonly alwaysVisible: false; readonly disableGestures: false; readonly fadeOutDelay: 1000; readonly hitSlop: 22; readonly inverted: false; readonly minScrollDistanceToShow: 20; readonly onPressEnd: () => void; readonly onPressStart: () => void; readonly scrollThrottle: 1; readonly styling: { readonly thumbColor: "#00CED1"; readonly thumbBorderRadius: 0; readonly thumbHeight: number | undefined; readonly minThumbHeight: number | undefined; readonly thumbOpacity: 0.8; readonly thumbShadow: { readonly color: "#000000"; readonly opacity: 0.3; readonly radius: 4; readonly offset: { readonly width: 0; readonly height: 2; }; }; readonly trackColor: "#637777"; readonly trackOpacity: 0.3; readonly trackVisible: true; readonly trackWidth: 4; readonly zIndex: 1000; }; }; export declare const useScrollTrack: (options?: ScrollTrackOptions) => { scrollProps: { ref: import("react").RefObject; onScroll: (event: NativeSyntheticEvent) => void; onLayout: (e: any) => void; onContentSizeChange: (_: number, height: number) => void; scrollEventThrottle: number; showsVerticalScrollIndicator: boolean; inverted: boolean; }; ScrollTrack: import("react").JSX.Element | null; scrollToPosition: (position: number) => void; isScrollable: boolean; isVisible: boolean; scrollRef: import("react").RefObject; };