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

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

import Chat from "../screens/Chat";

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

const HomeStack = createStackNavigator();

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