import React from "react";
import { TextInput, StyleSheet, StyleProp, ViewStyle, KeyboardTypeOptions } from "react-native";

interface NormalInputProps {
	placeholder: string;
	extendedStyle?: StyleProp<ViewStyle>;
	onChangeText: (text: string) => void;
	type?: KeyboardTypeOptions;
	secureTextEntry?: boolean;
}

const NormalInput: React.FC<NormalInputProps> = ({
	placeholder,
	extendedStyle,
	type,
	onChangeText,
	secureTextEntry = false,
}) => {
	return (
		<TextInput
			style={[styles.textInput, extendedStyle]}
			placeholder={placeholder}
			keyboardType={type ? type : "default"}
			onChangeText={onChangeText}
			secureTextEntry={secureTextEntry}
		/>
	);
};

const styles = StyleSheet.create({
	textInput: {
		maxWidth: "100%",
		height: 60,
		borderWidth: 1,
		margin: 10,
		padding: 20,
		borderRadius: 8,
		borderColor: "#bbbbbb",
	},
});

export default NormalInput;
