import 'package:equatable/equatable.dart';

abstract class DoorSensorEvent extends Equatable {
  const DoorSensorEvent();

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

class DoorSensorLoading extends DoorSensorEvent {}

class DoorSensorSwitch extends DoorSensorEvent {
  final bool switchD;
  final String deviceId;
  final String productId;
  const DoorSensorSwitch({required this.switchD, this.deviceId = '', this.productId = ''});

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

class DoorSensorUpdated extends DoorSensorEvent {}

class DoorSensorInitial extends DoorSensorEvent {
  const DoorSensorInitial();
}

class ReportLogsInitial extends DoorSensorEvent {
  const ReportLogsInitial();
}


class DoorSensorChangeStatus extends DoorSensorEvent {}


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



class ToggleLowBatteryEvent extends DoorSensorEvent {
  final bool isLowBatteryEnabled;

  const ToggleLowBatteryEvent(this.isLowBatteryEnabled);

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

class ToggleClosingReminderEvent extends DoorSensorEvent {
  final bool isClosingReminderEnabled;

  const ToggleClosingReminderEvent(this.isClosingReminderEnabled);

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

class ToggleDoorAlarmEvent extends DoorSensorEvent {
  final bool isDoorAlarmEnabled;

  const ToggleDoorAlarmEvent(this.isDoorAlarmEnabled);

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



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

class StartTimer extends DoorSensorEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends DoorSensorEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends DoorSensorEvent {}

class OnClose extends DoorSensorEvent {}
