import React, { useState } from 'react'; import { View, TextInput, Text, TouchableOpacity, TextInputProps } from 'react-native'; interface AppInputProps extends TextInputProps { label?: string; error?: string; secureToggle?: boolean; leftIcon?: React.ReactNode; } export const AppInput: React.FC = ({ label, error, secureToggle, leftIcon, ...props }) => { const [showPassword, setShowPassword] = useState(false); return ( {label && ( {label} )} {leftIcon && {leftIcon}} {secureToggle && ( setShowPassword(!showPassword)}> {showPassword ? 'Hide' : 'Show'} )} {error && {error}} ); };