part of 'provider_list_cubit.dart';

enum ProviderListStatus { initial, loading, success, failure }

class ProviderListState extends Equatable {
  final ProviderListStatus status;
  final List<ProviderModel> providers;
  final List<ProviderModel> allProviders;
  final String? errorMessage;

  const ProviderListState({
    this.status = ProviderListStatus.initial,
    this.providers = const [],
    this.allProviders = const [],
    this.errorMessage,
  });

  ProviderListState copyWith({
    ProviderListStatus? status,
    List<ProviderModel>? providers,
    List<ProviderModel>? allProviders,
    String? errorMessage,
  }) {
    return ProviderListState(
      status: status ?? this.status,
      providers: providers ?? this.providers,
      allProviders: allProviders ?? this.allProviders,
      errorMessage: errorMessage ?? this.errorMessage,
    );
  }

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