// src/modules/core/settings/index.tsx import React, { useState } from 'react'; import { View, ScrollView, TouchableOpacity, Switch, Alert, StyleSheet } from 'react-native'; import { ThemedText } from '../../../components/ThemedText'; import ThemeSwitcher from '../../../components/ThemeSwitcher'; import { useTheme } from '../../../theme/ThemeProvider'; interface SettingsProps { onClose?: () => void; showDebugInfo?: boolean; onToggleDebug?: (value: boolean) => void; } const Settings: React.FC = ({ onClose, showDebugInfo = false, onToggleDebug }) => { const { theme } = useTheme(); const clearAsyncStorage = () => { Alert.alert( 'Clear Storage', 'This will clear all app data. Continue?', [ { text: 'Cancel', style: 'cancel' }, { text: 'Clear', style: 'destructive', onPress: () => { // Add your async storage clearing logic here Alert.alert('Storage Cleared', 'All app data has been cleared.'); } } ] ); }; return ( {/* Header */} Developer Settings {onClose && ( )} {/* Theme Controls */} Theme Controls {/* Debug Options */} Debug Options Show Gesture Debug Info {/* App Data */} App Data Clear All Data {/* Screen Builder Info */} Screen Builder This app uses a JSON-driven screen builder system. Components are defined in screenData.json files. {/* Gesture Instructions */} How to Access This Menu 1. Tap any empty area to activate gesture mode (3 sec timeout) 2. Tap left edge 3 times quickly 3. Tap right edge 3 times quickly Complete each sequence within 1 second between taps ); }; const styles = StyleSheet.create({ container: { flex: 1, }, header: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', padding: 16, borderBottomWidth: 1, }, closeButton: { width: 32, height: 32, borderRadius: 16, justifyContent: 'center', alignItems: 'center', }, content: { flex: 1, padding: 16, }, section: { marginBottom: 24, paddingBottom: 16, borderBottomWidth: 1, }, sectionTitle: { marginBottom: 12, }, settingRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 8, }, actionButton: { padding: 12, borderRadius: 8, alignItems: 'center', marginTop: 8, }, buttonText: { color: 'white', fontWeight: '600', }, instructionText: { lineHeight: 20, marginBottom: 4, }, instructionNote: { fontStyle: 'italic', marginTop: 8, }, infoText: { lineHeight: 18, opacity: 0.8, }, }); export default Settings;