part of 'adhesions_bloc.dart';

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

class LoadAdhesions extends AdhesionsEvent {
  final int page;
  final int size;
  const LoadAdhesions({this.page = 0, this.size = 20});
  @override
  List<Object?> get props => [page, size];
}

class LoadAdhesionsByMembre extends AdhesionsEvent {
  final String membreId;
  final int page;
  final int size;
  const LoadAdhesionsByMembre(this.membreId, {this.page = 0, this.size = 20});
  @override
  List<Object?> get props => [membreId, page, size];
}

class LoadAdhesionsEnAttente extends AdhesionsEvent {
  final int page;
  final int size;
  const LoadAdhesionsEnAttente({this.page = 0, this.size = 20});
  @override
  List<Object?> get props => [page, size];
}

class LoadAdhesionsByStatut extends AdhesionsEvent {
  final String statut;
  final int page;
  final int size;
  const LoadAdhesionsByStatut(this.statut, {this.page = 0, this.size = 20});
  @override
  List<Object?> get props => [statut, page, size];
}

class LoadAdhesionById extends AdhesionsEvent {
  final String id;
  const LoadAdhesionById(this.id);
  @override
  List<Object?> get props => [id];
}

class CreateAdhesion extends AdhesionsEvent {
  final AdhesionModel adhesion;
  const CreateAdhesion(this.adhesion);
  @override
  List<Object?> get props => [adhesion];
}

class ApprouverAdhesion extends AdhesionsEvent {
  final String id;
  final String? approuvePar;
  const ApprouverAdhesion(this.id, {this.approuvePar});
  @override
  List<Object?> get props => [id, approuvePar];
}

class RejeterAdhesion extends AdhesionsEvent {
  final String id;
  final String motifRejet;
  const RejeterAdhesion(this.id, this.motifRejet);
  @override
  List<Object?> get props => [id, motifRejet];
}

class EnregistrerPaiementAdhesion extends AdhesionsEvent {
  final String id;
  final double montantPaye;
  final String? methodePaiement;
  final String? referencePaiement;
  const EnregistrerPaiementAdhesion(
    this.id, {
    required this.montantPaye,
    this.methodePaiement,
    this.referencePaiement,
  });
  @override
  List<Object?> get props => [id, montantPaye, methodePaiement, referencePaiement];
}

class LoadAdhesionsStats extends AdhesionsEvent {
  const LoadAdhesionsStats();
}
