/**
 *  Navigation Routes defind
 */
import React from 'react';
import { createStackNavigator } from 'react-navigation-stack';
import { Transition } from 'react-native-reanimated';

import SplashScreen from './../containers/SplashScreen';
import LoginScreen from './../containers/App/Login/LoginScreen';
import RegisterScreen from './../containers/App/SignUp/RegisterScreen';
import ForgotPasswordScreen from '../containers/App/ForgotPassword/ForgotPasswordScreen';
import ResetPasswordScreen from '../containers/App/ResetPassword/ResetPasswordScreen';
import ChangePasswordScreen from '../containers/App/ChangePassword/ChangePasswordScreen';
import ProfileScreen from './../containers/App/Profile/ProfileScreen';
import SearchBookScreen from './../containers/App/SearchBook/SearchBookScreen';
import BookDetailsScreen from '../containers/App/BookDetails/BookDetailsScreen';

import DrawerNavScreen from './DrawerNavigataion/DrawerNavScreen';
import BookRequestListScreen from './../containers/App/BookRequestList/BookRequestList';
import BookRequestDetailsScreen from '../containers/App/BookRequestList/BookRequestDetails';
import NewBookRequestScreen from '../containers/App/BookRequestList/NewBookRequest';
import BookHistoryScreen from './../containers/App/BookHistory/BookHistoryScreen';
import BookHistoryDetailsScreen from '../containers/App/BookHistory/BookHistoryDetailsScreen';

const routes = {
  Splash: {
    screen: SplashScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  Login: {
    screen: LoginScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  DashBoard: {
    screen: DrawerNavScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  Register: {
    screen: RegisterScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  ForgotPassword: {
    screen: ForgotPasswordScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  ResetPassword: {
    screen: ResetPasswordScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  Profile: {
    screen: ProfileScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  ChangePassword: {
    screen: ChangePasswordScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  SearchBook: {
    screen: SearchBookScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  BookDetails: {
    screen: BookDetailsScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  BookHistory: {
    screen: BookHistoryScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  BookHistoryDetails: {
    screen: BookHistoryDetailsScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  BookRequestList: {
    screen: BookRequestListScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  BookRequestDetails: {
    screen: BookRequestDetailsScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  },
  NewBookRequest: {
    screen: NewBookRequestScreen,
    navigationOptions: () => ({
      gesturesEnabled: false
    })
  }
};

const routeConfig = {
  initialRouteName: 'Profile ',
  headerMode: 'none',
  navigationOptions: {
    gesturesEnabled: false
  },
  transition: (
    <Transition.Together>
      <Transition.Out
        type="slide-left"
        durationMs={250}
        interpolation="easeIn"
      />
      <Transition.In type="slide-right" durationMs={300} />
    </Transition.Together>
  )
};

const AppNavigation = createStackNavigator(routes, routeConfig);

export default AppNavigation;
