import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/devices/model/group_three_touch_model.dart';
import 'package:syncrow_app/features/devices/model/three_touch_model.dart';

class ThreeTouchState extends Equatable {
  const ThreeTouchState();

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

class InitialState extends ThreeTouchState {}

class LoadingInitialState extends ThreeTouchState {}

class UpdateState extends ThreeTouchState {
  final ThreeTouchModel threeTouchModel;
  const UpdateState({required this.threeTouchModel});

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

class LoadingNewSate extends ThreeTouchState {
  final ThreeTouchModel threeTouchModel;
  const LoadingNewSate({required this.threeTouchModel});

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

class UpdateGroupState extends ThreeTouchState {
  final List<GroupThreeTouchModel> threeTouchList;
  final bool allSwitches;

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

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

class FailedState extends ThreeTouchState {
  final String error;

  const FailedState({required this.error});

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

class ChangeSlidingSegmentState extends ThreeTouchState {
  final int value;

  const ChangeSlidingSegmentState({required this.value});

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

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

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

class TimerRunInProgress extends ThreeTouchState {
  final int remainingTime;

  const TimerRunInProgress(this.remainingTime);

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

class TimerRunComplete extends ThreeTouchState {}

class ThreeTouchSaveSchedule extends ThreeTouchState {}

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

class ChangeTimeState extends ThreeTouchState {}

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

class ChangeStateSetting extends ThreeTouchState {
  const ChangeStateSetting();
}
