import {FC, useCallback} from "react";
import {
    GestureResponderEvent,
    Linking,
    StyleSheet,
    Text,
    TextInput,
    TouchableNativeFeedback,
    TouchableOpacity,
    View
} from "react-native";
import {RFPercentage} from "react-native-responsive-fontsize";

type Props = {
    onPress?: (event: GestureResponderEvent) => void
}

const TelegramAuthButton: FC<Props> = ({onPress}) => {
    return (
        <TouchableNativeFeedback onPress={onPress}>
            <View style={styles.buttonContainer}>
                <View style={styles.buttonContent}>
                    <Text style={styles.buttonText}>Войти</Text>
                </View>
            </View>
        </TouchableNativeFeedback>
    );
};

const styles = StyleSheet.create({
    buttonContainer: {
        justifyContent: 'center',
        alignItems: 'center',
    },
    buttonContent: {
        backgroundColor: '#0090c9',
        borderRadius: RFPercentage(1),
        paddingHorizontal: 50,
        flexDirection: 'row', // Сохранено, так как возможно добавление иконки или другого элемента в будущем
    },
    buttonText: {
        flex: 1,
        fontSize: RFPercentage(3),
        color: 'white',
        textAlign: 'center',
    },
});

export default TelegramAuthButton;