import 'package:equatable/equatable.dart';

abstract class TwoGangEvent extends Equatable {
  const TwoGangEvent();

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

class LoadingEvent extends TwoGangEvent {}

class TwoGangUpdated extends TwoGangEvent {}

class TwoGangSave extends TwoGangEvent {}

class ToggleScheduleEvent extends TwoGangEvent {
  final String id;
  final bool toggle;
  const ToggleScheduleEvent({required this.toggle, required this.id});
  @override
  List<Object> get props => [toggle, id];
}

class errorMessage extends TwoGangEvent {}

class ToggleDaySelectionEvent extends TwoGangEvent {
  final String key;

  const ToggleDaySelectionEvent({required this.key});
  @override
  List<Object> get props => [key];
}

class InitialEvent extends TwoGangEvent {
  const InitialEvent();
  @override
  List<Object> get props => [];
}

class ChangeFirstSwitchStatusEvent extends TwoGangEvent {
  final bool value;
  final String deviceId;
  const ChangeFirstSwitchStatusEvent({required this.value, this.deviceId = ''});
  @override
  List<Object> get props => [value, deviceId];
}

class ChangeSecondSwitchStatusEvent extends TwoGangEvent {
  final bool value;
  final String deviceId;
  const ChangeSecondSwitchStatusEvent({required this.value, this.deviceId = ''});
  @override
  List<Object> get props => [value, deviceId];
}

class AllOffEvent extends TwoGangEvent {}

class AllOnEvent extends TwoGangEvent {}

class GroupAllOnEvent extends TwoGangEvent {}

class GroupAllOffEvent extends TwoGangEvent {}

// two_gang_event.dart
// class ToggleCreateScheduleEvent extends TwoGangEvent {}

class ChangeSlidingSegment extends TwoGangEvent {
  final int value;
  const ChangeSlidingSegment({required this.value});
  @override
  List<Object> get props => [value];
}

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

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

class StartTimer extends TwoGangEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends TwoGangEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends TwoGangEvent {}

class OnClose extends TwoGangEvent {}

class GetScheduleEvent extends TwoGangEvent {}

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

class TabChangedEvent extends TwoGangEvent {
  final int index;
  TabChangedEvent({required this.index});
}

class ToggleSelectedEvent extends TwoGangEvent {
  final int index;
  const ToggleSelectedEvent({required this.index});
  @override
  List<Object> get props => [index];
}

class ToggleCreateScheduleEvent extends TwoGangEvent {
  final int index;
  const ToggleCreateScheduleEvent({required this.index});
  @override
  List<Object> get props => [index];
}

class InitialWizardEvent extends TwoGangEvent {}

class ChangeFirstWizardSwitchStatusEvent extends TwoGangEvent {
  final bool value;
  final String deviceId;
  const ChangeFirstWizardSwitchStatusEvent({required this.value, this.deviceId = ''});
  @override
  List<Object> get props => [value, deviceId];
}

class ChangeSecondWizardSwitchStatusEvent extends TwoGangEvent {
  final bool value;
  final String deviceId;
  const ChangeSecondWizardSwitchStatusEvent({required this.value, this.deviceId = ''});
  @override
  List<Object> get props => [value, deviceId];
}
