part of 'air_quality_distribution_bloc.dart';

enum AirQualityDistributionStatus {
  initial,
  loading,
  success,
  failure,
}

class AirQualityDistributionState extends Equatable {
  const AirQualityDistributionState({
    this.status = AirQualityDistributionStatus.initial,
    this.chartData = const [],
    this.errorMessage,
    this.selectedAqiType = AqiType.aqi,
  });

  final AirQualityDistributionStatus status;
  final List<AirQualityDataModel> chartData;
  final String? errorMessage;
  final AqiType selectedAqiType;

  AirQualityDistributionState copyWith({
    AirQualityDistributionStatus? status,
    List<AirQualityDataModel>? chartData,
    String? errorMessage,
    AqiType? selectedAqiType,
  }) {
    return AirQualityDistributionState(
      status: status ?? this.status,
      chartData: chartData ?? this.chartData,
      errorMessage: errorMessage ?? this.errorMessage,
      selectedAqiType: selectedAqiType ?? this.selectedAqiType,
    );
  }

  @override
  List<Object?> get props => [status, chartData, errorMessage, selectedAqiType];
}
