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

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

import RidesListScreen from '../screens/rides/RidesListScreen';
import RideDetailScreen from '../screens/rides/RideDetailScreen';

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

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

type RidesStack = createNativeStackNavigator<RidesStackParamList>;

// ─── RidesStackNavigator ───────────────────────────────────────────────────────

export default function RidesStackNavigator() {
  const Stack = createNativeStackNavigator<RidesStackParamList>();

  return (
    <Stack.Navigator
      initialRouteName="RidesList"
      screenOptions={{
        headerShown: false,
        animation: 'slide_from_right',
      }}
    >
      <Stack.Screen name="RidesList" component={RidesListScreen} />
      <Stack.Screen name="RideDetail" component={RideDetailScreen} />
    </Stack.Navigator>
  );
}
