/*
 * File: navigationTypes.ts
 * Description: TypeScript types for PatientCare module navigation
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

import { StackNavigationProp } from '@react-navigation/stack';
import { MedicalCase } from '../../../shared/types';

// ============================================================================
// NAVIGATION PARAMETER LISTS
// ============================================================================

/**
 * PatientCareStackParamList - Defines the parameter list for PatientCare stack navigator
 * 
 * This interface defines all the screens available in the PatientCare module
 * and their associated navigation parameters.
 */
export type PatientCareStackParamList = {
  // Patients Screen - Main patient list with search and filtering
  PatientsScreen: PatientsScreenParams;
  
  // Patient Details Screen - Comprehensive patient information and DICOM images
  PatientDetails: PatientDetailsScreenParams;
};

// ============================================================================
// SCREEN PARAMETER INTERFACES
// ============================================================================

/**
 * PatientsScreenParams
 * 
 * Purpose: Parameters for the patients list screen
 * 
 * Parameters:
 * - None required - this is the main entry point
 */
export interface PatientsScreenParams {
  // No parameters required for main patients screen
}

/**
 * PatientDetailsScreenParams
 * 
 * Purpose: Parameters for the patient details screen
 * 
 * Parameters:
 * - patientId: Required patient ID to display details
 * - patientName: Optional patient name for display (will be fetched from API if not provided)
 */
export interface PatientDetailsScreenParams {
  patientId: string;
  patientName?: string;
}

// ============================================================================
// NAVIGATION PROP TYPES
// ============================================================================

/**
 * PatientCareNavigationProp - Navigation prop type for PatientCare screens
 * 
 * Purpose: Provides type-safe navigation methods for PatientCare module screens
 */
export type PatientCareNavigationProp = StackNavigationProp<PatientCareStackParamList>;

// ============================================================================
// SCREEN PROP TYPES
// ============================================================================

/**
 * PatientsScreenProps - Props for PatientsScreen component
 */
export interface PatientsScreenProps {
  navigation: PatientCareNavigationProp;
  route: {
    params: PatientsScreenParams;
  };
}

/**
 * PatientDetailsScreenProps - Props for PatientDetailsScreen component
 */
export interface PatientDetailsScreenProps {
  navigation: PatientCareNavigationProp;
  route: {
    params: PatientDetailsScreenParams;
  };
}

// ============================================================================
// NAVIGATION UTILITY TYPES
// ============================================================================

/**
 * NavigationHelper - Helper type for navigation functions
 * 
 * Purpose: Provides type-safe navigation helper functions
 */
export type NavigationHelper = {
  navigateToPatientDetails: (
    patientId: string,
    patientName: string,
    medicalCase: MedicalCase
  ) => void;
  navigateBack: () => void;
};

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