part of 'org_types_bloc.dart';

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

class LoadOrgTypes extends OrgTypesEvent {
  const LoadOrgTypes();
}

class CreateOrgTypeEvent extends OrgTypesEvent {
  final String code;
  final String libelle;
  final String? description;
  final String? couleur;
  final int ordreAffichage;

  const CreateOrgTypeEvent({
    required this.code,
    required this.libelle,
    this.description,
    this.couleur,
    this.ordreAffichage = 0,
  });

  @override
  List<Object?> get props => [code, libelle, description, couleur, ordreAffichage];
}

class UpdateOrgTypeEvent extends OrgTypesEvent {
  final String id;
  final String code;
  final String libelle;
  final String? description;
  final String? couleur;
  final int ordreAffichage;

  const UpdateOrgTypeEvent({
    required this.id,
    required this.code,
    required this.libelle,
    this.description,
    this.couleur,
    this.ordreAffichage = 0,
  });

  @override
  List<Object?> get props => [id, code, libelle, description, couleur, ordreAffichage];
}

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