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

class TwoGangState extends Equatable {
  const TwoGangState();

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

class InitialState extends TwoGangState {}

class TwoGangSaveSchedule extends TwoGangState {}

class ChangeTimeState extends TwoGangState {}

class LoadingInitialState extends TwoGangState {}

class UpdateState extends TwoGangState {
  final TwoGangModel twoGangModel;
  const UpdateState({required this.twoGangModel});

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

class LoadingNewSate extends TwoGangState {
  final TwoGangModel twoGangModel;
  const LoadingNewSate({required this.twoGangModel});

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

class UpdateGroupState extends TwoGangState {
  final List<GroupTwoGangModel> twoGangList;
  final bool allSwitches;

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

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

class FailedState extends TwoGangState {
  final String error;

  const FailedState({required this.error});

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

class ChangeSlidingSegmentState extends TwoGangState {
  final int value;

  const ChangeSlidingSegmentState({required this.value});

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

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

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

class TimerRunInProgress extends TwoGangState {
  final int remainingTime;

  const TimerRunInProgress(this.remainingTime);

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

class TimerRunComplete extends TwoGangState {}

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

// two_gang_state.dart
class UpdateCreateScheduleState extends TwoGangState {
  final bool createSchedule;
  UpdateCreateScheduleState(this.createSchedule);
}
