import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/devices/model/group_one_gang_model.dart';
import 'package:syncrow_app/features/devices/model/one_gang_model.dart';
import 'package:syncrow_app/features/devices/model/two_gang_model.dart';

class OneGangState extends Equatable {
  const OneGangState();

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

class InitialState extends OneGangState {}

class LoadingInitialState extends OneGangState {}

class UpdateState extends OneGangState {
  final OneGangModel oneGangModel;
  const UpdateState({required this.oneGangModel});

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

class LoadingNewSate extends OneGangState {
  final OneGangModel oneGangModel;
  const LoadingNewSate({required this.oneGangModel});

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

class UpdateGroupState extends OneGangState {
  final List<GroupOneGangModel> oneGangList;
  final bool allSwitches;

  const UpdateGroupState({required this.oneGangList, required this.allSwitches});

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

class FailedState extends OneGangState {
  final String error;

  const FailedState({required this.error});

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

class ChangeSlidingSegmentState extends OneGangState {
  final int value;

  const ChangeSlidingSegmentState({required this.value});

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

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

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

class TimerRunInProgress extends OneGangState {
  final int remainingTime;

  const TimerRunInProgress(this.remainingTime);

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

class TimerRunComplete extends OneGangState {}

class SaveSchedule extends OneGangState {}

class IsToggleState extends OneGangState {
  final bool? onOff;
  const IsToggleState({this.onOff});
}

class ChangeTimeState extends OneGangState {}

class UpdateCreateScheduleState extends OneGangState {
  final bool createSchedule;
  UpdateCreateScheduleState(this.createSchedule);
}
