import React from 'react';
import {View, Text, StyleSheet, FlatList} from 'react-native';
import R from '../../assets/R';
import HeaderBack from '../../components/Header/HeaderBack';
import Item from './Item';

const data = [
  {
    image: R.images.iconNganLuong,
    title: 'Ngân lượng',
    rose: 0,
    time: 'Tức thời',
    minPay: 5,
    id: '1',
  },
  {
    image: R.images.iconVisa,
    title: 'Visa bank',
    rose: 0,
    time: 'Tức thời',
    minPay: 1,
    id: '2',
  },
  {
    image: R.images.iconInternet,
    title: 'Internet banking',
    rose: 0,
    time: 'Tức thời',
    minPay: 5,
    id: '3',
  },
  {
    image: R.images.iconBitcoin,
    title: 'Bitcoin',
    rose: 0,
    time: 'Tức thời',
    minPay: 2,
    id: '4',
  },
  {
    image: R.images.iconSticpay,
    title: 'Sticpay',
    rose: 0,
    time: 'Tức thời',
    minPay: 1,
    id: '5',
  },
  {
    image: R.images.iconTether,
    title: 'Tether',
    rose: 0,
    time: 'Tức thời',
    minPay: 10,
    id: '6',
  },
];

const MethodPayView = (props) => {
  return (
    <View style={{flex: 1}}>
      <HeaderBack title={'Cài đặt phương thức thanh toán'} />
      <View style={{flex: 1}}>
        <FlatList
          keyExtractor={(item) => item.id}
          showsVerticalScrollIndicator={false}
          data={data}
          renderItem={({item}) => <Item item={item} />}
        />
      </View>
    </View>
  );
};

const styles = StyleSheet.create({});

export default MethodPayView;
