import type { FlashListProps } from '@shopify/flash-list'; import type { ReactElement } from 'react'; import type { FlatListProps, LayoutChangeEvent, NativeScrollEvent, ScrollViewProps, SectionListData, SectionListProps, StyleProp, ViewStyle, } from 'react-native'; import type { AnimateProps } from 'react-native-reanimated'; export interface StickyHeaderSharedProps { containerStyle?: StyleProp; contentContainerStyle?: StyleProp; onHeaderLayout?: (e: LayoutChangeEvent) => void; /** worklet function */ onMomentumScrollBegin?: (e: NativeScrollEvent) => void; /** worklet function */ onMomentumScrollEnd?: (e: NativeScrollEvent) => void; /** worklet function */ onScroll?: (e: NativeScrollEvent) => void; /** worklet function */ onScrollBeginDrag?: (e: NativeScrollEvent) => void; /** worklet function */ onScrollEndDrag?: (e: NativeScrollEvent) => void; onTabsLayout?: (e: LayoutChangeEvent) => void; renderHeader?: () => ReactElement | null; renderTabs?: () => ReactElement | null; stickyTabs?: boolean; style?: StyleProp; } export interface StickyHeaderSnapProps { headerHeight?: number; onTopReached?: () => void; parallaxHeight?: number; snapStartThreshold?: number; snapStopThreshold?: number; snapToEdge?: boolean; } export interface StickyHeaderScrollViewProps extends StickyHeaderSharedProps, Omit< AnimateProps, | 'contentContainerStyle' | 'onMomentumScrollBegin' | 'onMomentumScrollEnd' | 'onScroll' | 'onScrollBeginDrag' | 'onScrollEndDrag' | 'style' > {} export interface StickyHeaderFlatListProps extends StickyHeaderSharedProps, Omit< AnimateProps>, | 'contentContainerStyle' | 'data' | 'onMomentumScrollBegin' | 'onMomentumScrollEnd' | 'onScroll' | 'onScrollBeginDrag' | 'onScrollEndDrag' | 'style' > { data: ReadonlyArray; } export interface StickyHeaderSectionListProps extends StickyHeaderSharedProps, Omit< AnimateProps>, | 'contentContainerStyle' | 'onMomentumScrollBegin' | 'onMomentumScrollEnd' | 'onScroll' | 'onScrollBeginDrag' | 'onScrollEndDrag' | 'sections' | 'style' > { sections: ReadonlyArray>; } export interface StickyHeaderFlashListProps extends Omit, Omit< AnimateProps>, | 'contentContainerStyle' | 'data' | 'renderItem' | 'onScroll' | 'onScrollBeginDrag' | 'onScrollEndDrag' | 'onMomentumScrollBegin' | 'onMomentumScrollEnd' | 'onViewableItemsChanged' | 'stickyHeaderIndices' | 'style' >, Pick< FlashListProps, | 'contentContainerStyle' | 'renderItem' | 'onViewableItemsChanged' | 'stickyHeaderIndices' | 'style' > { data: ReadonlyArray; }