part of 'adhesions_bloc.dart';

enum AdhesionsStatus { initial, loading, loaded, error }

class AdhesionsState extends Equatable {
  final AdhesionsStatus status;
  final List<AdhesionModel> adhesions;
  final AdhesionModel? adhesionDetail;
  final Map<String, dynamic>? stats;
  final String? message;
  final Object? error;

  const AdhesionsState({
    this.status = AdhesionsStatus.initial,
    this.adhesions = const [],
    this.adhesionDetail,
    this.stats,
    this.message,
    this.error,
  });

  AdhesionsState copyWith({
    AdhesionsStatus? status,
    List<AdhesionModel>? adhesions,
    AdhesionModel? adhesionDetail,
    Map<String, dynamic>? stats,
    String? message,
    Object? error,
  }) {
    return AdhesionsState(
      status: status ?? this.status,
      adhesions: adhesions ?? this.adhesions,
      adhesionDetail: adhesionDetail ?? this.adhesionDetail,
      stats: stats ?? this.stats,
      message: message ?? this.message,
      error: error ?? this.error,
    );
  }

  @override
  List<Object?> get props => [status, adhesions, adhesionDetail, stats, message, error];
}
