import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/devices/model/group_two_touch_model.dart';
import 'package:syncrow_app/features/devices/model/two_touch_model.dart';

class TwoTouchState extends Equatable {
  const TwoTouchState();

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

class InitialState extends TwoTouchState {}

class TwoTouchSaveSchedule extends TwoTouchState {}

class ChangeTimeState extends TwoTouchState {}

class LoadingInitialState extends TwoTouchState {}

class UpdateState extends TwoTouchState {
  final TwoTouchModel twoTouchModel;
  const UpdateState({required this.twoTouchModel});

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

class LoadingNewSate extends TwoTouchState {
  final TwoTouchModel twoTouchModel;
  const LoadingNewSate({required this.twoTouchModel});

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

class UpdateGroupState extends TwoTouchState {
  final List<GroupTwoTouchModel> twoTouchList;
  final bool allSwitches;

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

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

class FailedState extends TwoTouchState {
  final String error;

  const FailedState({required this.error});

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

class ChangeSlidingSegmentState extends TwoTouchState {
  final int value;

  const ChangeSlidingSegmentState({required this.value});

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

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

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

class TimerRunInProgress extends TwoTouchState {
  final int remainingTime;

  const TimerRunInProgress(this.remainingTime);

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

class TimerRunComplete extends TwoTouchState {}

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

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