/*
 * 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 PatientCare screens for dashboard integration
// import { PatientDetailsScreen } from '../../PatientCare/screens/PatientDetailsScreen';
// import { FeedbackDetailScreen } from '../../PatientCare/screens/FeedbackDetailScreen';

// Import navigation types
import { DashboardStackParamList } from './navigationTypes';
import { theme } from '../../../theme';
import { PatientDetailsScreen } from '../../PatientCare';
import FeedbackDetailScreen from '../../PatientCare/screens/FeedbackDetailScreen';

// 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
        }}
      />

      {/* Patient Details Screen - Accessible from dashboard */}
      <Stack.Screen
        name="PatientDetails"
        component={PatientDetailsScreen}
        options={{
          title: 'Patient Details',
          headerShown: true,
          headerStyle: {
            backgroundColor: '#FFFFFF',
            elevation: 0,
            shadowOpacity: 0,
          },
          headerTitleStyle: {
            fontFamily: theme.typography.fontFamily.medium,
            fontSize: 18,
            color: '#212121',
          },
          headerTintColor: '#2196F3',
          headerBackTitleVisible: false,
        }}
      />

      {/* Feedback Detail Screen - Accessible from dashboard */}
      <Stack.Screen
        name="FeedbackDetail"
        component={FeedbackDetailScreen}
        options={{
          title: 'Feedback Details',
          headerShown: true,
          headerStyle: {
            backgroundColor: '#FFFFFF',
            elevation: 0,
            shadowOpacity: 0,
          },
          headerTitleStyle: {
            fontFamily: theme.typography.fontFamily.medium,
            fontSize: 18,
            color: '#212121',
          },
          headerTintColor: '#2196F3',
          headerBackTitleVisible: false,
        }}
      />
    </Stack.Navigator>
  );
};

export default DashboardStackNavigator;

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