import React from "react";
import { ScrollView, StyleSheet, Text, View, Platform } from "react-native";
import { Stack } from "expo-router";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import Colors from "@/constants/colors";
import { AppSiteFooter } from "@/components/AppSiteFooter";

export default function PrivacyPolicyScreen() {
  const insets = useSafeAreaInsets();

  return (
    <View style={[styles.container, { paddingTop: insets.top }]}>
      <Stack.Screen options={{ title: "Privacy Policy", headerBackTitle: "Back" }} />

      <ScrollView
        style={styles.scrollView}
        contentContainerStyle={styles.scrollContent}
        showsVerticalScrollIndicator={Platform.OS === "web"}
        nestedScrollEnabled
      >
        <Text style={styles.title}>Privacy Policy</Text>
        <Text style={styles.lastUpdated}>Last Updated: June 24, 2026</Text>

        <View style={styles.section}>
          <Text style={styles.sectionTitle}>1. Information We Collect</Text>
          <Text style={styles.paragraph}>
            We collect account, transaction, and device information needed to provide secure
            payments, fraud prevention, and support services.
          </Text>
        </View>

        <View style={styles.section}>
          <Text style={styles.sectionTitle}>2. How We Use Information</Text>
          <Text style={styles.paragraph}>
            Your data is used to process transactions, verify identity, secure your account,
            improve product performance, and comply with legal obligations.
          </Text>
        </View>

        <View style={styles.section}>
          <Text style={styles.sectionTitle}>3. Sharing and Disclosure</Text>
          <Text style={styles.paragraph}>
            We share data only with trusted service providers and financial partners needed to
            operate the platform, or when required by law.
          </Text>
        </View>

        <View style={styles.section}>
          <Text style={styles.sectionTitle}>4. Security Controls</Text>
          <Text style={styles.paragraph}>
            We apply encryption, access controls, and monitoring practices designed to protect your
            personal and financial information.
          </Text>
        </View>

        <View style={styles.section}>
          <Text style={styles.sectionTitle}>5. Your Rights</Text>
          <Text style={styles.paragraph}>
            Depending on your location, you may have rights to access, correct, or request deletion
            of personal data, subject to legal and compliance obligations.
          </Text>
        </View>

        <View style={styles.section}>
          <Text style={styles.sectionTitle}>6. Contact</Text>
          <Text style={styles.paragraph}>
            For privacy questions, contact privacy@zendo.com.
          </Text>
        </View>
        <AppSiteFooter />
      </ScrollView>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: Colors.dark.background,
  },
  scrollView: {
    flex: 1,
  },
  scrollContent: {
    padding: 24,
    paddingBottom: 40,
  },
  title: {
    fontSize: 28,
    fontWeight: "700",
    color: Colors.dark.text,
    marginBottom: 8,
  },
  lastUpdated: {
    fontSize: 14,
    color: Colors.dark.textTertiary,
    marginBottom: 28,
  },
  section: {
    marginBottom: 24,
  },
  sectionTitle: {
    fontSize: 18,
    fontWeight: "700",
    color: Colors.dark.text,
    marginBottom: 10,
  },
  paragraph: {
    fontSize: 16,
    color: Colors.dark.textSecondary,
    lineHeight: 24,
  },
});
