import React, { Component } from 'react';
import { DrawerNavigator, StackNavigator } from 'react-navigation';

import HomeScreen from './../screens/HomeScreen';
import CameraScreen from './../screens/CameraScreen';
import PreviewPhotoScreen from './../screens/PreviewPhotoScreen';
import SettingsScreen from './../screens/SettingsScreen';
import MedicationsScreen from './../screens/MedicationsScreen';
import SignInScreen from './../screens/SignInScreen';
import MainScreen from './../screens/MainScreen';
import SettingsTimePeriod from './../screens/SettingsTimePeriod';
import ReminderDetail from './../screens/ReminderDetail';
import AppointmentsScreen from './../screens/AppointmentsScreen';
import MedicationsListScreen from './../screens/MedicationListScreen';
import AppointmentsListScreen from './../screens/AppointmentListScreen';


const HomeNavigator = StackNavigator({
  Home: {
    screen: HomeScreen
  },
  Detail: {
    screen: ReminderDetail
  }
}, {
    headerMode: 'none'
  })

const CameraNavigator = StackNavigator({
  Camera: {
    screen: CameraScreen,
  },
  PreviewPhoto: {
    screen: PreviewPhotoScreen,
  }
}, {
    headerMode: 'none'
  })

const SettingsNavigator = StackNavigator({
  Settings: {
    screen: SettingsScreen
  },
  SettingsTime: {
    screen: SettingsTimePeriod
  }
}, {
    headerMode: 'none'
  })

const MedicationsNavigator = StackNavigator({
  MedicationsList: {
    screen: MedicationsListScreen
  },
  AddMedication: {
    screen: MedicationsScreen
  }
}, {
    headerMode: 'none'
  })

const AppointmentsNavigator = StackNavigator({
  AppointmentsList: {
    screen: AppointmentsListScreen,
  },
  AddAppointment: {
    screen: AppointmentsScreen,
  }
}, {
    headerMode: 'none'
  })



const RootNavigator = StackNavigator(
  {
    Home: {
      screen: DrawerNavigator({
        Home: {
          screen: HomeNavigator,
        },
        Camera: {
          screen: CameraNavigator,
        },
        Medications: {
          screen: MedicationsNavigator
        },
        Appointments: {
          screen: AppointmentsNavigator,
        },
        Settings: {
          screen: SettingsNavigator,
        }
      })
    },
    SignIn: {
      screen: SignInScreen,
    },
  }, {
    headerMode: 'none'
  }
)

export default RootNavigator;