import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { NavigationContainer } from "@react-navigation/native";
import React from "react";
import CityList from "../CityList";
import Home from "../Home";
import CityNavigator from "./CityNavigation";

export default function Navigation() {
    const BottomTabNavigator = createBottomTabNavigator();
    return (
        <NavigationContainer>
            <BottomTabNavigator.Navigator initialRouteName="Home">
            <BottomTabNavigator.Screen name="Home" component={CityNavigator}
                           options={{
                             title: 'Home'
                           }}/>
                <BottomTabNavigator.Screen name="CityList" component={CityList}
                                           options={{
                                               title: 'CityList',
                                           }}/>
            </BottomTabNavigator.Navigator>
        </NavigationContainer>
    )
}
