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/ceiling_sensor/model/ceiling_sensor_model.dart';

abstract class CeilingSensorEvent extends Equatable {
  const CeilingSensorEvent();

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

class CeilingInitialEvent extends CeilingSensorEvent {
  final String deviceId;
  const CeilingInitialEvent(this.deviceId);

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

class CeilingFetchDeviceStatusEvent extends CeilingSensorEvent {
  final List<String> devicesIds;

  const CeilingFetchDeviceStatusEvent(this.devicesIds);

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

class CeilingBatchControlEvent extends CeilingSensorEvent {
  final List<String> deviceIds;
  final String code;
  final dynamic value;

  const CeilingBatchControlEvent({
    required this.deviceIds,
    required this.code,
    required this.value,
  });

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

class CeilingChangeValueEvent extends CeilingSensorEvent {
  final dynamic value;
  final String code;
  const CeilingChangeValueEvent({required this.value, required this.code});

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

class GetCeilingDeviceReportsEvent extends CeilingSensorEvent {
  final String code;
  final String deviceUuid;

  const GetCeilingDeviceReportsEvent(
      {required this.code, required this.deviceUuid});

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

class ShowCeilingDescriptionEvent extends CeilingSensorEvent {
  final String description;

  const ShowCeilingDescriptionEvent({required this.description});

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

class BackToCeilingGridViewEvent extends CeilingSensorEvent {}

class CeilingFactoryResetEvent extends CeilingSensorEvent {
  final String devicesId;
  final FactoryResetModel factoryResetModel;

  const CeilingFactoryResetEvent({
    required this.devicesId,
    required this.factoryResetModel,
  });

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



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