import 'package:equatable/equatable.dart';
import 'package:syncrow_web/pages/roles_and_permission/users_page/add_user_dialog/model/tree_node_model.dart';

sealed class UsersState extends Equatable {
  const UsersState();
}

final class UsersInitial extends UsersState {
  @override
  List<Object> get props => [];
}

final class RolePermissionInitial extends UsersState {
  @override
  List<Object> get props => [];
}

final class ChangeStatusSteps extends UsersState {
  @override
  List<Object> get props => [];
}

final class UsersLoadingState extends UsersState {
  @override
  List<Object> get props => [];
}

final class SaveState extends UsersState {
  @override
  List<Object> get props => [];
}

final class SpacesLoadedState extends UsersState {
  const SpacesLoadedState();
  @override
  List<Object> get props => [];
}

final class ErrorState extends UsersState {
  final String message;

  const ErrorState(this.message);

  @override
  List<Object> get props => [message];
}

final class RolesErrorState extends UsersState {
  final String message;

  const RolesErrorState(this.message);

  @override
  List<Object> get props => [message];
}

/// automation reports

final class ChangeTapStatus extends UsersState {
  final bool select;

  const ChangeTapStatus({required this.select});

  @override
  List<Object> get props => [select];
}

final class BasicsStepValidState extends UsersState {
  const BasicsStepValidState();
  @override
  List<Object> get props => [];
}

class BasicsStepInvalidState extends UsersState {
  const BasicsStepInvalidState();
  @override
  List<Object> get props => [];
}

final class ValidateBasics extends UsersState {
  @override
  List<Object> get props => [];
}

class UsersLoadedState extends UsersState {
  final List<TreeNode> updatedCommunities;

  const UsersLoadedState({required this.updatedCommunities});
  @override
  List<Object> get props => [];
}
