import React from 'react'; import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Pressable, Image, } from 'react-native'; import { useRouter } from 'expo-router'; import { getCurrentUser, logoutUser } from '../services/auth'; import { useTheme } from '../components/ThemeProvider'; import MaterialIcons from '@expo/vector-icons/MaterialIcons'; import { ThemeVariant, getTheme, THEME_PATTERNS, THEME_NAMES } from '../constants/theme'; import { ThemeSettings } from '../components/common/ThemeSettings'; const COLOR_MODES: { label: string; value: ColorMode }[] = [ { label: 'System', value: 'system' }, { label: 'Hell', value: 'light' }, { label: 'Dunkel', value: 'dark' }, ]; const CONTRAST_LABELS: Record = { 1: 'Sehr niedrig', 2: 'Niedrig', 3: 'Standard', 4: 'Hoch', 5: 'Sehr hoch', }; export default function SettingsScreen() { const router = useRouter(); const currentUser = getCurrentUser(); const { theme, isDark } = useTheme(); const handleLogout = async () => { try { await logoutUser(); router.replace('/login'); } catch (error) { console.error('Logout error:', error); } }; return ( Kontrast: {([1, 2, 3, 4, 5] as ContrastLevel[]).map((level) => ( {}} /> ))} {CONTRAST_LABELS[3]} Email {currentUser?.email} Sign Out ); } const styles = StyleSheet.create({ container: { flex: 1, }, content: { flex: 1, padding: 20, }, section: { marginBottom: 32, padding: 16, borderRadius: 8, }, sectionTitleContainer: { alignItems: 'center', marginBottom: 24, }, sectionTitle: { fontSize: 20, fontWeight: '600', }, label: { fontSize: 14, marginBottom: 4, }, value: { fontSize: 16, fontWeight: '500', }, contrastContainer: { marginTop: 16, alignItems: 'center', gap: 12, }, contrastSlider: { flexDirection: 'row', gap: 4, height: 48, alignItems: 'center', width: '100%', }, contrastOption: { flex: 1, height: 32, borderRadius: 16, }, contrastLabel: { fontSize: 14, fontWeight: '500', }, bottomSection: { gap: 12, marginTop: 'auto', }, emailSection: { padding: 16, borderRadius: 8, }, logoutButton: { padding: 16, borderRadius: 8, alignItems: 'center', }, logoutButtonText: { fontSize: 16, fontWeight: '600', }, });