part of 'total_energy_consumption_bloc.dart';

enum TotalEnergyConsumptionStatus {
  initial,
  loading,
  loaded,
  failure,
}

final class TotalEnergyConsumptionState extends Equatable {
  const TotalEnergyConsumptionState({
    this.status = TotalEnergyConsumptionStatus.initial,
    this.chartData = const <EnergyDataModel>[],
    this.errorMessage,
  });

  final List<EnergyDataModel> chartData;
  final TotalEnergyConsumptionStatus status;
  final String? errorMessage;

  TotalEnergyConsumptionState copyWith({
    List<EnergyDataModel>? chartData,
    TotalEnergyConsumptionStatus? status,
    String? errorMessage,
  }) {
    return TotalEnergyConsumptionState(
      chartData: chartData ?? this.chartData,
      status: status ?? this.status,
      errorMessage: errorMessage ?? this.errorMessage,
    );
  }

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