import 'package:equatable/equatable.dart';
import 'package:syncrow_web/pages/device_managment/ac/model/ac_model.dart';
import 'package:syncrow_web/pages/device_managment/all_devices/models/factory_reset_model.dart';

sealed class AcsEvent extends Equatable {
  const AcsEvent();

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

class AcUpdated extends AcsEvent {}

class AcFetchDeviceStatusEvent extends AcsEvent {
  final String deviceId;

  const AcFetchDeviceStatusEvent(this.deviceId);

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

class AcStatusUpdated extends AcsEvent {
  final AcStatusModel deviceStatus;
  AcStatusUpdated(this.deviceStatus);
}

class AcFetchBatchStatusEvent extends AcsEvent {
  final List<String> devicesIds;

  const AcFetchBatchStatusEvent(this.devicesIds);

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

class AcControlEvent extends AcsEvent {
  final String deviceId;
  final String code;
  final dynamic value;

  const AcControlEvent({
    required this.deviceId,
    required this.code,
    required this.value,
  });

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

class AcBatchControlEvent extends AcsEvent {
  final List<String> devicesIds;
  final String code;
  final dynamic value;

  const AcBatchControlEvent({
    required this.devicesIds,
    required this.code,
    required this.value,
  });

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

class AcFactoryResetEvent extends AcsEvent {
  final String deviceId;
  final FactoryResetModel factoryResetModel;

  const AcFactoryResetEvent({
    required this.deviceId,
    required this.factoryResetModel,
  });

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



class OnClose extends AcsEvent {}

class IncreaseTimeEvent extends AcsEvent {
  @override
  List<Object> get props => [];
}

class DecreaseTimeEvent extends AcsEvent {
  @override
  List<Object> get props => [];
}

class ToggleScheduleEvent extends AcsEvent {}

class TimerCompletedEvent extends AcsEvent {}

class UpdateTimerEvent extends AcsEvent {
}

class ApiCountdownValueEvent extends AcsEvent {
  final int apiValue;

  const ApiCountdownValueEvent(this.apiValue);
}
