import React, { Component } from 'react';
import { ScrollView } from 'react-native';
import {
  Container,
  Content,
  Button,
  Text,
  Icon,
} from 'native-base';
import AppHeader from '../components/Header';
import BtnSettings from '../components/BtnSettings';

class Menu extends Component {

  constructor(props) {
    super(props);
    this.props.navigation.state.key = 'SettingsScreen'
  }

  render() {

    var { goBack } = this.props.navigation

    return (
      <Container>
        <AppHeader
          headerText={"Setting"}
          headerLeft={
            <Button onPress={() => goBack(null)}>
              <Icon name='arrow-back' />
            </Button>
          }
        />

        <Content>
          <ScrollView>
            <BtnSettings
              text={"ตั้งค่าช่วงเวลาแจ้งเตือน"}
              onPress={() => {
                this.props.navigation.navigate('SettingsTime', { keyBScreen: this.props.navigation.state.key });
              }}
            />
          </ScrollView>
        </Content>


      </Container>
    )
  };

  _onMenuPressed() {
    this.props.navigation.navigate("DrawerToggle");
  }
}

export default Menu;