part of 'home_cubit.dart';

abstract class HomeState {}

class HomeInitial extends HomeState {}

//base states
class HomeLoading extends HomeState {}

class HomeError extends HomeState {
  final String errMessage;

  HomeError(this.errMessage);
}

class HomeSuccess extends HomeState {}

class ActivationSuccess extends HomeState {}

class GetSpacesLoading extends HomeLoading {}

class GetSpacesSuccess extends HomeSuccess {
  final List<SpaceModel> spaces;

  GetSpacesSuccess(this.spaces);
}

class GetSpacesError extends HomeError {
  GetSpacesError(super.errMessage);
}

//get rooms
class GetSpaceRoomsLoading extends HomeLoading {}

class ActivationError extends HomeLoading {
  final String errMessage;

  ActivationError({this.errMessage = ''});
}

class GetSpaceRoomsSuccess extends HomeSuccess {
  final List<SubSpaceModel> rooms;

  GetSpaceRoomsSuccess(this.rooms);
}

class GetSpaceRoomsError extends HomeError {
  GetSpaceRoomsError(super.errMessage);
}

//UI states
class SpaceSelected extends HomeState {
  final SpaceModel space;

  SpaceSelected(this.space);
}

class RoomSelected extends HomeState {
  final SubSpaceModel room;

  RoomSelected(this.room);
}

class RoomUnSelected extends HomeState {}

class NavChangePage extends HomeState {}

class HomePermissionUpdated extends HomeState {}

class HomeUserInfoLoaded extends HomeState {
  final UserModel user;

  HomeUserInfoLoaded(this.user);
}

class PermissionsRoleLoaded extends HomeState {
  final List<PermissionModel> permissionModel;
  PermissionsRoleLoaded(this.permissionModel);
}
