import React, { Component } from 'react';
import { Animated, StyleSheet, View, Image, StatusBar, ScrollView, TouchableOpacity } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
const route = require('./../../route.json')
import I18n from 'react-native-i18n'
import { TabView, TabBar, SceneMap } from 'react-native-tab-view';
import * as Utils from '../../utils/DeviceUtils';
import { Images } from '../../config/Images';
import CustomText from '../../components/CustomText';
import CustomButton from '../../components/CustomButton';
import { Color } from '../../config/Color';
import Tag from '../../components/Tag';
import { SafeAreaView } from 'react-navigation';
import { IlinkEmitter } from "../../utils/events";
import { CreditCardInput } from "react-native-credit-card-input";
require('../../utils/Translations');
const FirstRoute = () => (
{I18n.t('ENTER_YOUR_CARD_ID')}
{ console.log('click') }}>
{I18n.t('VALIDATE')}
);
const SecondRoute = () => (
);
export default class WalletDetail extends Component {
constructor(props) {
super(props);
this.state = {
index: 0,
routes: [
{ key: 'depot', title: I18n.t('DEPOSIT') },
{ key: 'retrait', title: I18n.t('WITHDRAWAL') }
]
};
this.scrollY = new Animated.Value(0);
IlinkEmitter.on("langueChange", this.updateLangue.bind(this));
}
static options(passProps) {
return {
topBar: {
drawBehind: false,
visible: true,
animate: true,
buttonColor: 'white',
background: {
color: 'white',
},
rightButtons: []
},
backButton: {
visible: true,
color: "white"
},
buttonColor: "white",
background: {
color: Color.primaryDarkColor
},
statusBar: {
drawBehind: false,
visible: true,
}
};
}
static navigationOptions = ({ navigation }) => {
return {
headerTitle: I18n.t('WALLET'),
headerStyle: {
backgroundColor: Color.primaryColor,
paddingTop: 10
},
headerTitleStyle: {
color: "white"
}
}
};
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('WALLET') })
this.forceUpdate()
}
handleIndexChange = index => this.setState({ index });
imageScale = () => {
return this.scrollY.interpolate({
inputRange: [0, 100],
outputRange: [1, 0.5],
extrapolate: 'clamp',
});
}
imageTranslateY = () => {
return this.scrollY.interpolate({
inputRange: [0, 100],
outputRange: [-5, 50],
extrapolate: 'clamp',
});
}
renderTabBar = props => (
(
{
(route.key === 'depot') ?
()
:
()
}
{` ${route.title}`}
)}
/>
);
render() {
const { index, routes } = this.state;
return (
{I18n.t('COMMISSION_ACCOUNT_TITLE')}
100 000F
Brice Zele
{I18n.t('TRANSFER_TO_PRINCIPAL_ACCOUNT')} ->
{I18n.t('PRINCIPAL_ACCOUNT_TITLE')}
1000 000F
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Color.containerBackgroundColor
},
indicator: {
height: 2
},
tab: {
width: Utils.getWidthDevice() / 2
},
tabbar: {
height: 40
},
containField: {
margin: 20,
marginTop: 90,
flexDirection: "row",
height: 140,
borderRadius: 10
},
contentLeftItem: {
flex: 1,
paddingTop: 40,
paddingLeft: 10,
paddingRight: 10,
alignItems: "center"
},
tagFollow: { width: 150, margin: 10 },
profileItem: {
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
paddingBottom: 20,
paddingTop: 20
},
checkDefault: {
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
borderBottomWidth: 1,
paddingVertical: 15,
marginTop: 10
}
})