import { Ionicons } from "@expo/vector-icons"; import { router, useLocalSearchParams } from "expo-router"; import { ScrollView, StyleSheet, Text, View } from "react-native"; import { t } from "../../lib/locales"; import { colors } from "../../lib/theme"; import { Button } from "../../lib/ui"; export default function ContactDetailScreen() { const params = useLocalSearchParams<{ contactName: string; contactIdentifier: string; contactType: string; deviceName: string; }>(); const { contactName, contactIdentifier, contactType, deviceName } = params; const getContactTypeIcon = () => { switch (contactType) { case "phone": return "call"; case "email": return "mail"; default: return "person"; } }; const getContactTypeLabel = () => { switch (contactType) { case "phone": return t("phoneNumber"); case "email": return t("emailAddress"); default: return t("identifier"); } }; return ( {t("newContactAddedTitle")} {t("newContactAddedSubtitle")} {t("contactName")} {contactName || t("unknown")} {getContactTypeLabel()} {contactIdentifier || t("notProvided")} {t("device")} {deviceName || t("unknownDevice")} {t("contactAddedInfo").replace( "{deviceName}", deviceName || t("unknownDevice"), )}