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

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}>
      <PxTextButton
        title={'Default'}
        icon={Nucleo.ArrowRight}
        style={{ marginVertical: 5 }}
      />
      <PxTextButton
        title={'Disabled'}
        icon={Nucleo.ArrowRight}
        disabled
        style={{ marginVertical: 5 }}
      />
      <PxTextButton
        title={'Hover'}
        icon={Nucleo.ArrowRight}
        isHovered
        style={{ marginVertical: 5 }}
      />
    </View>
  );
}

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