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

abstract class TwoTouchEvent extends Equatable {
  const TwoTouchEvent();

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

class LoadingEvent extends TwoTouchEvent {}

class TwoTouchUpdated extends TwoTouchEvent {}

class TwoTouchSave extends TwoTouchEvent {}

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

class errorMessage extends TwoTouchEvent {}

class ToggleDaySelectionEvent extends TwoTouchEvent {
  final String key;

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

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

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

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

class AllOffEvent extends TwoTouchEvent {}

class AllOnEvent extends TwoTouchEvent {}

class GroupAllOnEvent extends TwoTouchEvent {}

class GroupAllOffEvent extends TwoTouchEvent {}


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

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

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

class StartTimer extends TwoTouchEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends TwoTouchEvent {
  final int remainingTime;

  const TickTimer(this.remainingTime);

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

class StopTimer extends TwoTouchEvent {}

class OnClose extends TwoTouchEvent {}

class GetScheduleEvent extends TwoTouchEvent {}

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

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

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

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

class InitialWizardEvent extends TwoTouchEvent {}

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

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