part of 'realtime_device_changes_bloc.dart';

enum RealtimeDeviceChangesStatus { initial, loaded, failure }

final class RealtimeDeviceChangesState extends Equatable {
  const RealtimeDeviceChangesState({
    this.status = RealtimeDeviceChangesStatus.initial,
    this.deviceStatusList = const <Status>[],
    this.errorMessage,
  });

  final RealtimeDeviceChangesStatus status;
  final List<Status> deviceStatusList;
  final String? errorMessage;

  RealtimeDeviceChangesState copyWith({
    RealtimeDeviceChangesStatus? status,
    List<Status>? deviceStatusList,
    String? errorMessage,
  }) {
    return RealtimeDeviceChangesState(
      status: status ?? this.status,
      deviceStatusList: deviceStatusList ?? this.deviceStatusList,
      errorMessage: errorMessage ?? this.errorMessage,
    );
  }

  @override
  List<Object?> get props => [status, deviceStatusList, errorMessage];
}
