import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/devices/model/ac_model.dart';
import 'package:syncrow_app/features/devices/model/device_model.dart';

abstract class AcsState extends Equatable {
  const AcsState();

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

class AcsInitialState extends AcsState {}

class AcsLoadingState extends AcsState {}

class AcChangeLoading extends AcsState {
  final AcStatusModel acStatusModel;
  const AcChangeLoading({required this.acStatusModel});

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

class AcModifyingState extends AcsState {
  final AcStatusModel acStatusModel;
  const AcModifyingState({required this.acStatusModel});

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

class GetAcStatusState extends AcsState {
  final AcStatusModel acStatusModel;
  const GetAcStatusState({required this.acStatusModel});

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

class GetAllAcsStatusState extends AcsState {
  final List<AcStatusModel> allAcsStatues;
  final List<DeviceModel> allAcs;
  final bool allOn;
  final bool allTempSame;
  final int temp;

  const GetAllAcsStatusState(
      {required this.allAcsStatues,
      required this.allAcs,
      required this.allOn,
      required this.allTempSame,
      required this.temp});

  @override
  List<Object> get props => [allAcsStatues, allAcs, allAcs, allTempSame, temp];
}

class AcsFailedState extends AcsState {
  final String errorMessage;

  const AcsFailedState({required this.errorMessage});

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

class UpdateTimerState extends AcsState {
  final int seconds;
  const UpdateTimerState({required this.seconds});

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

class TimerRunInProgress extends AcsState {
  final int remainingTime;

  const TimerRunInProgress(this.remainingTime);

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

class TimerRunComplete extends AcsState {}
