import { Entypo } from '@expo/vector-icons';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { LANG } from '../../lang/translations';

export const LanguageIcon = () => {
    const changeLanguage = () => {
        if (LANG.locale === 'es') {
            // Change to english RTL
            LANG.locale = 'en';
            

        }
        else {
            LANG.locale = 'es';
        }
    }

    return (
        <TouchableOpacity onPress={changeLanguage}>
            <Entypo name="language" size={24} color="black" />
        </TouchableOpacity>
    );
}