part of 'auth_bloc.dart';

@immutable
sealed class AuthEvent {
  const AuthEvent();
}

class AuthTypeChangedEvent extends AuthEvent {
  final AuthType authType;

  const AuthTypeChangedEvent(this.authType);
}

class AuthPhoneChangedEvent extends AuthEvent {
  const AuthPhoneChangedEvent();
}

class AuthSendSmsEvent extends AuthEvent {
  final String? phone;

  const AuthSendSmsEvent(this.phone);
}

class AuthSendSmsToPhoneEvent extends AuthEvent {
  const AuthSendSmsToPhoneEvent(this.userPhone);

  final String userPhone;
}

class PhoneVerificationCompletedEvent extends AuthEvent {
  final PhoneAuthCredential credential;

  const PhoneVerificationCompletedEvent(this.credential);
}

class PhoneVerificationFailedEvent extends AuthEvent {
  final String? error;

  const PhoneVerificationFailedEvent(this.error);
}

class CodeSentEvent extends AuthEvent {
  final String verificationId;
  final int? resendToken;

  const CodeSentEvent(this.verificationId, this.resendToken);
}

class CodeAutoRetrievalTimeoutEvent extends AuthEvent {
  final String verificationId;

  const CodeAutoRetrievalTimeoutEvent(this.verificationId);
}

class AuthEventResendUpdateTimer extends AuthEvent {
  final int seconds;

  const AuthEventResendUpdateTimer(this.seconds);
}

class AuthEventConfirmCode extends AuthEvent {
  final String smsCode;

  const AuthEventConfirmCode(this.smsCode);
}

class SignInWithInitialLink extends AuthEvent {
  const SignInWithInitialLink({required this.initialLink});

  final Uri initialLink;
}
