import 'package:equatable/equatable.dart';
import 'package:syncrow_web/pages/device_managment/all_devices/models/factory_reset_model.dart';
import 'package:syncrow_web/pages/device_managment/two_gang_switch/models/two_gang_status_model.dart';

class TwoGangSwitchEvent extends Equatable {
  @override
  List<Object?> get props => [];
}

class TwoGangSwitchFetchDeviceEvent extends TwoGangSwitchEvent {
  final String deviceId;

  TwoGangSwitchFetchDeviceEvent(this.deviceId);

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

class TwoGangSwitchControl extends TwoGangSwitchEvent {
  final String deviceId;
  final String code;
  final bool value;

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

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

class TwoGangSwitchFetchBatchEvent extends TwoGangSwitchEvent {
  final List<String> devicesIds;

  TwoGangSwitchFetchBatchEvent(this.devicesIds);

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

class TwoGangSwitchBatchControl extends TwoGangSwitchEvent {
  final List<String> deviceId;
  final String code;
  final bool value;

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

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

class TwoGangFactoryReset extends TwoGangSwitchEvent {
  final String deviceId;
  final FactoryResetModel factoryReset;

  TwoGangFactoryReset({required this.deviceId, required this.factoryReset});

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

class StatusUpdated extends TwoGangSwitchEvent {
  final TwoGangStatusModel deviceStatus;
  StatusUpdated(this.deviceStatus);
  @override
  List<Object> get props => [deviceStatus];
}
