import { Text, TouchableOpacity, View } from 'react-native';
import { useTranslation } from 'react-i18next';
import { Ionicons } from '@expo/vector-icons';
import { useColors } from '../../../lib/theme';
import { useLanguageStore, type AppLanguage } from '../../../stores/language';
import { OnboardingShell } from '../OnboardingShell';
import { LyraBubble } from '../LyraBubble';
import { CTABar } from '../CTABar';
const LANGS: { code: AppLanguage; label: string }[] = [
{ code: 'de', label: 'DE' },
{ code: 'en', label: 'EN' },
{ code: 'fr', label: 'FR' },
{ code: 'ar', label: 'AR' },
];
/**
* Kompakter Sprach-Umschalter — nur auf der Welcome-Slide. Während des
* Onboardings kommt der User nicht zu Settings, kann die Sprache also sonst
* nirgends ändern. setLanguage persistiert in AsyncStorage + flippt RTL für AR.
*/
function LanguagePills({ colors }: { colors: import('../../../lib/theme').ColorScheme }) {
const language = useLanguageStore((s) => s.language);
const setLanguage = useLanguageStore((s) => s.setLanguage);
return (
{LANGS.map((l) => {
const active = language === l.code;
return (
setLanguage(l.code)}
activeOpacity={0.7}
style={{
paddingHorizontal: 12,
paddingVertical: 6,
borderRadius: 8,
backgroundColor: active ? colors.brandOrange : colors.surfaceElevated,
}}
>
{l.label}
);
})}
);
}
/**
* Slide 1: Lyra stellt sich vor + erklärt die Mission in einem Satz.
* Hat den langen Empathie-Touch, weil's der erste Eindruck nach Signup ist.
*/
export function WelcomeSlide({
onNext,
current,
total,
}: {
onNext: () => void;
current: number;
total: number;
}) {
const { t } = useTranslation();
const colors = useColors();
return (
}
>
);
}
function BulletRow({
icon,
text,
colors,
}: {
icon: keyof typeof Ionicons.glyphMap;
text: string;
colors: import('../../../lib/theme').ColorScheme;
}) {
return (
{text}
);
}