import 'package:equatable/equatable.dart';

abstract class WaterLeakEvent extends Equatable {
  const WaterLeakEvent();

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

class WaterLeakLoading extends WaterLeakEvent {}

class WaterLeakSwitch extends WaterLeakEvent {
  final String switchD;
  final String deviceId;
  final String productId;
  const WaterLeakSwitch({required this.switchD, this.deviceId = '', this.productId = ''});

  @override
  List<Object> get props => [switchD, deviceId, productId];
}

class WaterLeakUpdated extends WaterLeakEvent {}

class WaterLeakInitial extends WaterLeakEvent {
  const WaterLeakInitial();
}

class ReportLogsInitial extends WaterLeakEvent {
  const ReportLogsInitial();
}


class WaterLeakChangeStatus extends WaterLeakEvent {}


class GetCounterEvent extends WaterLeakEvent {
  final String deviceCode;
  const GetCounterEvent({required this.deviceCode});
  @override
  List<Object> get props => [deviceCode];
}



class ToggleLowBatteryEvent extends WaterLeakEvent {
  final bool isLowBatteryEnabled;

  const ToggleLowBatteryEvent(this.isLowBatteryEnabled);

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

class ToggleClosingReminderEvent extends WaterLeakEvent {
  final bool isClosingReminderEnabled;

  const ToggleClosingReminderEvent(this.isClosingReminderEnabled);

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

class ToggleWaterLeakAlarmEvent extends WaterLeakEvent {
  final bool isWaterLeakAlarmEnabled;

  const ToggleWaterLeakAlarmEvent(this.isWaterLeakAlarmEnabled);

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



class SetCounterValue extends WaterLeakEvent {
  final Duration duration;
  final String deviceCode;
  const SetCounterValue({required this.duration, required this.deviceCode});
  @override
  List<Object> get props => [duration, deviceCode];
}

class StartTimer extends WaterLeakEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends WaterLeakEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends WaterLeakEvent {}

class OnClose extends WaterLeakEvent {}
