import 'package:equatable/equatable.dart';

import '../../domain/entities/network_item.dart';

export '../../domain/entities/network_item.dart';

abstract class NetworkState extends Equatable {
  const NetworkState();
  
  @override
  List<Object?> get props => [];
}

class NetworkInitial extends NetworkState {}

class NetworkLoading extends NetworkState {}

class NetworkLoaded extends NetworkState {
  final List<NetworkItem> items;
  final String currentQuery;

  const NetworkLoaded({
    required this.items,
    this.currentQuery = '',
  });

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

class NetworkError extends NetworkState {
  final String message;

  const NetworkError(this.message);

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