import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/devices/model/device_info_model.dart';
import 'package:syncrow_app/features/devices/model/device_model.dart';
import 'package:syncrow_app/features/devices/model/question_model.dart';
import 'package:syncrow_app/features/devices/model/sos_model.dart';
import 'package:syncrow_app/features/devices/model/subspace_model.dart';

class SosState extends Equatable {
  const SosState();

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

class SosLoadingState extends SosState {}

class SaveState extends SosState {}

class LoadingSosDeviceInfo extends SosState {
  final DeviceInfoModel? deviceInfo;
  const LoadingSosDeviceInfo({this.deviceInfo});
}

class SosFailedState extends SosState {
  final String errorMessage;

  const SosFailedState({required this.errorMessage});

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

class UpdateState extends SosState {
  final SosModel sensor;
  const UpdateState({required this.sensor});

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

class LoadingNewSate extends SosState {
  final SosModel sosSensor;
  const LoadingNewSate({required this.sosSensor});

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

class NameEditingState extends SosState {
  final bool editName;

  NameEditingState({required this.editName});
}

class FaqLoadedState extends SosState {
  final List<QuestionModel> filteredFaqQuestions;

  FaqLoadedState({this.filteredFaqQuestions = const []});
}

class FaqSearchState extends SosState {
  final List<QuestionModel> filteredFaqQuestions;

  const FaqSearchState({this.filteredFaqQuestions = const []});
}

class FetchRoomsState extends SosState {
  final List<SubSpaceModel> roomsList;
  final List<DeviceModel> devicesList;

  const FetchRoomsState({required this.devicesList, required this.roomsList});

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

class OptionSelectedState extends SosState {
  final String selectedOption;
  final bool hasSelectionChanged;

  OptionSelectedState({
    required this.selectedOption,
    required this.hasSelectionChanged,
  });

  @override
  List<Object> get props => [selectedOption, hasSelectionChanged];
}

class SaveSelectionSuccessState extends SosState {
  @override
  List<Object> get props => [];
}
