//@ts-nocheck
import { useNavigation } from '@react-navigation/native';
import { observer } from 'mobx-react-lite';
import React from 'react';
import {
  Image,
  ImageStyle,
  SafeAreaView,
  ScrollView,
  TouchableOpacity,
  View,
} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { CIMBBank, IconBack } from '../../assets/icons';
import MButton from '../../components/MButton';
import { MText } from '../../components/MText';
import { color } from '../../theme';
import { formatDDMMYYY, formatMoney } from '../../utils';
import { commonStyles } from '../CommonStyles';

const logoView: ImageStyle = {
  position: 'absolute',
  width: '100%',
  height: '100%',
  resizeMode: 'cover',
};

export const PaymentList = observer(function PaymentList(props: any) {
  const navigation = useNavigation();
  return (
    <View style={{ flex: 1 }}>
      <Image source={require('../../assets/img/home.png')} style={logoView} />
      <SafeAreaView style={{ flex: 1 }}>
        <View
          style={[
            commonStyles.alignCenter,
            { alignItems: 'center', marginTop: 10 },
          ]}
        >
          <MButton
            //@ts-ignore
            onPress={() => {
              navigation.goBack();
            }}
            style={[{ position: 'absolute', left: 16 }]}
          >
            <IconBack fill={color.textHeader} />
          </MButton>
          <MText
            style={[
              commonStyles.textNormalBold,
              { color: color.textHeader, fontSize: 16 },
            ]}
          >
            Đơn vay {props.route?.params?.loan?.id}
          </MText>
        </View>
      </SafeAreaView>
    </View>
  );
});
