import 'package:equatable/equatable.dart';
import 'package:syncrow_web/pages/roles_and_permission/model/roles_user_model.dart';

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

final class TableInitial extends UserTableState {
  @override
  List<Object> get props => [];
}
final class TableSearch extends UserTableState {
  @override
  List<Object> get props => [];
}
final class RolesLoadingState extends UserTableState {
  @override
  List<Object> get props => [];
}

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

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

final class UsersLoadedState extends UserTableState {
  final List<RolesUserModel> users;
  const UsersLoadedState({required this.users});
  @override
  List<Object> get props => [users];
}

final class ErrorState extends UserTableState {
  final String message;

  const ErrorState(this.message);

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

/// report state
final class SosReportLoadingState extends UserTableState {
  @override
  List<Object> get props => [];
}

final class RolesErrorState extends UserTableState {
  final String message;

  const RolesErrorState(this.message);

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

/// automation reports

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

final class SosAutomationReportErrorState extends UserTableState {
  final String message;

  const SosAutomationReportErrorState(this.message);

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

final class ChangeTapStatus extends UserTableState {
  final bool select;

  const ChangeTapStatus({required this.select});

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

class FilterOptionsState extends UserTableState {
  final List<String> filteredOptions;

  const FilterOptionsState(this.filteredOptions);

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