import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'; import { useRouter } from 'expo-router'; import { ChevronRight } from 'lucide-react-native'; import { Contact } from '@/store/useContactStore'; const statusColors: Record = { 'Active': 'bg-green-100 text-green-700', 'Return Visit': 'bg-blue-100 text-blue-700', 'Bible Study': 'bg-purple-100 text-purple-700', 'Not Interested': 'bg-gray-100 text-gray-500', 'Do Not Call': 'bg-red-100 text-red-600', }; interface Props { contact: Contact; onRefresh: () => void; } export function ContactCard({ contact, onRefresh }: Props) { const router = useRouter(); const initials = contact.fullName.split(' ').map((n) => n[0]).join('').substring(0, 2).toUpperCase(); const statusStyle = statusColors[contact.status] ?? 'bg-gray-100 text-gray-500'; return ( router.push({ pathname: '/contact/[id]', params: { id: contact.id } })} accessibilityRole="button" accessibilityLabel={`${contact.fullName}, ${contact.status}${contact.address ? `, ${contact.address}` : ''}`} accessibilityHint="Tap to view contact details" style={{ minHeight: 72 }} > {initials} {contact.fullName} {contact.address ? {contact.address} : null} {contact.status} ); }