import type { ReactChild, ReactFragment, ReactPortal, RefAttributes } from 'react'; import type { FlatListProps, ImageResizeMode, ImageSourcePropType, ImageStyle, NativeScrollEvent, StyleProp, TextStyle, ViewStyle, } from 'react-native'; import type Animated from 'react-native-reanimated'; import type { StickyHeaderFlashListProps, StickyHeaderScrollViewProps, StickyHeaderSectionListProps, } from '../../primitiveComponents/StickyHeaderProps'; import type { SharedPredefinedProps, TabsConfig } from '../common/SharedProps'; export interface PagerMethods { goToPage: (pageNumber: number) => void; } export interface PagerProps extends Omit< FlatListProps, | 'data' | 'horizontal' | 'keyExtractor' | 'onMomentumScrollBegin' | 'onMomentumScrollEnd' | 'onScroll' | 'onScrollBeginDrag' | 'onScrollEndDrag' | 'pagingEnabled' | 'renderItem' > { /** 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; } export interface TabbedHeaderSharedProps extends SharedPredefinedProps, Partial { enableSafeAreaTopInset?: boolean; foregroundImage?: ImageSourcePropType; hasBorderRadius?: boolean; logo?: ImageSourcePropType; logoContainerStyle?: StyleProp>; logoResizeMode?: ImageResizeMode; logoStyle?: StyleProp>; title?: string; titleStyle?: StyleProp>; titleTestID?: string; } export interface TabbedHeaderPagerProps extends TabbedHeaderSharedProps, StickyHeaderScrollViewProps { disableScrollToPosition?: boolean; initialPage?: number; onChangeTab?: (prevPage: number, newPage: number) => void; pageContainerStyle?: StyleProp>; pagerProps?: PagerProps & RefAttributes; rememberTabScrollPosition?: boolean; } export interface TabbedHeaderListProps extends TabbedHeaderSharedProps, StickyHeaderSectionListProps {} export interface TabbedHeaderFlashListProps extends Omit, StickyHeaderFlashListProps {}