import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';

abstract class ThreeTouchEvent extends Equatable {
  const ThreeTouchEvent();

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

class LoadingEvent extends ThreeTouchEvent {}

class ThreeTouchUpdated extends ThreeTouchEvent {}

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

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

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

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

class AllOffEvent extends ThreeTouchEvent {}

class AllOnEvent extends ThreeTouchEvent {}

class GroupAllOnEvent extends ThreeTouchEvent {}

class GroupAllOffEvent extends ThreeTouchEvent {}

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

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

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

class StartTimer extends ThreeTouchEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends ThreeTouchEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends ThreeTouchEvent {}

class OnClose extends ThreeTouchEvent {}

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

class ThreeTouchSave extends ThreeTouchEvent {}

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

class ToggleDaySelectionEvent extends ThreeTouchEvent {
  final String key;

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

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

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

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

class InitialWizardDevises extends ThreeTouchEvent {}

class ChangeStatusEvent extends ThreeTouchEvent {
  final String deviceId;
  final BuildContext context;
  const ChangeStatusEvent({this.deviceId = '', required this.context});
}
