part of 'admin_users_bloc.dart';

abstract class AdminUsersState {}

class AdminUsersInitial extends AdminUsersState {}

class AdminUsersLoading extends AdminUsersState {}

class AdminUsersLoaded extends AdminUsersState {
  final List<AdminUserModel> users;
  final int totalCount;
  final int currentPage;
  final int pageSize;
  final int totalPages;
  AdminUsersLoaded({
    required this.users,
    required this.totalCount,
    required this.currentPage,
    required this.pageSize,
    required this.totalPages,
  });
}

class AdminUsersError extends AdminUsersState {
  final String message;
  AdminUsersError(this.message);
}

class AdminUserDetailLoaded extends AdminUsersState {
  final AdminUserModel user;
  final List<AdminRoleModel> userRoles;
  final List<AdminRoleModel> allRoles;
  AdminUserDetailLoaded({
    required this.user,
    required this.userRoles,
    this.allRoles = const [],
  });
}

class AdminRolesLoaded extends AdminUsersState {
  final List<AdminRoleModel> roles;
  AdminRolesLoaded(this.roles);
}

class AdminUserRolesUpdated extends AdminUsersState {}
