import 'package:equatable/equatable.dart';

class DiagnosisResult extends Equatable {
  final String plantSpecies;
  final bool isHealthy;
  final String diseaseName;
  final String scientificName;
  final double confidenceValue;
  final String symptoms;
  final String causes;
  final List<String> preventionMeasures;
  final String organicTreatment;
  final String chemicalTreatment;
  final AdditionalInfo additionalInfo;
  
  // Enhanced agricultural information
  final Map<String, dynamic> environmentalData;
  final Map<String, dynamic> plantData;
  final Map<String, dynamic> treatmentSchedule;
  final Map<String, dynamic> economicImpact;
  final List<Map<String, dynamic>> alternativeVarieties;

  const DiagnosisResult({
    required this.plantSpecies,
    required this.isHealthy,
    required this.diseaseName,
    required this.scientificName,
    required this.confidenceValue,
    required this.symptoms,
    required this.causes,
    required this.preventionMeasures,
    required this.organicTreatment,
    required this.chemicalTreatment,
    required this.additionalInfo,
    this.environmentalData = const {},
    this.plantData = const {},
    this.treatmentSchedule = const {},
    this.economicImpact = const {},
    this.alternativeVarieties = const [],
  });
  
  @override
  List<Object?> get props => [
    plantSpecies,
    isHealthy,
    diseaseName,
    scientificName,
    confidenceValue,
    symptoms,
    causes,
    preventionMeasures,
    organicTreatment,
    chemicalTreatment,
    additionalInfo,
    environmentalData,
    plantData,
    treatmentSchedule,
    economicImpact,
    alternativeVarieties,
  ];
}

class AdditionalInfo extends Equatable {
  final String severity;
  final String spreadRate;
  final List<String> affectedParts;
  final String environmentalConditions;

  const AdditionalInfo({
    required this.severity,
    required this.spreadRate,
    required this.affectedParts,
    required this.environmentalConditions,
  });
  
  @override
  List<Object?> get props => [
    severity,
    spreadRate,
    affectedParts,
    environmentalConditions,
  ];
} 