import React from 'react'; import { FlatList, FlatListProps } from 'react-native'; import { useDynamicList } from '../hooks/useDynamicList'; import { ListWrapper } from './ListWrapper'; type DynamicFlatListProps = FlatListProps & { singularMessage: string; pluralMessage: string; isPlural?: (count: number) => boolean; }; export const DynamicFlatList = React.forwardRef< FlatList, DynamicFlatListProps >( ( { data, singularMessage, pluralMessage, isPlural, ...rest }, forwardedRef, ) => { const dynamicList = useDynamicList({ data: data!, pluralMessage, singularMessage, numColumns: rest.numColumns, isPlural, }); return __DEV__ ? ( ) : ( ); }, );