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

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

import ConversationListScreen from '../screens/chat/ConversationListScreen';
import ChatDetailScreen from '../screens/chat/ChatDetailScreen';

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

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

type ChatStack = createNativeStackNavigator<ChatStackParamList>;

// ─── ChatStackNavigator ────────────────────────────────────────────────────────

export default function ChatStackNavigator() {
  const Stack = createNativeStackNavigator<ChatStackParamList>();

  return (
    <Stack.Navigator
      initialRouteName="ConversationList"
      screenOptions={{
        headerShown: false,
        animation: 'slide_from_right',
      }}
    >
      <Stack.Screen name="ConversationList" component={ConversationListScreen} />
      <Stack.Screen name="ChatDetail" component={ChatDetailScreen} />
    </Stack.Navigator>
  );
}
