import React, { useContext } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { AuthContext } from '../context/Auth/AuthContext';


export interface Props {
  name?: string;
  icon?: string;
}
export function Profile({

}: Props): JSX.Element {
  const {dataBank} = useContext(AuthContext)
  return (
    <View style={styles.container}>
      <View>  
        <Text style={styles.textoCuenta}>Hola, {`${dataBank && dataBank.customer.fullName?dataBank.customer.fullName:""}`} </Text>
        <Text>Última Sesión: 8 dic 2022 /10:17</Text>
      </View>
      <View style={styles.containerIcono}>
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  textoCuenta: {
    fontWeight: 'bold',
    fontSize: 24,
    color: "black"
  },
  container: {
    padding: 20,
    flex: 1,
    flexDirection: 'row',
    justifyContent: 'space-between',
  },
  icono: {
    fontSize: 30,
    color: '#422d4e',
  },
  containerIcono: {
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
  },
});
