import React from 'react';
import { StyleSheet, View } from 'react-native';
import { useFonts } from 'expo-font';
import AppLoading from 'expo-app-loading';
import { PxLink } from '@proximus/react-native-common-ui/lib/links/PxLink';
import { Nucleo } from '@proximus/react-native-font-icons';

export default function App() {
  const [loaded] = useFonts({
    // prettier-ignore
    'Nucleo': require('@proximus/react-native-font-icons/lib/assets/fonts/Nucleo.ttf'),
    'Proximus-Bold': require('@proximus/react-native-font-icons/lib/assets/fonts/Proximus-Bold.ttf'),
    'Proximus-Regular': require('@proximus/react-native-font-icons/lib/assets/fonts/Proximus-Regular.ttf'),
    Proximus: require('@proximus/react-native-font-icons/lib/assets/fonts/Proximus-Regular.ttf'),
  });

  if (!loaded) {
    return <AppLoading />;
  }

  return (
    <View style={styles.container}>
      <PxLink
        iconName={Nucleo.Edit}
        label={'Edit'}
        onPress={() => {}}
        iconFont={'nucleo'}
        iconPosition={'left'}
      />
      <PxLink
        iconName={Nucleo.Edit}
        label={'Edit hover'}
        onPress={() => {}}
        iconFont={'nucleo'}
        hover
        iconPosition={'left'}
      />
      <PxLink
        iconName={Nucleo.Edit}
        label={'Edit disabled'}
        onPress={() => {}}
        iconFont={'nucleo'}
        disabled
        iconPosition={'left'}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#fff',
    paddingHorizontal: 5,
  },
});
