import React from 'react'; import { View, Text, TouchableOpacity } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import { useTheme } from '../../theme'; import { getStyles } from './customerItemCard.styles'; import { CustomerItemCardProps } from './customerItemCard.props'; import { handlePhonePress, handleEmailPress, getInitials } from '@utils'; export const CustomerItemCard: React.FC = ({ item, onPress, onDelete, }) => { const { theme: colors } = useTheme(); const styles = getStyles(colors); const displayName = item.company || item.fullname; const initials = getInitials(displayName); return ( {initials} {displayName} {item.fullname && item.company ? ( {item.fullname} ) : null} {item.city || item.state ? ( {' '}{[item.city, item.state].filter(Boolean).join(', ')} ) : null} {item.active === '1' ? 'Active' : 'Inactive'} {onDelete ? ( ) : null} handlePhonePress(item.phonenumber)}> Call handleEmailPress(item.email)}> Email ); };