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 './customerDetailHeader.styles'; import { CustomerDetailHeaderProps } from './customerDetailHeader.props'; import { getInitials, formatDate } from '@utils'; export const CustomerDetailHeader: React.FC = ({ company, fullname, active, datecreated, email, phonenumber, website, onEmailPress, onPhonePress, onWebsitePress, }) => { const { theme: colors } = useTheme(); const styles = getStyles(colors); const displayName = company || fullname || 'Customer'; const initials = getInitials(displayName); return ( {initials} {displayName} {fullname && company ? ( {fullname} ) : null} {active === '1' ? 'Active Customer' : 'Inactive'} {datecreated ? ( Added {formatDate(datecreated)} ) : null} {/* Quick Actions */} {phonenumber ? ( Call ) : null} {email ? ( Email ) : null} {website ? ( Website ) : null} ); };