import React from 'react'; import type { FlatList as RNFlatList, FlatListProps as RNFlatListProps, } from 'react-native'; import type { UseDynamicList } from '../hooks/useDynamicList'; import { DynamicFlatList } from './DynamicFlatList'; import { StaticFlatList, StaticFlatListProps } from './StaticFlatList'; export type FlatListProps = RNFlatListProps & ( | ({ listType: 'static'; } & StaticFlatListProps) | ({ listType: 'dynamic'; } & UseDynamicList) ); export const FlatList = React.forwardRef>( ({ listType, ...rest }, forwardRef) => { return listType === 'dynamic' ? ( ) : ( ); }, );