part of 'curtain_module_bloc.dart';

sealed class CurtainModuleEvent extends Equatable {
  const CurtainModuleEvent();

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

class FetchCurtainModuleStatusEvent extends CurtainModuleEvent {
  final String deviceId;
  const FetchCurtainModuleStatusEvent({required this.deviceId});

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

class SendCurtainPercentToApiEvent extends CurtainModuleEvent {
  final String deviceId;
  final Status status;

  const SendCurtainPercentToApiEvent({
    required this.deviceId,
    required this.status,
  });

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

class OpenCurtainEvent extends CurtainModuleEvent {
  final String deviceId;

  const OpenCurtainEvent({required this.deviceId});

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

class CloseCurtainEvent extends CurtainModuleEvent {
  final String deviceId;

  const CloseCurtainEvent({required this.deviceId});

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

class StopCurtainEvent extends CurtainModuleEvent {
  final String deviceId;

  const StopCurtainEvent({required this.deviceId});

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

class ChangeTimerControlEvent extends CurtainModuleEvent {
  final String deviceId;
  final int timControl;

  const ChangeTimerControlEvent({
    required this.deviceId,
    required this.timControl,
  });

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

class CurCalibrationEvent extends CurtainModuleEvent {
  final String deviceId;

  const CurCalibrationEvent({
    required this.deviceId,
  });

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

class ChangeElecMachineryModeEvent extends CurtainModuleEvent {
  final String deviceId;
  final String elecMachineryMode;

  const ChangeElecMachineryModeEvent({
    required this.deviceId,
    required this.elecMachineryMode,
  });

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

class ChangeControlBackEvent extends CurtainModuleEvent {
  final String deviceId;
  final String controlBack;

  const ChangeControlBackEvent({
    required this.deviceId,
    required this.controlBack,
  });

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

class ChangeControlBackModeEvent extends CurtainModuleEvent {
  final String deviceId;
  final String controlBackMode;

  const ChangeControlBackModeEvent({
    required this.deviceId,
    required this.controlBackMode,
  });

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

class ChangeCurtainModuleStatusEvent extends CurtainModuleEvent {
  final String deviceId;
  final CurtainModuleStatusModel status;

  const ChangeCurtainModuleStatusEvent({
    required this.deviceId,
    required this.status,
  });

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

///batch
class CurtainModuleFetchBatchStatusEvent extends CurtainModuleEvent {
  final List<String> devicesIds;

  const CurtainModuleFetchBatchStatusEvent(this.devicesIds);

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

class SendCurtainBatchPercentToApiEvent extends CurtainModuleEvent {
  final List<String> devicesId;
  final Status status;

  const SendCurtainBatchPercentToApiEvent({
    required this.devicesId,
    required this.status,
  });

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

class OpenCurtainBatchEvent extends CurtainModuleEvent {
  final List<String> devicesId;

  const OpenCurtainBatchEvent({required this.devicesId});

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

class CloseCurtainBatchEvent extends CurtainModuleEvent {
  final List<String> devicesId;

  const CloseCurtainBatchEvent({required this.devicesId});

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

class StopCurtainBatchEvent extends CurtainModuleEvent {
  final List<String> devicesId;

  const StopCurtainBatchEvent({required this.devicesId});

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

class CurtainModuleFactoryReset extends CurtainModuleEvent {
  final String deviceId;
  final FactoryResetModel factoryReset;

  const CurtainModuleFactoryReset(
      {required this.deviceId, required this.factoryReset});

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