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

abstract class OneTouchEvent extends Equatable {
  const OneTouchEvent();

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

class LoadingEvent extends OneTouchEvent {}

class OneTouchUpdated extends OneTouchEvent {}

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

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

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

class AllOffEvent extends OneTouchEvent {}

class AllOnEvent extends OneTouchEvent {}

class GroupAllOnEvent extends OneTouchEvent {}

class GroupAllOffEvent extends OneTouchEvent {}

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

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

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

class StartTimer extends OneTouchEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends OneTouchEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends OneTouchEvent {}

class OnClose extends OneTouchEvent {}

class InitialWizardEvent extends OneTouchEvent {}

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

class ScheduleSave extends OneTouchEvent {}

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

class ToggleDaySelectionEvent extends OneTouchEvent {
  final String key;

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

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

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

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

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

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