import React, {useState} from 'react';
import {
  View,
  Text,
  TextInput,
  StyleSheet,
  TouchableOpacity,
} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack';
 
import {getFontXD, HEIGHTXD, WIDTHXD} from '../../Config/Functions';
import R from '../../assets/R';


const NewPassword = (propsa) => {
  const [password, setPassword] = useState('');
  const [cfPassword, setcfPassword] = useState('');

  return (
    <View style={{flex: 1}}>
      <HeaderBack title={'Quên mật khẩu'} />

      <View style={styles.container}>
        <View style={styles.wrap}>
          <View style={styles.containerCode1}>
          <Text style={styles.txtTitle}>Vui lòng nhập mật khẩu mới</Text>
            <TextInput  
            style={styles.txtInput}
            placeholder="Nhập Email hoặc số điện thoại" 
            value={password}
            secureTextEntry={true}
            onChangeText={(val)=>setPassword(val)}
            />
          </View>
          <View style={styles.containerCode2}>
          <Text style={styles.txtTitle}>Nhập lại mật khẩu</Text>
            <TextInput  
            style={styles.txtInput}
            placeholder="Nhập Email hoặc số điện thoại" 
            value={cfPassword}
            secureTextEntry={true}
            onChangeText={(val)=>setcfPassword(val)}
            />
          </View>
        </View>
      </View>

      <View style={styles.footer}>
        <TouchableOpacity
          onPress={() => console.log('Hello')}
          style={styles.btn}>
          <Text style={styles.txtBtn}>Cập nhật</Text>
        </TouchableOpacity>
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    paddingVertical: 20,
  },
  footer: {
    height: 200,
    justifyContent: 'center',
    alignItems: 'center',
  },
  wrap: {
    flex: 1,
    paddingTop: 10,
    alignItems: 'center',
    width: '100%',
    paddingHorizontal: 50,
  },
  containerCode1: {
    height: 50,
    width: '100%',
    marginTop: 10,
  },
  containerCode2: {
    height: 50,
    width: '100%',
    marginTop: 30,
  },
  codeFieldRoot: {
    marginTop: 20,
  },
  txtTitle: {
    fontSize: getFontXD(48),
    color: '#141414',
    marginBottom: 12
  },
  txtInput: {
    height: HEIGHTXD(99),
     
    borderBottomWidth: 2,
    borderBottomColor: '#DBEBFF',
    fontSize: getFontXD(46),
    
    paddingVertical:2,
   
    color: 'black',
  },
  btn: {
    width: WIDTHXD(550),
    height: HEIGHTXD(120),
    borderRadius: 22,
    backgroundColor: '#1C6AF6',
    justifyContent: 'center',
    alignItems: 'center',
  },
  txtBtn: {
    color: R.colors.white,
    fontSize: getFontXD(52),
    textTransform: 'uppercase',
  },
  txtSend: {
    marginTop: 30,
    fontSize: getFontXD(42),
    color: '#1C6AF6',
  },
});

export default NewPassword;
