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 AllDevicesModel? selectedDevice;

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

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

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

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

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

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

  const DeviceSelectionUpdated(this.selectedDevices);

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