import { View, Text, StyleSheet, Image } from 'react-native';
import { router } from 'expo-router';
import { SafeAreaView } from 'react-native-safe-area-context';
import NormalButton from '../../../global/normal_button';
import { useTranslation } from 'react-i18next'; // 添加国际化支持

const ResetSuccessful = ({}) => {
    const { t } = useTranslation(); // 使用翻译钩子
    
    return (
        <SafeAreaView className="flex-1">
            <View className="flex-1 justify-center">
                <View className="items-center space-y-6">
                    <Text style={styles.titleText}>{t('forgotPassword.two.success_title')}</Text>
                    <Text style={styles.text}>{t('forgotPassword.two.welcome_message')}</Text>
                    <Text style={styles.text}>{t('forgotPassword.two.good_luck')}</Text>
                </View>
                <Image
                    style={{
                        alignSelf: 'center'
                    }}
                    source={require('../../../../assets/successLogo.png')}
                />
                <View className="mx-[5%]">
                    <NormalButton
                        onPress={() => router.replace('login')}
                        title={<Text className="text-white">{t('forgotPassword.two.finish')}</Text>}
                    />
                </View>
            </View>
        </SafeAreaView>
    );
};

const styles = StyleSheet.create({
    titleText: { fontSize: 32, fontWeight: '400' },
    text: {
        fontSize: 18
    }
});

export default ResetSuccessful;