import 'package:hmg_patient_app_new/features/symptoms_checker/models/symptom_model.dart';

class SymptomsMappingData {
  // Map of organ IDs to their possible symptoms
  static final Map<String, List<SymptomModel>> organSymptomsMap = {
    // HEAD & FACE
    'head': [
      SymptomModel(id: 'head_s1', name: 'Headache', organId: 'head'),
      SymptomModel(id: 'head_s2', name: 'Dizziness', organId: 'head'),
      SymptomModel(id: 'head_s3', name: 'Migraine', organId: 'head'),
      SymptomModel(id: 'head_s4', name: 'Head pressure', organId: 'head'),
      SymptomModel(id: 'head_s5', name: 'Vertigo', organId: 'head'),
      SymptomModel(id: 'head_s6', name: 'Confusion', organId: 'head'),
      SymptomModel(id: 'head_s7', name: 'Memory problems', organId: 'head'),
    ],
    'left_eye': [
      SymptomModel(id: 'left_eye_s1', name: 'Blurred vision', organId: 'left_eye'),
      SymptomModel(id: 'left_eye_s2', name: 'Eye pain', organId: 'left_eye'),
      SymptomModel(id: 'left_eye_s3', name: 'Redness', organId: 'left_eye'),
      SymptomModel(id: 'left_eye_s4', name: 'Itching', organId: 'left_eye'),
      SymptomModel(id: 'left_eye_s5', name: 'Watering', organId: 'left_eye'),
      SymptomModel(id: 'left_eye_s6', name: 'Sensitivity to light', organId: 'left_eye'),
      SymptomModel(id: 'left_eye_s7', name: 'Double vision', organId: 'left_eye'),
    ],
    'right_eye': [
      SymptomModel(id: 'right_eye_s1', name: 'Blurred vision', organId: 'right_eye'),
      SymptomModel(id: 'right_eye_s2', name: 'Eye pain', organId: 'right_eye'),
      SymptomModel(id: 'right_eye_s3', name: 'Redness', organId: 'right_eye'),
      SymptomModel(id: 'right_eye_s4', name: 'Itching', organId: 'right_eye'),
      SymptomModel(id: 'right_eye_s5', name: 'Watering', organId: 'right_eye'),
      SymptomModel(id: 'right_eye_s6', name: 'Sensitivity to light', organId: 'right_eye'),
      SymptomModel(id: 'right_eye_s7', name: 'Double vision', organId: 'right_eye'),
    ],
    'nose_mouth': [
      SymptomModel(id: 'nose_mouth_s1', name: 'Nasal congestion', organId: 'nose_mouth'),
      SymptomModel(id: 'nose_mouth_s2', name: 'Runny nose', organId: 'nose_mouth'),
      SymptomModel(id: 'nose_mouth_s3', name: 'Nosebleed', organId: 'nose_mouth'),
      SymptomModel(id: 'nose_mouth_s4', name: 'Loss of smell', organId: 'nose_mouth'),
      SymptomModel(id: 'nose_mouth_s5', name: 'Mouth pain', organId: 'nose_mouth'),
      SymptomModel(id: 'nose_mouth_s6', name: 'Dry mouth', organId: 'nose_mouth'),
      SymptomModel(id: 'nose_mouth_s7', name: 'Difficulty swallowing', organId: 'nose_mouth'),
    ],

    // NECK & THROAT
    'throat': [
      SymptomModel(id: 'throat_s1', name: 'Sore throat', organId: 'throat'),
      SymptomModel(id: 'throat_s2', name: 'Difficulty swallowing', organId: 'throat'),
      SymptomModel(id: 'throat_s3', name: 'Hoarseness', organId: 'throat'),
      SymptomModel(id: 'throat_s4', name: 'Throat pain', organId: 'throat'),
      SymptomModel(id: 'throat_s5', name: 'Swollen glands', organId: 'throat'),
      SymptomModel(id: 'throat_s6', name: 'Cough', organId: 'throat'),
      SymptomModel(id: 'throat_s7', name: 'Difficulty breathing', organId: 'throat'),
    ],

    // SHOULDERS
    'left_shoulder': [
      SymptomModel(id: 'left_shoulder_s1', name: 'Shoulder pain', organId: 'left_shoulder'),
      SymptomModel(id: 'left_shoulder_s2', name: 'Stiffness', organId: 'left_shoulder'),
      SymptomModel(id: 'left_shoulder_s3', name: 'Limited mobility', organId: 'left_shoulder'),
      SymptomModel(id: 'left_shoulder_s4', name: 'Swelling', organId: 'left_shoulder'),
      SymptomModel(id: 'left_shoulder_s5', name: 'Weakness', organId: 'left_shoulder'),
      SymptomModel(id: 'left_shoulder_s6', name: 'Clicking sound', organId: 'left_shoulder'),
    ],
    'right_shoulder': [
      SymptomModel(id: 'right_shoulder_s1', name: 'Shoulder pain', organId: 'right_shoulder'),
      SymptomModel(id: 'right_shoulder_s2', name: 'Stiffness', organId: 'right_shoulder'),
      SymptomModel(id: 'right_shoulder_s3', name: 'Limited mobility', organId: 'right_shoulder'),
      SymptomModel(id: 'right_shoulder_s4', name: 'Swelling', organId: 'right_shoulder'),
      SymptomModel(id: 'right_shoulder_s5', name: 'Weakness', organId: 'right_shoulder'),
      SymptomModel(id: 'right_shoulder_s6', name: 'Clicking sound', organId: 'right_shoulder'),
    ],

    // CHEST
    'left_chest': [
      SymptomModel(id: 'left_chest_s1', name: 'Chest pain', organId: 'left_chest'),
      SymptomModel(id: 'left_chest_s2', name: 'Tightness', organId: 'left_chest'),
      SymptomModel(id: 'left_chest_s3', name: 'Pressure', organId: 'left_chest'),
      SymptomModel(id: 'left_chest_s4', name: 'Sharp pain', organId: 'left_chest'),
      SymptomModel(id: 'left_chest_s5', name: 'Burning sensation', organId: 'left_chest'),
      SymptomModel(id: 'left_chest_s6', name: 'Palpitations', organId: 'left_chest'),
      SymptomModel(id: 'left_chest_s7', name: 'Shortness of breath', organId: 'left_chest'),
    ],
    'center_chest': [
      SymptomModel(id: 'center_chest_s1', name: 'Chest pain', organId: 'center_chest'),
      SymptomModel(id: 'center_chest_s2', name: 'Tightness', organId: 'center_chest'),
      SymptomModel(id: 'center_chest_s3', name: 'Pressure', organId: 'center_chest'),
      SymptomModel(id: 'center_chest_s4', name: 'Sharp pain', organId: 'center_chest'),
      SymptomModel(id: 'center_chest_s5', name: 'Burning sensation', organId: 'center_chest'),
      SymptomModel(id: 'center_chest_s6', name: 'Heartburn', organId: 'center_chest'),
      SymptomModel(id: 'center_chest_s7', name: 'Difficulty breathing', organId: 'center_chest'),
      SymptomModel(id: 'center_chest_s8', name: 'Palpitations', organId: 'center_chest'),
    ],
    'right_chest': [
      SymptomModel(id: 'right_chest_s1', name: 'Chest pain', organId: 'right_chest'),
      SymptomModel(id: 'right_chest_s2', name: 'Tightness', organId: 'right_chest'),
      SymptomModel(id: 'right_chest_s3', name: 'Pressure', organId: 'right_chest'),
      SymptomModel(id: 'right_chest_s4', name: 'Sharp pain', organId: 'right_chest'),
      SymptomModel(id: 'right_chest_s5', name: 'Burning sensation', organId: 'right_chest'),
      SymptomModel(id: 'right_chest_s6', name: 'Shortness of breath', organId: 'right_chest'),
    ],

    // RIBS
    'left_ribs': [
      SymptomModel(id: 'left_ribs_s1', name: 'Rib pain', organId: 'left_ribs'),
      SymptomModel(id: 'left_ribs_s2', name: 'Pain when breathing', organId: 'left_ribs'),
      SymptomModel(id: 'left_ribs_s3', name: 'Tenderness', organId: 'left_ribs'),
      SymptomModel(id: 'left_ribs_s4', name: 'Bruising', organId: 'left_ribs'),
      SymptomModel(id: 'left_ribs_s5', name: 'Difficulty moving', organId: 'left_ribs'),
    ],
    'right_ribs': [
      SymptomModel(id: 'right_ribs_s1', name: 'Rib pain', organId: 'right_ribs'),
      SymptomModel(id: 'right_ribs_s2', name: 'Pain when breathing', organId: 'right_ribs'),
      SymptomModel(id: 'right_ribs_s3', name: 'Tenderness', organId: 'right_ribs'),
      SymptomModel(id: 'right_ribs_s4', name: 'Bruising', organId: 'right_ribs'),
      SymptomModel(id: 'right_ribs_s5', name: 'Difficulty moving', organId: 'right_ribs'),
    ],

    // ABDOMEN
    'upper_abdomen': [
      SymptomModel(id: 'upper_abdomen_s1', name: 'Abdominal pain', organId: 'upper_abdomen'),
      SymptomModel(id: 'upper_abdomen_s2', name: 'Bloating', organId: 'upper_abdomen'),
      SymptomModel(id: 'upper_abdomen_s3', name: 'Nausea', organId: 'upper_abdomen'),
      SymptomModel(id: 'upper_abdomen_s4', name: 'Vomiting', organId: 'upper_abdomen'),
      SymptomModel(id: 'upper_abdomen_s5', name: 'Heartburn', organId: 'upper_abdomen'),
      SymptomModel(id: 'upper_abdomen_s6', name: 'Loss of appetite', organId: 'upper_abdomen'),
      SymptomModel(id: 'upper_abdomen_s7', name: 'Indigestion', organId: 'upper_abdomen'),
    ],
    'navel': [
      SymptomModel(id: 'navel_s1', name: 'Abdominal pain', organId: 'navel'),
      SymptomModel(id: 'navel_s2', name: 'Cramping', organId: 'navel'),
      SymptomModel(id: 'navel_s3', name: 'Bloating', organId: 'navel'),
      SymptomModel(id: 'navel_s4', name: 'Gas', organId: 'navel'),
      SymptomModel(id: 'navel_s5', name: 'Tenderness', organId: 'navel'),
    ],
    'lower_abdomen': [
      SymptomModel(id: 'lower_abdomen_s1', name: 'Lower abdominal pain', organId: 'lower_abdomen'),
      SymptomModel(id: 'lower_abdomen_s2', name: 'Cramping', organId: 'lower_abdomen'),
      SymptomModel(id: 'lower_abdomen_s3', name: 'Bloating', organId: 'lower_abdomen'),
      SymptomModel(id: 'lower_abdomen_s4', name: 'Constipation', organId: 'lower_abdomen'),
      SymptomModel(id: 'lower_abdomen_s5', name: 'Diarrhea', organId: 'lower_abdomen'),
      SymptomModel(id: 'lower_abdomen_s6', name: 'Urinary discomfort', organId: 'lower_abdomen'),
    ],

    // PELVIS & GROIN
    'left_groin': [
      SymptomModel(id: 'left_groin_s1', name: 'Groin pain', organId: 'left_groin'),
      SymptomModel(id: 'left_groin_s2', name: 'Swelling', organId: 'left_groin'),
      SymptomModel(id: 'left_groin_s3', name: 'Tenderness', organId: 'left_groin'),
      SymptomModel(id: 'left_groin_s4', name: 'Limited mobility', organId: 'left_groin'),
    ],
    'right_groin': [
      SymptomModel(id: 'right_groin_s1', name: 'Groin pain', organId: 'right_groin'),
      SymptomModel(id: 'right_groin_s2', name: 'Swelling', organId: 'right_groin'),
      SymptomModel(id: 'right_groin_s3', name: 'Tenderness', organId: 'right_groin'),
      SymptomModel(id: 'right_groin_s4', name: 'Limited mobility', organId: 'right_groin'),
    ],

    // ARMS - LEFT
    'left_elbow': [
      SymptomModel(id: 'left_elbow_s1', name: 'Elbow pain', organId: 'left_elbow'),
      SymptomModel(id: 'left_elbow_s2', name: 'Stiffness', organId: 'left_elbow'),
      SymptomModel(id: 'left_elbow_s3', name: 'Swelling', organId: 'left_elbow'),
      SymptomModel(id: 'left_elbow_s4', name: 'Limited mobility', organId: 'left_elbow'),
      SymptomModel(id: 'left_elbow_s5', name: 'Tingling', organId: 'left_elbow'),
    ],
    'left_forearm': [
      SymptomModel(id: 'left_forearm_s1', name: 'Forearm pain', organId: 'left_forearm'),
      SymptomModel(id: 'left_forearm_s2', name: 'Weakness', organId: 'left_forearm'),
      SymptomModel(id: 'left_forearm_s3', name: 'Numbness', organId: 'left_forearm'),
      SymptomModel(id: 'left_forearm_s4', name: 'Tingling', organId: 'left_forearm'),
      SymptomModel(id: 'left_forearm_s5', name: 'Swelling', organId: 'left_forearm'),
    ],
    'left_wrist': [
      SymptomModel(id: 'left_wrist_s1', name: 'Wrist pain', organId: 'left_wrist'),
      SymptomModel(id: 'left_wrist_s2', name: 'Stiffness', organId: 'left_wrist'),
      SymptomModel(id: 'left_wrist_s3', name: 'Swelling', organId: 'left_wrist'),
      SymptomModel(id: 'left_wrist_s4', name: 'Limited mobility', organId: 'left_wrist'),
      SymptomModel(id: 'left_wrist_s5', name: 'Tingling', organId: 'left_wrist'),
      SymptomModel(id: 'left_wrist_s6', name: 'Numbness', organId: 'left_wrist'),
    ],

    // ARMS - RIGHT
    'right_elbow': [
      SymptomModel(id: 'right_elbow_s1', name: 'Elbow pain', organId: 'right_elbow'),
      SymptomModel(id: 'right_elbow_s2', name: 'Stiffness', organId: 'right_elbow'),
      SymptomModel(id: 'right_elbow_s3', name: 'Swelling', organId: 'right_elbow'),
      SymptomModel(id: 'right_elbow_s4', name: 'Limited mobility', organId: 'right_elbow'),
      SymptomModel(id: 'right_elbow_s5', name: 'Tingling', organId: 'right_elbow'),
    ],
    'right_forearm': [
      SymptomModel(id: 'right_forearm_s1', name: 'Forearm pain', organId: 'right_forearm'),
      SymptomModel(id: 'right_forearm_s2', name: 'Weakness', organId: 'right_forearm'),
      SymptomModel(id: 'right_forearm_s3', name: 'Numbness', organId: 'right_forearm'),
      SymptomModel(id: 'right_forearm_s4', name: 'Tingling', organId: 'right_forearm'),
      SymptomModel(id: 'right_forearm_s5', name: 'Swelling', organId: 'right_forearm'),
    ],
    'right_wrist': [
      SymptomModel(id: 'right_wrist_s1', name: 'Wrist pain', organId: 'right_wrist'),
      SymptomModel(id: 'right_wrist_s2', name: 'Stiffness', organId: 'right_wrist'),
      SymptomModel(id: 'right_wrist_s3', name: 'Swelling', organId: 'right_wrist'),
      SymptomModel(id: 'right_wrist_s4', name: 'Limited mobility', organId: 'right_wrist'),
      SymptomModel(id: 'right_wrist_s5', name: 'Tingling', organId: 'right_wrist'),
      SymptomModel(id: 'right_wrist_s6', name: 'Numbness', organId: 'right_wrist'),
    ],

    // LEGS - LEFT
    'left_thigh': [
      SymptomModel(id: 'left_thigh_s1', name: 'Thigh pain', organId: 'left_thigh'),
      SymptomModel(id: 'left_thigh_s2', name: 'Muscle cramps', organId: 'left_thigh'),
      SymptomModel(id: 'left_thigh_s3', name: 'Weakness', organId: 'left_thigh'),
      SymptomModel(id: 'left_thigh_s4', name: 'Numbness', organId: 'left_thigh'),
      SymptomModel(id: 'left_thigh_s5', name: 'Swelling', organId: 'left_thigh'),
    ],
    'left_knee': [
      SymptomModel(id: 'left_knee_s1', name: 'Knee pain', organId: 'left_knee'),
      SymptomModel(id: 'left_knee_s2', name: 'Stiffness', organId: 'left_knee'),
      SymptomModel(id: 'left_knee_s3', name: 'Swelling', organId: 'left_knee'),
      SymptomModel(id: 'left_knee_s4', name: 'Limited mobility', organId: 'left_knee'),
      SymptomModel(id: 'left_knee_s5', name: 'Clicking sound', organId: 'left_knee'),
      SymptomModel(id: 'left_knee_s6', name: 'Instability', organId: 'left_knee'),
    ],
    'left_shin': [
      SymptomModel(id: 'left_shin_s1', name: 'Shin pain', organId: 'left_shin'),
      SymptomModel(id: 'left_shin_s2', name: 'Tenderness', organId: 'left_shin'),
      SymptomModel(id: 'left_shin_s3', name: 'Swelling', organId: 'left_shin'),
      SymptomModel(id: 'left_shin_s4', name: 'Numbness', organId: 'left_shin'),
    ],
    'left_ankle': [
      SymptomModel(id: 'left_ankle_s1', name: 'Ankle pain', organId: 'left_ankle'),
      SymptomModel(id: 'left_ankle_s2', name: 'Stiffness', organId: 'left_ankle'),
      SymptomModel(id: 'left_ankle_s3', name: 'Swelling', organId: 'left_ankle'),
      SymptomModel(id: 'left_ankle_s4', name: 'Limited mobility', organId: 'left_ankle'),
      SymptomModel(id: 'left_ankle_s5', name: 'Instability', organId: 'left_ankle'),
    ],

    // LEGS - RIGHT
    'right_thigh': [
      SymptomModel(id: 'right_thigh_s1', name: 'Thigh pain', organId: 'right_thigh'),
      SymptomModel(id: 'right_thigh_s2', name: 'Muscle cramps', organId: 'right_thigh'),
      SymptomModel(id: 'right_thigh_s3', name: 'Weakness', organId: 'right_thigh'),
      SymptomModel(id: 'right_thigh_s4', name: 'Numbness', organId: 'right_thigh'),
      SymptomModel(id: 'right_thigh_s5', name: 'Swelling', organId: 'right_thigh'),
    ],
    'right_knee': [
      SymptomModel(id: 'right_knee_s1', name: 'Knee pain', organId: 'right_knee'),
      SymptomModel(id: 'right_knee_s2', name: 'Stiffness', organId: 'right_knee'),
      SymptomModel(id: 'right_knee_s3', name: 'Swelling', organId: 'right_knee'),
      SymptomModel(id: 'right_knee_s4', name: 'Limited mobility', organId: 'right_knee'),
      SymptomModel(id: 'right_knee_s5', name: 'Clicking sound', organId: 'right_knee'),
      SymptomModel(id: 'right_knee_s6', name: 'Instability', organId: 'right_knee'),
    ],
    'right_shin': [
      SymptomModel(id: 'right_shin_s1', name: 'Shin pain', organId: 'right_shin'),
      SymptomModel(id: 'right_shin_s2', name: 'Tenderness', organId: 'right_shin'),
      SymptomModel(id: 'right_shin_s3', name: 'Swelling', organId: 'right_shin'),
      SymptomModel(id: 'right_shin_s4', name: 'Numbness', organId: 'right_shin'),
    ],
    'right_ankle': [
      SymptomModel(id: 'right_ankle_s1', name: 'Ankle pain', organId: 'right_ankle'),
      SymptomModel(id: 'right_ankle_s2', name: 'Stiffness', organId: 'right_ankle'),
      SymptomModel(id: 'right_ankle_s3', name: 'Swelling', organId: 'right_ankle'),
      SymptomModel(id: 'right_ankle_s4', name: 'Limited mobility', organId: 'right_ankle'),
      SymptomModel(id: 'right_ankle_s5', name: 'Instability', organId: 'right_ankle'),
    ],

    // BACK VIEW ORGANS
    'back_head': [
      SymptomModel(id: 'back_head_s1', name: 'Back of head pain', organId: 'back_head'),
      SymptomModel(id: 'back_head_s2', name: 'Neck stiffness', organId: 'back_head'),
      SymptomModel(id: 'back_head_s3', name: 'Tension headache', organId: 'back_head'),
    ],
    'neck': [
      SymptomModel(id: 'neck_s1', name: 'Neck pain', organId: 'neck'),
      SymptomModel(id: 'neck_s2', name: 'Stiffness', organId: 'neck'),
      SymptomModel(id: 'neck_s3', name: 'Limited mobility', organId: 'neck'),
      SymptomModel(id: 'neck_s4', name: 'Muscle spasm', organId: 'neck'),
      SymptomModel(id: 'neck_s5', name: 'Tingling', organId: 'neck'),
    ],
    'upper_back': [
      SymptomModel(id: 'upper_back_s1', name: 'Upper back pain', organId: 'upper_back'),
      SymptomModel(id: 'upper_back_s2', name: 'Stiffness', organId: 'upper_back'),
      SymptomModel(id: 'upper_back_s3', name: 'Muscle tension', organId: 'upper_back'),
      SymptomModel(id: 'upper_back_s4', name: 'Sharp pain', organId: 'upper_back'),
      SymptomModel(id: 'upper_back_s5', name: 'Difficulty breathing', organId: 'upper_back'),
    ],
    'mid_back': [
      SymptomModel(id: 'mid_back_s1', name: 'Mid back pain', organId: 'mid_back'),
      SymptomModel(id: 'mid_back_s2', name: 'Stiffness', organId: 'mid_back'),
      SymptomModel(id: 'mid_back_s3', name: 'Muscle spasm', organId: 'mid_back'),
      SymptomModel(id: 'mid_back_s4', name: 'Tenderness', organId: 'mid_back'),
    ],
    'lower_back': [
      SymptomModel(id: 'lower_back_s1', name: 'Lower back pain', organId: 'lower_back'),
      SymptomModel(id: 'lower_back_s2', name: 'Stiffness', organId: 'lower_back'),
      SymptomModel(id: 'lower_back_s3', name: 'Sharp pain', organId: 'lower_back'),
      SymptomModel(id: 'lower_back_s4', name: 'Sciatica', organId: 'lower_back'),
      SymptomModel(id: 'lower_back_s5', name: 'Limited mobility', organId: 'lower_back'),
      SymptomModel(id: 'lower_back_s6', name: 'Muscle spasm', organId: 'lower_back'),
    ],
  };

  /// Get symptoms for a specific organ ID
  static List<SymptomModel> getSymptomsForOrgan(String organId) {
    return organSymptomsMap[organId] ?? [];
  }

  /// Get symptoms for multiple organ IDs
  static Map<String, List<SymptomModel>> getSymptomsForOrgans(List<String> organIds) {
    Map<String, List<SymptomModel>> result = {};
    for (String organId in organIds) {
      List<SymptomModel> symptoms = getSymptomsForOrgan(organId);
      if (symptoms.isNotEmpty) {
        result[organId] = symptoms;
      }
    }
    return result;
  }

  /// Check if an organ has symptoms mapped
  static bool hasSymptoms(String organId) {
    return organSymptomsMap.containsKey(organId) && organSymptomsMap[organId]!.isNotEmpty;
  }
}
