import React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

// ─── Screen imports ────────────────────────────────────────────────────────────

import HomeScreen from '../screens/home/HomeScreen';
import SearchScreen from '../screens/home/SearchScreen';
import PickOnMapScreen from '../screens/home/PickOnMapScreen';
import CreateRideScreen from '../screens/home/CreateRideScreen';
import MatchListScreen from '../screens/home/MatchListScreen';
import ActiveRideScreen from '../screens/home/ActiveRideScreen';
import RateRideScreen from '../screens/home/RateRideScreen';
import NotificationsScreen from '../screens/home/NotificationsScreen';
import SOSScreen from '../screens/safety/SOSScreen';

// ─── Types ─────────────────────────────────────────────────────────────────────

import type { HomeStackParamList } from './types';

type HomeStack = createNativeStackNavigator<HomeStackParamList>;

// ─── HomeStackNavigator ────────────────────────────────────────────────────────

export default function HomeStackNavigator() {
  const Stack = createNativeStackNavigator<HomeStackParamList>();

  return (
    <Stack.Navigator
      initialRouteName="Home"
      screenOptions={{
        headerShown: false,
        animation: 'slide_from_right',
      }}
    >
      <Stack.Screen name="Home" component={HomeScreen} />
      <Stack.Screen name="Search" component={SearchScreen} />
      <Stack.Screen
        name="PickOnMap"
        component={PickOnMapScreen}
        options={{ animation: 'slide_from_bottom', presentation: 'modal' }}
      />
      <Stack.Screen name="CreateRide" component={CreateRideScreen} />
      <Stack.Screen name="MatchList" component={MatchListScreen} />
      <Stack.Screen name="ActiveRide" component={ActiveRideScreen} />
      <Stack.Screen
        name="RateRide"
        component={RateRideScreen}
        options={{ animation: 'slide_from_bottom', presentation: 'modal' }}
      />
      <Stack.Screen name="Notifications" component={NotificationsScreen} />
      <Stack.Screen
        name="SOS"
        component={SOSScreen}
        options={{ animation: 'slide_from_bottom', presentation: 'modal' }}
      />
    </Stack.Navigator>
  );
}
