import 'package:equatable/equatable.dart';

abstract class OneGangEvent extends Equatable {
  const OneGangEvent();

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

class LoadingEvent extends OneGangEvent {}

class OneGangUpdated extends OneGangEvent {}

class InitialEvent extends OneGangEvent {
  final bool groupScreen;
  const InitialEvent({required this.groupScreen});
  @override
  List<Object> get props => [groupScreen];
}

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

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

class AllOffEvent extends OneGangEvent {}

class AllOnEvent extends OneGangEvent {}

class GroupAllOnEvent extends OneGangEvent {}

class GroupAllOffEvent extends OneGangEvent {}

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

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

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

class StartTimer extends OneGangEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends OneGangEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends OneGangEvent {}

class OnClose extends OneGangEvent {}

class InitialWizardEvent extends OneGangEvent {}

//------------------- Schedule ----------=---------
class GetScheduleEvent extends OneGangEvent {}

class ScheduleSave extends OneGangEvent {}

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

class ToggleDaySelectionEvent extends OneGangEvent {
  final String key;

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

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

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

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

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