import { withClickTracking } from "../../services/telemetry"; import React from "react"; import { Linking, ScrollView, Text, View } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { useNavigation } from "../../context/NavigationContext"; import { StatusBar } from "expo-status-bar"; import { Ionicons } from "@expo/vector-icons"; import { useColorScheme } from "nativewind"; import { IconButton } from "../../components/button"; import { EntropyByline } from "../../components/entropy-mark"; import { useAppConfig } from "../../context/AppConfigContext"; import type { LegalSection } from "./TermsOfServiceScreen"; export interface PrivacyPolicyScreenProps { /** * Per-app section list. When omitted, falls back to * `AppConfig.privacyText` (rendered as a single section) or a generic * placeholder. */ sections?: LegalSection[]; /** Optional highlight bullet list (vault renders four privacy bullets). */ highlights?: string[]; buildLabel?: string; effectiveDate?: string; supportEmail?: string; organisationName?: string; } export function PrivacyPolicyScreen({ sections, highlights, buildLabel, effectiveDate, supportEmail = "support@entropysoftworks.com", organisationName, }: PrivacyPolicyScreenProps) { const { colorScheme } = useColorScheme(); const isDark = colorScheme === "dark"; const router = useNavigation(); const { appName, privacyText } = useAppConfig(); const resolvedSections: LegalSection[] = sections ?? (privacyText ? [{ title: "Privacy", content: privacyText }] : [{ title: "Privacy Policy", content: `Privacy policy for ${appName}.` }]); const today = effectiveDate ?? new Date().toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric", }); const org = organisationName ?? appName; return ( router.back()} > {buildLabel ? ( {buildLabel} ) : null} Privacy Policy Effective Date: {today} This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use {appName}. {highlights && highlights.length > 0 ? ( Key Privacy Features {highlights.map((item, idx) => ( {item} ))} ) : null} {resolvedSections.map((section, index) => ( {section.title} {section.content} ))} Contact For privacy-related questions or concerns email{" "} Linking.openURL(`mailto:${supportEmail}`) )} > {supportEmail} Your Consent By using {appName}, you consent to this Privacy Policy and agree to its terms. © {new Date().getFullYear()} {org}. All rights reserved. ); } export default PrivacyPolicyScreen;