part of 'staff_cubit.dart';

enum StaffStatus { initial, loading, success, emailSent, error }

class StaffState extends Equatable {
  final StaffStatus status;
  final List<StaffMemberModel> allStaff;
  final Map<String, List<StoreModel>> storesByStaff;
  final Map<String, List<StaffMemberModel>> staffByStore;
  final List<StaffMemberModel> storeStaff;
  final String? error;

  const StaffState({
    this.status = StaffStatus.initial,
    this.allStaff = const [],
    this.storesByStaff = const {},
    this.staffByStore = const {},
    this.storeStaff = const [],
    this.error,
  });

  StaffState copyWith({
    StaffStatus? status,
    List<StaffMemberModel>? allStaff,
    Map<String, List<StoreModel>>? storesByStaff,
    Map<String, List<StaffMemberModel>>? staffByStore,
    List<StaffMemberModel>? storeStaff,
    String? error,
  }) {
    return StaffState(
      status: status ?? this.status,
      allStaff: allStaff ?? this.allStaff,
      storesByStaff: storesByStaff ?? this.storesByStaff,
      staffByStore: staffByStore ?? this.staffByStore,
      storeStaff: storeStaff ?? this.storeStaff,
      error: error,
    );
  }

  @override
  List<Object?> get props => [
    status,
    allStaff,
    storesByStaff,
    staffByStore,
    storeStaff,
    error,
  ];
}
