//@ts-nocheck
import React from 'react';
import { Image, SafeAreaView, TouchableOpacity, View } from 'react-native';
import Modal from 'react-native-modal';
import { Close2Icon, CloseIcon, IconNavClose } from '../assets/icons';
import { MText } from './MText';
interface IModalOptionLoan {
  open: boolean;
  onClose: () => void;
}
export default function AlertLoan({ open, onClose }: IModalOptionLoan) {
  return (
    <Modal isVisible={open}>
      <SafeAreaView
        style={{
          backgroundColor: '#FFFFFF',
          borderRadius: 12,
        }}
      >
        <View
          style={{
            flexDirection: 'row-reverse',
            marginTop: 5,
          }}
        >
          <TouchableOpacity
            onPress={onClose}
            style={{
              width: 30,
              height: 30,
              alignItems: 'center',
              justifyContent: 'center',
            }}
          >
            <Close2Icon />
          </TouchableOpacity>
        </View>
        <Image
          source={require('../assets/img/Frame1000011990.png')}
          style={{
            height: 230,
            resizeMode: 'contain',
            width: '100%',
          }}
        />

        <View
          style={{
            paddingHorizontal: 24,
            marginTop: 24,
            flexDirection: 'column',
            gap: 8,
            alignItems: 'center',
          }}
        >
          <MText
            style={{
              fontSize: 16,
              fontWeight: 'bold',
              textAlign: 'center',
            }}
          >
            Đơn vay đang chờ phê duyệt
          </MText>
          <MText
            style={{
              fontSize: 14,
              textAlign: 'center',
              color: '#828282',
            }}
          >
            Vui lòng chờ ít phút sau đó thực hiện eKYC để hoàn thiện khoản vay!
          </MText>
          <TouchableOpacity
            onPress={onClose}
            style={{
              borderWidth: 1,
              borderColor: '#EF592E',
              borderRadius: 24,
              height: 40,
              alignItems: 'center',
              justifyContent: 'center',
              paddingHorizontal: 50,
              marginBottom: 24,
              marginTop: 16,
            }}
          >
            <MText
              style={{
                color: '#EF592E',
              }}
            >
              Đã hiểu
            </MText>
          </TouchableOpacity>
        </View>
      </SafeAreaView>
    </Modal>
  );
}
