APP_NAME_TO_USECASE = {
    "people_counting": "people_counting",
    "intrusion_detection": "intrusion_detection",
    "proximity_detection": "proximity_detection",
    "mask_detection": "mask_detection",
    "pipeline_detection": "pipeline_detection",
    "vehicle_monitoring": "vehicle_monitoring",
    "Vehicle Type Monitoring": "vehicle_monitoring",
    "weapon_detection": "weapon_detection",
    "traffic_sign_monitoring": "traffic_sign_monitoring",
    "flare_analysis": "flare_analysis",
    "ppe_compliance": "ppe_compliance",
    "advanced_customer_service": "advanced_customer_service",
    "assembly_line_detection": "assembly_line_detection",
    "crop_weed_detection"  : "crop_weed_detection",
    "emergency_vehicle_detection": "emergency_vehicle_detection",
    "fashion_detection": "fashion_detection",
    "gender_detection": "gender_detection",
    "price_tag_detection": "price_tag_detection",
    "windmill_maintenance": "windmill_maintenance",
    "underwater_pollution_detection": "underwater_pollution_detection",
    "solar_panel": "solar_panel",
    "face_emotion": "face_emotion",
    "pedestrian_detection": "pedestrian_detection",
    "warehouse_object_segmentation": "warehouse_object_segmentation",
    "flower_segmentation": "flower_segmentation",
    "shopping_cart_analysis": "shopping_cart_analysis",
    "car_part_segmentation": "car_part_segmentation",
    "weld_defect_detection" : "weld_defect_detection",
    "fruit_monitoring" : "fruit_monitoring",
    "concrete_crack_detection": "concrete_crack_detection",
    "lane_detection" : "lane_detection",
    "shelf_inventory" :"shelf_inventory",
    "smoker_detection": "smoker_detection",
    "age_detection": "age_detection",
    "defect_detection_products": "defect_detection_products",
    "parking_space_detection": "parking_space_detection",
    "car_damage_detection": "car_damage_detection",
    "license_plate_detection": "license_plate_detection",
    "shoplifting_detection": "shoplifting_detection",
    "cardiomegaly_classification": "cardiomegaly_classification",
    "road_traffic_density": "road_traffic_density",
    "histopathological_cancer_detection" : "histopathological_cancer_detection",
    "road_view_segmentation": "road_view_segmentation",
    "face_recognition": "face_recognition",
    "drowsy_driver_detection": "drowsy_driver_detection",
    "waterbody_segmentation": "waterbody_segmentation",
    "litter_detection" : "litter_detection",
    "leak_detection": "leak_detection",
    "Fire Safety Monitoring": "fire_smoke_detection",
    "human_activity_recognition": "human_activity_recognition",
    "abandoned_object_detection" : "abandoned_object_detection",
    "gas_leak_detection": "gas_leak_detection",
    "color_detection": "color_detection",
    "License Plate Recognition" : "license_plate_monitor",
    
}

APP_NAME_TO_CATEGORY = {
    "people_counting": "general",
    "intrusion_detection": "security",
    "proximity_detection": "security",
    "mask_detection": "mask_detection",
    "pipeline_detection": "pipeline_detection",
    "vehicle_monitoring": "traffic",
    "Vehicle Type Monitoring": "traffic",
    "weapon_detection": "security",
    "traffic_sign_monitoring": "traffic",
    "flare_analysis": "flare_detection",
    "ppe_compliance": "security",
    "advanced_customer_service": "sales",
    "assembly_line_detection": "manufacturing",
    "crop_weed_detection": "agriculture",
    "emergency_vehicle_detection": "traffic",
    "fashion_detection": "retail",
    "gender_detection": "general",
    "price_tag_detection": "retail",
    "windmill_maintenance": "windmill_maintenance",
    "underwater_pollution_detection": "environmental",
    "solar_panel": "energy",
    "face_emotion": "general",
    "pedestrian_detection": "pedestrian",
    "warehouse_object_segmentation": "retail",
    "flower_segmentation": "agriculture",
    "shopping_cart_analysis": "retail",
    "car_part_segmentation": "automobile",
    "weld_defect_detection" : "weld",
    "fruit_monitoring" : "agriculture",
    "concrete_crack_detection": "general",
    "lane_detection" : "traffic",
    "shelf_inventory" : "retail",
    "smoker_detection": "general",
    "age_detection": "general",
    "defect_detection_products": "retail",
    "parking_space_detection": "parking_space",
    "car_damage_detection": "car_damage",
    "license_plate_detection": "license_plate",
    "shoplifting_detection": "security",
    "cardiomegaly_classification": "healthcare",
    "road_traffic_density": "automobile",
    "histopathological_cancer_detection" : "healthcare",
    "road_view_segmentation": "automobile",
    "face_recognition": "security",
    "drowsy_driver_detection": "automobile",
    "waterbody_segmentation": "agriculture",
    "litter_detection" : "litter_detection",
    "leak_detection": "oil_gas",
    "Fire Safety Monitoring": "hazard",
    "human_activity_recognition": "general",
    "abandoned_object_detection" : "security",
    "gas_leak_detection": "oil_gas",
    "color_detection": "visual_appearance",
    "License Plate Recognition" : "license_plate_monitor"
}

def get_usecase_from_app_name(app_name: str) -> str:
    normalized_app_name = app_name.lower().replace(" ", "_").replace("-", "_")
    return APP_NAME_TO_USECASE.get(app_name, APP_NAME_TO_USECASE.get(normalized_app_name))

def get_category_from_app_name(app_name: str) -> str:
    normalized_app_name = app_name.lower().replace(" ", "_").replace("-", "_")
    return APP_NAME_TO_CATEGORY.get(app_name, APP_NAME_TO_CATEGORY.get(normalized_app_name))
