import React, { useState } from "react"; import { ScrollView, StyleSheet, View, Text, Alert, Platform, } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { router } from "expo-router"; import { moderateScale, verticalScale } from "react-native-size-matters"; import SettingsHeader from "@/features/settings/components/SettingsHeader"; import ProfileMenuItem from "@/features/profile/components/ProfileMenuItem"; import PrimaryButton from "@/components/buttons/PrimaryButton"; import { Colors } from "@/theme"; export default function PrivacySettingsScreen() { const [analyticsEnabled, setAnalyticsEnabled] = useState(true); const [offlineCacheEnabled, setOfflineCacheEnabled] = useState(true); const handleClearHistory = () => { const doClear = () => { const msg = "Search and navigation history cleared."; if (Platform.OS === "web") { window.alert(msg); } else { Alert.alert("Success", msg); } }; if (Platform.OS === "web") { if (window.confirm("Clear all local search history? This cannot be undone.")) { doClear(); } } else { Alert.alert( "Clear Search History", "Are you sure you want to clear your local search history?", [ { text: "Cancel", style: "cancel" }, { text: "Clear", style: "destructive", onPress: doClear }, ] ); } }; const handleSave = () => { const msg = "Privacy preferences updated!"; if (Platform.OS === "web") { window.alert(msg); router.back(); } else { Alert.alert("Success", msg, [ { text: "OK", onPress: () => router.back() }, ]); } }; return ( Manage your personal data storage, local history, and anonymized metrics. Clinical Privacy & Content Protection Acupedia is strictly compliant with privacy principles. We never sell your clinical search data, bookmarks, or account information to third parties. Proprietary anatomical charts, point coordinates, and clinical needling depths are protected by hardware screen-capture and recording prevention on native mobile devices. ); } const styles = StyleSheet.create({ safeArea: { flex: 1, backgroundColor: Colors.background, }, contentContainer: { flexGrow: 1, paddingBottom: verticalScale(32), }, container: { flex: 1, paddingHorizontal: moderateScale(20), paddingTop: verticalScale(12), }, sectionSubtitle: { fontSize: moderateScale(13), color: Colors.textSecondary, marginBottom: verticalScale(16), lineHeight: moderateScale(18), }, card: { backgroundColor: "#FFFFFF", borderRadius: moderateScale(16), overflow: "hidden", borderWidth: 1, borderColor: "#E5E7EB", marginBottom: verticalScale(20), }, infoBox: { backgroundColor: "#F8FAFC", borderRadius: moderateScale(14), padding: moderateScale(16), borderWidth: 1, borderColor: "#E2E8F0", }, infoTitle: { fontSize: moderateScale(14), fontWeight: "700", color: Colors.textPrimary, marginBottom: verticalScale(4), }, infoText: { fontSize: moderateScale(12), color: Colors.textSecondary, lineHeight: moderateScale(18), }, buttonWrapper: { marginTop: verticalScale(24), }, });