import 'package:equatable/equatable.dart';

abstract class ThreeGangEvent extends Equatable {
  const ThreeGangEvent();

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

class LoadingEvent extends ThreeGangEvent {}

class ThreeGangUpdated extends ThreeGangEvent {}

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

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

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

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

class AllOffEvent extends ThreeGangEvent {}

class AllOnEvent extends ThreeGangEvent {}

class GroupAllOnEvent extends ThreeGangEvent {}

class GroupAllOffEvent extends ThreeGangEvent {}

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

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

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

class StartTimer extends ThreeGangEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends ThreeGangEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends ThreeGangEvent {}

class OnClose extends ThreeGangEvent {}


//------------------- Schedule ----------=---------
class GetScheduleEvent extends ThreeGangEvent {}
class ThreeGangSave extends ThreeGangEvent {}
class ToggleScheduleEvent extends ThreeGangEvent {
  final String id;
  final bool toggle;
  const ToggleScheduleEvent({required this.toggle,required this.id});
  @override
  List<Object> get props => [toggle,id];
}
class ToggleDaySelectionEvent extends ThreeGangEvent {

  final String key;

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



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


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

class InitialWizardDevises extends ThreeGangEvent {}
