import React from "react";
import { createStackNavigator } from "@react-navigation/stack";

import { Palette } from "../styles";
import { Routes } from "./Routes";

import Tasks from "../screens/Tasks";

const screenOptions = {
  headerShown: false,
  cardOverlayEnabled: true,
  headerStyle: {
    backgroundColor: Palette.background,
  },
  headerTitleAlign: "center",
  headerBackTitleVisible: false,
};

const HomeStack = createStackNavigator();

export default () => {
  return (
    <HomeStack.Navigator
      initialRouteName={Routes.Tasks}
      screenOptions={[
        {
          contentStyle: {
            backgroundColor: Palette.white,
          },
        },
        screenOptions,
      ]}
    >
      <HomeStack.Screen
        name={Routes.Tasks}
        component={Tasks}
        options={{ headerShown: false }}
      />
    </HomeStack.Navigator>
  );
};
