import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import IntegrationsHomeScreen from '../screens/IntegrationsHomeScreen';
import IntegrationCategoryScreen from '../screens/IntegrationCategoryScreen';
import ComingSoonScreen from '../screens/ComingSoonScreen';

export type IntegrationsStackParamList = {
  IntegrationsHome: undefined;
  IntegrationCategory: { categoryKey: string; title: string };
  ComingSoon: undefined;
};

const Stack = createStackNavigator<IntegrationsStackParamList>();

const IntegrationsNavigator = () => (
  <Stack.Navigator>
    <Stack.Screen name="IntegrationsHome" component={IntegrationsHomeScreen} options={{ title: 'Integrations',headerShown:false }} />
    <Stack.Screen name="IntegrationCategory" component={IntegrationCategoryScreen} options={({ route }) => ({ title: route.params.title,headerShown:false })} />
    <Stack.Screen name="ComingSoon" component={ComingSoonScreen} options={{ title: 'Coming Soon', headerShown: false }} />
  </Stack.Navigator>
);

export default IntegrationsNavigator;


