import React, { Component } from 'react';
import { StyleSheet, View, Image, StatusBar, ScrollView, TouchableOpacity } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
const route = require('./../../route.json');
let slugify = require('slugify');
import I18n from 'react-native-i18n'
import * as Utils from '../../utils/DeviceUtils';
import { Images } from '../../config/Images';
import CustomText from '../../components/CustomText';
import { Color } from '../../config/Color';
import { SafeAreaView } from 'react-navigation';
import { baseUrl } from '../../webservice/IlinkConstants';
import { IlinkEmitter } from "../../utils/events";
import { Provider, Appbar } from 'react-native-paper';
const card = [
{
id: "12",
name: "Canal +",
countryId: "78"
},
{
id: "14",
name: "Airtel Money",
countryId: "78"
},
{
id: "17",
name: "SEEG",
countryId: "78"
},
{
id: "19",
name: "Juba",
countryId: "78"
},
{
id: "77",
name: "Mobicash",
countryId: "78"
},
{
id: "82",
name: "Western Union",
countryId: "78"
},
{
id: "95",
name: "MoneyGram",
countryId: "78"
},
{
id: "100",
name: "Express Union",
countryId: "78"
},
{
id: "109",
name: "Money Express",
countryId: "78"
},
{
id: "118",
name: "UBA",
countryId: "78"
},
{
id: "135",
name: "Small World",
countryId: "78"
},
{
id: "158",
name: "Wari",
countryId: "78"
},
{
id: "171",
name: "Ria",
countryId: "78"
},
{
id: "184",
name: "Sigue",
countryId: "78"
},
{
id: "197",
name: "Ecobank",
countryId: "78"
},
{
id: "209",
name: "DHL",
countryId: "78"
},
{
id: "220",
name: "OraBank",
countryId: "78"
},
{
id: "223",
name: "Satcon",
countryId: "78"
},
{
id: "235",
name: "FINAM ",
countryId: "78"
},
{
id: "237",
name: "UBA fs ilink",
countryId: "78"
}
];
export default class WalletSelect extends Component {
constructor(props) {
super(props);
this.state = {
loading: true
}
slugify.extend({ '+': 'plus' });
IlinkEmitter.on("langueChange", this.updateLangue.bind(this));
}
static navigationOptions = ({ navigation }) => ({
header: null,
headerMode: 'none',
headerTitle: null,
activeColor: '#f0edf6',
inactiveColor: '#3e2465',
barStyle: { backgroundColor: '#694fad' },
drawerLabel: I18n.t('CREDIT_MANAGE'),
drawerIcon: ({ tintColor }) => (
)
});
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('WALLET') })
this.forceUpdate()
}
render() {
return (
{ this.props.navigation.pop() }}
/>
{
card.map((item, index) => {
let icon = `${baseUrl}/datas/img/network/${slugify(item.name, { lower: true })}-logo.png`;
console.log(icon);
return (
this.props.navigation.push('walletDetail')}>
{item.name}
Pays: Gabon
{item.primary ? (
{I18n.t('PRINCIPAL')}
) : null}
)
})
}
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Color.containerBackgroundColor,
},
paymentItem: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
borderBottomWidth: 1,
paddingVertical: 5,
width: "100%",
marginBottom: 15
},
iconContent: {
width: 60,
marginRight: 10,
alignItems: "center"
}
});