part of 'device_managment_bloc.dart';

abstract class DeviceManagementState extends Equatable {
  const DeviceManagementState();

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

class DeviceManagementInitial extends DeviceManagementState {}

class DeviceManagementLoading extends DeviceManagementState {}

class DeviceManagementLoaded extends DeviceManagementState {
  final List<AllDevicesModel> devices;
  final int selectedIndex;
  final int onlineCount;
  final int offlineCount;
  final int lowBatteryCount;
  final List<AllDevicesModel>? selectedDevice;
  final bool isControlButtonEnabled;

  const DeviceManagementLoaded({
    required this.devices,
    required this.selectedIndex,
    required this.onlineCount,
    required this.offlineCount,
    required this.lowBatteryCount,
    this.selectedDevice,
    required this.isControlButtonEnabled,
  });

  @override
  List<Object?> get props => [
        devices,
        selectedIndex,
        onlineCount,
        offlineCount,
        lowBatteryCount,
        selectedDevice,
        isControlButtonEnabled
      ];
}

class DeviceManagementFiltered extends DeviceManagementState {
  final List<AllDevicesModel> filteredDevices;
  final int selectedIndex;
  final int onlineCount;
  final int offlineCount;
  final int lowBatteryCount;
  final List<AllDevicesModel>? selectedDevice;
  final bool isControlButtonEnabled;

  const DeviceManagementFiltered({
    required this.filteredDevices,
    required this.selectedIndex,
    required this.onlineCount,
    required this.offlineCount,
    required this.lowBatteryCount,
    this.selectedDevice,
    required this.isControlButtonEnabled,
  });

  @override
  List<Object?> get props => [
        filteredDevices,
        selectedIndex,
        onlineCount,
        offlineCount,
        lowBatteryCount,
        selectedDevice,
        isControlButtonEnabled
      ];
}

class DeviceSelectionUpdated extends DeviceManagementState {
  final List<AllDevicesModel> selectedDevices;

  const DeviceSelectionUpdated(this.selectedDevices);

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