// curtain_state.dart
import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/devices/model/curtain_model.dart';
import 'package:syncrow_app/features/devices/model/group_curtain_model.dart';

abstract class CurtainState extends Equatable {
  const CurtainState();

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

class CurtainInitial extends CurtainState {}

class LoadingInitialState extends CurtainState {}

class UpdateCurtain extends CurtainState {
  final double curtainWidth;
  final double blindHeight;
  final double openPercentage;

  const UpdateCurtain({
    required this.curtainWidth,
    required this.blindHeight,
    required this.openPercentage,
  });

  @override
  List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
}

class FailedState extends CurtainState {}

class CurtainLoadingState extends CurtainState {}

class CurtainsOpening extends CurtainState {
  final double curtainWidth;
  final double blindHeight;
  final double openPercentage;

  const CurtainsOpening({
    required this.curtainWidth,
    required this.blindHeight,
    required this.openPercentage,
  });

  @override
  List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
}

class CurtainsClosing extends CurtainState {
  final double curtainWidth;
  final double blindHeight;
  final double openPercentage;

  const CurtainsClosing({
    required this.curtainWidth,
    required this.blindHeight,
    required this.openPercentage,
  });

  @override
  List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
}

class CurtainsPaused extends CurtainState {
  final double curtainWidth;
  final double blindHeight;
  final double openPercentage;

  const CurtainsPaused({
    required this.curtainWidth,
    required this.blindHeight,
    required this.openPercentage,
  });

  @override
  List<Object?> get props => [curtainWidth, blindHeight, openPercentage];
}

class UpdateGroupState extends CurtainState {
  final List<GroupCurtainModel> curtainList;
  final bool allSwitches;

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

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

class LoadingNewSate extends CurtainState {
  final CurtainModel curtainModel;
  const LoadingNewSate({required this.curtainModel});

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