import { Pressable, View } from 'react-native'; import { Icon } from '../../atoms/Icon'; import { Text } from '../../atoms/Text'; import { cn } from '../../lib/cn'; import type { EntityCardProps } from './EntityCard.types'; /** * Tarjeta genérica para representar entidades agrícolas (fincas, bloques, naves, etc.). * Soporta icono opcional, slot derecho (chevron, estado) y badge. */ export function EntityCard({ title, subtitle, description, icon, rightSlot, badge, onPress, onLongPress, disabled = false, selected = false, className, testID, }: EntityCardProps) { const Container = onPress ? Pressable : View; return ( {icon ? ( ) : null} {title} {badge} {subtitle ? ( {subtitle} ) : null} {description ? ( {description} ) : null} {rightSlot} ); }