part of 'verify_otp_bloc.dart';

enum VerifyOtpStatus { initial, loading, success, failure }

class VerifyOtpState extends Equatable {
  final VerifyOtpStatus status;
  final String? errorMessage;
  final String otp;

  const VerifyOtpState({
    this.status = VerifyOtpStatus.initial,
    this.errorMessage,
    this.otp = '',
  });

  VerifyOtpState copyWith({
    VerifyOtpStatus? status,
    String? errorMessage,
    bool clearError = false,
    String? otp,
  }) {
    return VerifyOtpState(
      status: status ?? this.status,
      errorMessage: clearError ? null : (errorMessage ?? this.errorMessage),
      otp: otp ?? this.otp,
    );
  }

  @override
  List<Object?> get props => [status, errorMessage, otp];
}