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

export default function App() {
  const [loaded] = useFonts({
    '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}>
      <PxButton
        title={'Order button'}
        style={{ marginVertical: 4 }}
        type={'order'}
      />
      <PxButton
        title={'without Rounded corner button'}
        isRoundedBottomCorner={false}
        style={{ marginVertical: 4 }}
        type={'order'}
      />
      <PxButton
        title={'Disabled button'}
        disabled
        style={{ marginVertical: 4 }}
        type={'order'}
      />
      <PxButton
        title={'Hovered button'}
        isHovered
        style={{ marginVertical: 4 }}
        type={'order'}
      />
    </View>
  );
}

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