import 'package:equatable/equatable.dart';
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_reports.dart';
import 'package:syncrow_web/pages/device_managment/water_leak/model/water_leak_status_model.dart';

abstract class WaterLeakState extends Equatable {
  const WaterLeakState();

  @override
  List<Object> get props => [];
}

class WaterLeakInitialState extends WaterLeakState {}

class WaterLeakLoadingState extends WaterLeakState {}

class WaterLeakLoadedState extends WaterLeakState {
  final WaterLeakStatusModel status;

  const WaterLeakLoadedState(this.status);

  @override
  List<Object> get props => [status];
}

class WaterLeakBatchStatusLoadedState extends WaterLeakState {
  final WaterLeakStatusModel status;

  const WaterLeakBatchStatusLoadedState(this.status);

  @override
  List<Object> get props => [status];
}

class WaterLeakErrorState extends WaterLeakState {
  final String message;

  const WaterLeakErrorState(this.message);

  @override
  List<Object> get props => [message];
}

class WaterLeakReportsLoadingState extends WaterLeakState {}

class WaterLeakReportsLoadedState extends WaterLeakState {
  final DeviceReport deviceReport;

  const WaterLeakReportsLoadedState(this.deviceReport);

  @override
  List<Object> get props => [deviceReport];
}

class WaterLeakReportsFailedState extends WaterLeakState {
  final String error;

  const WaterLeakReportsFailedState(this.error);

  @override
  List<Object> get props => [error];
}
