import type { FlashList } from '@shopify/flash-list'; import * as React from 'react'; import { HeaderWrapper } from '../../common/components/HeaderWrapper'; import { usePredefinedFlashListHeader } from '../../common/hooks/usePredefinedFlashListHeader'; import type { AvatarHeaderFlashListProps } from '../AvatarHeaderProps'; import { Foreground } from '../components/HeaderForeground'; export function useAvatarFlashListHeader = FlashList>( props: AvatarHeaderFlashListProps ) { const { contentBackgroundColor, onMomentumScrollEnd, onScroll, onScrollEndDrag, parallaxHeight, scrollHeight, scrollValue, scrollViewRef, } = usePredefinedFlashListHeader(props); const { backgroundColor, backgroundImage, hasBorderRadius, image, subtitle, subtitleStyle, subtitleTestID, tabsContainerBackgroundColor, title, titleStyle, titleTestID, } = props; const renderHeader = React.useCallback(() => { return ( ); }, [ backgroundColor, backgroundImage, contentBackgroundColor, hasBorderRadius, image, parallaxHeight, scrollHeight, scrollValue, subtitle, subtitleStyle, subtitleTestID, tabsContainerBackgroundColor, title, titleStyle, titleTestID, ]); return { onMomentumScrollEnd, onScroll, onScrollEndDrag, parallaxHeight, renderHeader, scrollValue, scrollViewRef, }; }