/*
 * File: DashboardStackNavigator.tsx
 * Description: Stack navigator for dashboard screens within the Dashboard module
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

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

// Import dashboard screens
import { DashboardScreen } from '../screens/DashboardScreen';

// Import navigation types
import { DashboardStackParamList } from './navigationTypes';
import { theme } from '../../../theme';

// Create stack navigator for Dashboard module
const Stack = createStackNavigator<DashboardStackParamList>();

/**
 * DashboardStackNavigator - Manages navigation between dashboard screens
 * 
 * This navigator handles the flow between:
 * - DashboardScreen: Main ER dashboard with patient overview
 * - Future screens: Patient details, alerts, reports, etc.
 * 
 * Features:
 * - Clean header styling
 * - Smooth transitions between screens
 * - Type-safe navigation parameters
 * - Healthcare-focused design
 */
const DashboardStackNavigator: React.FC = () => {
  return (
    <Stack.Navigator
      initialRouteName="ERDashboard"
      screenOptions={{
        // Header styling for dashboard screens
        headerStyle: {
          backgroundColor: '#FFFFFF',
          elevation: 0, // Remove shadow on Android
          shadowOpacity: 0, // Remove shadow on iOS
        },
        headerTitleStyle: {
          fontFamily: theme.typography.fontFamily.medium,
          fontSize: 18,
          color: '#212121',
        },
        headerTintColor: '#2196F3', // Back button and title color
        headerBackTitleVisible: false, // Hide back title on iOS
        cardStyle: {
          backgroundColor: '#FFFFFF',
        },
        // Smooth transitions
        transitionSpec: {
          open: {
            animation: 'timing',
            config: {
              duration: 300,
            },
          },
          close: {
            animation: 'timing',
            config: {
              duration: 300,
            },
          },
        },
      }}
    >
      {/* ER Dashboard Screen - Main dashboard entry point */}
      <Stack.Screen
        name="ERDashboard"
        component={DashboardScreen}
        options={{
          title: 'ER Dashboard',
          headerShown: false, // Hide header for main dashboard
        }}
      />
    </Stack.Navigator>
  );
};

export default DashboardStackNavigator;

/*
 * End of File: DashboardStackNavigator.tsx
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */ 