/*
 * File: constants.ts
 * Description: Application constants and configuration values
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */
import Config from 'react-native-config';

// API Configuration
export const API_CONFIG = {
  BASE_URL:Config.BASE_URL,
  DICOM_BASE_URL:'https://demo.medpacsystems.com',
  TIMEOUT: 30000,
  RETRY_ATTEMPTS: 3,
  RETRY_DELAY: 1000,
} as const;

// WebSocket Configuration
export const WEBSOCKET_CONFIG = {
  URL: 'wss://ws.neoscan-physician.com',
  RECONNECT_INTERVAL: 5000,
  MAX_RECONNECT_ATTEMPTS: 10,
  HEARTBEAT_INTERVAL: 30000,
} as const;

// Session Configuration
export const SESSION_CONFIG = {
  TIMEOUT: 8 * 60 * 60 * 1000, // 8 hours
  INACTIVITY_TIMEOUT: 30 * 60 * 1000, // 30 minutes
  DEVICE_REMEMBER_DURATION: 30 * 24 * 60 * 60 * 1000, // 30 days
} as const;

// Alert Configuration
export const ALERT_CONFIG = {
  CRITICAL_TIMEOUT: 2 * 60 * 1000, // 2 minutes
  WARNING_TIMEOUT: 10 * 60 * 1000, // 10 minutes
  INFO_TIMEOUT: 30 * 60 * 1000, // 30 minutes
  MAX_ALERTS: 100,
} as const;

// Cache Configuration
export const CACHE_CONFIG = {
  PATIENT_DATA: 15 * 60 * 1000, // 15 minutes
  MEDICAL_RECORDS: 5 * 60 * 1000, // 5 minutes
  USER_SETTINGS: 24 * 60 * 60 * 1000, // 24 hours
} as const;

// UI Configuration
export const UI_CONFIG = {
  ANIMATION_DURATION: 300,
  DEBOUNCE_DELAY: 300,
  THROTTLE_DELAY: 100,
  TOUCH_TARGET_SIZE: 44,
} as const;

// Medical Constants
export const MEDICAL_CONSTANTS = {
  NORMAL_VITAL_SIGNS: {
    HEART_RATE: { min: 60, max: 100 },
    BLOOD_PRESSURE: { systolic: { min: 90, max: 140 }, diastolic: { min: 60, max: 90 } },
    TEMPERATURE: { min: 36.1, max: 37.2 },
    RESPIRATORY_RATE: { min: 12, max: 20 },
    OXYGEN_SATURATION: { min: 95, max: 100 },
  },
  CRITICAL_VALUES: {
    HEART_RATE: { min: 40, max: 140 },
    BLOOD_PRESSURE: { systolic: { min: 70, max: 200 }, diastolic: { min: 40, max: 120 } },
    TEMPERATURE: { min: 35.0, max: 40.0 },
    RESPIRATORY_RATE: { min: 8, max: 30 },
    OXYGEN_SATURATION: { min: 90, max: 100 },
  },
} as const;

// Error Messages
export const ERROR_MESSAGES = {
  NETWORK_ERROR: 'Network connection error. Please check your internet connection.',
  AUTHENTICATION_ERROR: 'Authentication failed. Please log in again.',
  SERVER_ERROR: 'Server error. Please try again later.',
  VALIDATION_ERROR: 'Please check your input and try again.',
  UNKNOWN_ERROR: 'An unexpected error occurred. Please try again.',
} as const;

// Success Messages
export const SUCCESS_MESSAGES = {
  LOGIN_SUCCESS: 'Successfully logged in.',
  LOGOUT_SUCCESS: 'Successfully logged out.',
  DATA_SAVED: 'Data saved successfully.',
  ALERT_ACKNOWLEDGED: 'Alert acknowledged.',
  SETTINGS_UPDATED: 'Settings updated successfully.',
} as const;

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