import React from 'react'; import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'; import { useTheme } from '@react-navigation/native'; import { Ionicons } from '@expo/vector-icons'; import { Model } from '../types'; type ModelCardProps = { id: string; name: string; description: string; deployment?: string; isSelected?: boolean; onSelect: (id: string) => void; model?: Model; // Optionales komplettes Model-Objekt }; export default function ModelCard({ id, name, description, isSelected = false, onSelect, model }: ModelCardProps) { const { colors } = useTheme(); const deployment = model?.parameters?.deployment; return ( onSelect(id)} > {name} {description} {deployment && ( {deployment} )} {isSelected && ( )} ); } const styles = StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', padding: 16, borderRadius: 12, marginBottom: 12, borderWidth: 2, shadowColor: '#000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 2, elevation: 1, }, iconContainer: { width: 48, height: 48, borderRadius: 24, justifyContent: 'center', alignItems: 'center', backgroundColor: 'rgba(0,0,0,0.05)', }, contentContainer: { flex: 1, marginLeft: 16, }, name: { fontSize: 16, fontWeight: '600', marginBottom: 4, }, description: { fontSize: 14, lineHeight: 20, marginBottom: 4, }, deployment: { fontSize: 12, fontWeight: '500', }, checkmark: { width: 24, height: 24, borderRadius: 12, justifyContent: 'center', alignItems: 'center', }, });