import React, {useState} from 'react';
import {
  SafeAreaView,
  ScrollView,
  StyleSheet,
  View,
  TouchableOpacity,
  Text,
} from 'react-native';

import Timer from './src/components/timer';

function App() {
  const [play, setPlay] = useState(true);

  return (
    <SafeAreaView>
      <ScrollView>
        <View style={styles.container}>
          <Timer time={5000} play={play} showCircles={true} />
        </View>
        <TouchableOpacity style={styles.button} onPress={() => setPlay(!play)}>
          <Text style={styles.text}>{play ? 'Pause' : 'Play'}</Text>
        </TouchableOpacity>
      </ScrollView>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'white',
    alignContent: 'center',
    justifyContent: 'center',
  },
});

export default App;
