import React from 'react'; import { View, Pressable, Image } from 'react-native'; import { Text } from '../ui/Text'; import { Icon } from '../ui/Icon'; import { Deck } from '../../store/deckStore'; import { useThemeColors } from '~/utils/themeUtils'; interface DeckCardProps { deck: Deck; onPress: () => void; showProgress?: boolean; isCompact?: boolean; } export const DeckCard: React.FC = ({ deck, onPress, showProgress = false, isCompact = false, }) => { const isFavorite = deck.metadata?.is_favorite || false; const colors = useThemeColors(); if (isCompact) { return ( ({ backgroundColor: colors.surfaceElevated, borderRadius: 16, borderWidth: 1, borderColor: colors.border, padding: 16, marginBottom: 12, opacity: pressed ? 0.95 : 1, })}> {deck.title} {deck.card_count || 0} Karten {deck.is_public && ( <> Öffentlich )} ); } return ( ({ opacity: pressed ? 0.95 : 1 })}> {deck.cover_image_url ? ( ) : ( )} {deck.title} {deck.description && ( {deck.description} )} {isFavorite && ( )} {showProgress && ( Fortschritt 0% )} ); };