import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View , FlatList} from 'react-native';
import exercises from './assets/data/exercises.json';
import ExerciseListItem from './assets/data/src/components/ExerciseListItem';


export default function App() {

  return (
    <View style={styles.container}>
      <FlatList 
        contentContainerStyle={{gap:5}} 
        keyExtractor={(item, index)=> item.name+index}
        data={exercises} 
        renderItem={({item, index})=> <ExerciseListItem item={item} />
      }
      />
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'gainsboro',
    justifyContent: 'center',
    padding: 10,
    paddingTop: 70,
    alignItems: 'center',
    gap:10
  },
  title:{
     fontSize:44,
  },
  eCont: {
    width: '100%',
    backgroundColor: 'aliceblue',
    padding: 10,
    borderRadius: 10,
  },
  description:{
    color: 'dimgrey'
 },
});
