import React from 'react'; import { View, TouchableOpacity } from 'react-native'; import Text from '~/components/atoms/Text'; import { useTheme, ColorMode, ThemeVariant } from './ThemeProvider'; import { Ionicons } from '@expo/vector-icons'; import colors from '~/tailwind.config.js'; import { useTranslation } from 'react-i18next'; // Vorschaufarben für jedes Theme const THEME_PREVIEW_COLORS: Record = { lume: { primary: '#f8d62b', secondary: '#383838' }, nature: { primary: '#81C784', secondary: '#2E7D32' }, stone: { primary: '#90A4AE', secondary: '#455A64' }, ocean: { primary: '#4FC3F7', secondary: '#0277BD' }, }; /** * Theme-Einstellungen-Komponente * Ermöglicht die Auswahl von Farbmodus und Theme-Variante */ export const ThemeSettings = () => { const { t } = useTranslation(); const { isDark, colorMode, setColorMode, themeVariant, setThemeVariant, tw, themeVersion } = useTheme(); // Farbmodus-Optionen mit Übersetzungen const COLOR_MODES: { label: string; value: ColorMode; icon: string }[] = [ { label: t('settings.system', 'System'), value: 'system', icon: 'sync' }, { label: t('settings.light', 'Hell'), value: 'light', icon: 'sunny' }, { label: t('settings.dark', 'Dunkel'), value: 'dark', icon: 'moon' }, ]; // Verwende die gleichen Farben wie MemoPreview und SettingsToggle const themeColors = (colors as any).theme?.extend?.colors; const cardBackgroundColor = isDark ? themeColors?.dark?.[themeVariant]?.contentBackground || '#1E1E1E' : themeColors?.[themeVariant]?.contentBackground || '#FFFFFF'; const borderColor = isDark ? themeColors?.dark?.[themeVariant]?.border || '#424242' : themeColors?.[themeVariant]?.border || '#e6e6e6'; // Primary-Farbe für aktive Tabs const primaryColor = isDark ? themeColors?.dark?.[themeVariant]?.primary || '#f8d62b' : themeColors?.[themeVariant]?.primary || '#f8d62b'; return ( {/* Farbmodus-Einstellungen */} {t('settings.appearance', 'Erscheinungsbild')} {COLOR_MODES.map((mode) => { const isSelected = mode.value === colorMode; return ( setColorMode(mode.value)} > {mode.label} ); })} {/* Theme-Varianten */} {/* {t('settings.theme', 'Theme')} {Object.entries(THEME_NAMES).slice(0, 2).map(([value, label]) => { const colors = THEME_PREVIEW_COLORS[value as ThemeVariant]; const isSelected = value === themeVariant; return ( setThemeVariant(value as ThemeVariant)} > {label} ); })} {Object.entries(THEME_NAMES).slice(2, 4).map(([value, label]) => { const colors = THEME_PREVIEW_COLORS[value as ThemeVariant]; const isSelected = value === themeVariant; return ( setThemeVariant(value as ThemeVariant)} > {label} ); })} */} ); };