import 'package:equatable/equatable.dart';
import 'package:syncrow_web/pages/device_managment/main_door_sensor/models/main_door_status_model.dart';

import '../../all_devices/models/factory_reset_model.dart';

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

class MainDoorSensorFetchDeviceEvent extends MainDoorSensorEvent {
  final String deviceId;

  MainDoorSensorFetchDeviceEvent(this.deviceId);

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

class MainDoorSensorFetchBatchEvent extends MainDoorSensorEvent {
  final String deviceId;

  MainDoorSensorFetchBatchEvent(this.deviceId);

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

class MainDoorSensorControl extends MainDoorSensorEvent {
  final String deviceId;
  final String code;
  final bool value;

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

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

class MainDoorSensorBatchControl extends MainDoorSensorEvent {
  final List<String> deviceId;
  final String code;
  final bool value;

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

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

class MainDoorSensorReportsEvent extends MainDoorSensorEvent {
  final String deviceId;
  final String code;
  final String from;
  final String to;
  @override
  List<Object> get props => [deviceId, code, from, to];

  MainDoorSensorReportsEvent(
      {required this.deviceId,
      required this.code,
      required this.from,
      required this.to});
}

class MainDoorSensorFactoryReset extends MainDoorSensorEvent {
  final String deviceId;
  final FactoryResetModel factoryReset;

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

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