part of 'devices_cubit.dart';

@immutable
abstract class DevicesState {}

class DevicesInitial extends DevicesState {}

class DevicesLoading extends DevicesState {}

class DevicesSuccess extends DevicesState {}

class DevicesFailure extends DevicesState {}

class ChangeIndex extends DevicesState {}

// Devices

class GetDeviceStatusLoading extends DevicesState {
  final String? code;

  GetDeviceStatusLoading({this.code});
}

class GetDeviceStatusSuccess extends DevicesState {
  final String? code;

  GetDeviceStatusSuccess({this.code});
}

class GetDeviceStatusError extends DevicesState {
  final String errorMsg;

  GetDeviceStatusError(this.errorMsg);
}

class GetDevicesLoading extends DevicesState {}
class RoomLoading extends DevicesState {}

class GetDevicesSuccess extends DevicesState {
  GetDevicesSuccess(this.devices);
  final List<DeviceModel>? devices;
}

class GetDevicesError extends DevicesState {
  final String errorMsg;

  GetDevicesError(this.errorMsg);
}

class DevicesCategoryChanged extends DevicesState {}

class CategorySwitchChanged extends DevicesState {}

class DeviceSwitchChanged extends DevicesState {}

class DeviceSelected extends DevicesState {}

// Device Control
// class DeviceControlLoading extends DevicesState {
//   final String? code;

//   DeviceControlLoading({this.code});
// }
class SwitchControlLoading extends DevicesState {
  final String? code;
  final String? deviceId;

  SwitchControlLoading({this.deviceId, this.code});
}

class DeviceControlSuccess extends DevicesState {
  final String? code;

  DeviceControlSuccess({this.code});
}

class DeviceControlError extends DevicesState {
  final String errorMsg;

  DeviceControlError(this.errorMsg);
}

// Categories
class DevicesCategoriesLoading extends DevicesState {}

class DevicesCategoriesSuccess extends DevicesState {}

class DevicesCategoriesError extends DevicesState {
  final String errorMsg;

  DevicesCategoriesError(this.errorMsg);
}

// Curtains
class CurtainsIsOpening extends DevicesState {}

class CurtainsIsClosing extends DevicesState {}

class CurtainsStopped extends DevicesState {}
