part of 'pin_bloc.dart';

class PinState extends Equatable {
  final String pin;
  final bool pinComplete;
  final bool isVerified;
  final String error;
  final bool verifiedOnce; // New variable to prevent double listener calls

  const PinState({
    required this.pin,
    required this.pinComplete,
    required this.isVerified,
    required this.error,
    required this.verifiedOnce,
  });

  PinState copyWith({
    String? pin,
    bool? pinComplete,
    bool? isVerified,
    String? error,
    bool? verifiedOnce,
  }) {
    return PinState(
      pin: pin ?? this.pin,
      pinComplete: pinComplete ?? this.pinComplete,
      isVerified: isVerified ?? this.isVerified,
      error: error ?? this.error,
      verifiedOnce: verifiedOnce ?? this.verifiedOnce,
    );
  }

  @override
  List<Object> get props => [pin, pinComplete, isVerified, error, verifiedOnce];
}
