import React from 'react'; import { View, Text, FlatList, ActivityIndicator, RefreshControl } from 'react-native'; import type { LocalModel } from '../../store/types'; import { createStyles } from './styles'; import { useTheme } from '../../theme/ThemeProvider'; interface EmptyListProps { message: string; submessage: string; colors: { text: string; border: string; }; } function EmptyList({ message, submessage, colors }: EmptyListProps) { const styles = createStyles(colors); return ( {message} {submessage} ); } interface ModelsListProps { models: LocalModel[]; isLoading: boolean; onRefresh: () => void; renderItem: (item: { item: LocalModel }) => React.ReactElement; } export default function ModelsList({ models, isLoading, onRefresh, renderItem, }: ModelsListProps) { const { colors } = useTheme(); const styles = createStyles(colors); return ( Modèles locaux ({models.length}) {isLoading && models.length === 0 ? ( Scan en cours... ) : ( item.path} ListEmptyComponent={ } contentContainerStyle={styles.listContent} refreshControl={ } /> )} ); }