import 'package:equatable/equatable.dart';
import 'package:syncrow_web/pages/visitor_password/model/device_model.dart';

abstract class VisitorPasswordState extends Equatable {
  const VisitorPasswordState();

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

class VisitorPasswordInitial extends VisitorPasswordState {}

class PasswordTypeSelected extends VisitorPasswordState {
  final String selectedType;
  const PasswordTypeSelected(this.selectedType);
  @override
  List<Object> get props => [selectedType];
}

class UsageFrequencySelected extends VisitorPasswordState {
  final String selectedFrequency;

  const UsageFrequencySelected(this.selectedFrequency);

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

class IsRepeatState extends VisitorPasswordState {
  final bool repeat;
  const IsRepeatState({required this.repeat});

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

class LoadingInitialState extends VisitorPasswordState {}

class ChangeTimeState extends VisitorPasswordState {}

class TimeSelectedState extends VisitorPasswordState {}

class DeviceLoaded extends VisitorPasswordState {}

class SuccessState extends VisitorPasswordState {}

class FailedState extends VisitorPasswordState {
  final String message;
  const FailedState(this.message);
  @override
  List<Object> get props => [message];
}

class TableLoaded extends VisitorPasswordState {
  final List<DeviceModel> data;
  const TableLoaded(this.data);
  @override
  List<Object> get props => [data];
}

class DeviceSelectionUpdated extends VisitorPasswordState {
  final List<String> selectedDeviceIds;
  const DeviceSelectionUpdated(this.selectedDeviceIds);
}
