import 'package:equatable/equatable.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';

abstract class AcsEvent extends Equatable {
  const AcsEvent();

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

class AcsLoading extends AcsEvent {}

class AcSwitch extends AcsEvent {
  final bool acSwitch;
  final String deviceId;
  final String productId;
  const AcSwitch(
      {required this.acSwitch, this.deviceId = '', this.productId = ''});

  @override
  List<Object> get props => [acSwitch, deviceId, productId];
}

class AcUpdated extends AcsEvent {}

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

class ACsChangeStatus extends AcsEvent {}

class IncreaseCoolToTemp extends AcsEvent {
  final double value;
  final String deviceId;
  final String productId;
  const IncreaseCoolToTemp(
      {required this.value, this.deviceId = '', this.productId = ''});

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

class DecreaseCoolToTemp extends AcsEvent {
  final double value;
  final String deviceId;
  final String productId;

  const DecreaseCoolToTemp(
      {required this.value, this.deviceId = '', this.productId = ''});

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

class ChangeAcMode extends AcsEvent {
  final TempModes tempModes;
  final String deviceId;
  final String productId;
  const ChangeAcMode(
      {required this.tempModes, this.deviceId = '', this.productId = ''});

  @override
  List<Object> get props => [tempModes, deviceId, productId];
}

class ChangeFanSpeed extends AcsEvent {
  final FanSpeeds fanSpeeds;
  final String deviceId;
  final String productId;

  const ChangeFanSpeed(
      {required this.fanSpeeds, this.deviceId = '', this.productId = ''});

  @override
  List<Object> get props => [fanSpeeds, deviceId, productId];
}

class ChangeLock extends AcsEvent {
  final bool lockBool;
  const ChangeLock({required this.lockBool});

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

class ChangeAllSwitch extends AcsEvent {
  final bool value;
  const ChangeAllSwitch({required this.value});

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

class IncreaseAllTemp extends AcsEvent {
  final double value;
  const IncreaseAllTemp({required this.value});

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

class DecreaseAllTemp extends AcsEvent {
  final double value;
  const DecreaseAllTemp({required this.value});

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

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

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

class StartTimer extends AcsEvent {
  final int duration;

  const StartTimer(this.duration);

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

class TickTimer extends AcsEvent {
  final int remainingTime;

  const TickTimer({required this.remainingTime});

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

class StopTimer extends AcsEvent {}

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

class OnClose extends AcsEvent {}
