part of 'sign_in_bloc.dart';

enum ResetPassStep { email, link, password, success }

@immutable
class SignInState {
  final bool inLoading;
  final String inputValidationError;
  final String email;
  final ResetPassStep resetPassStep;
  final bool obscurePassword;
  final bool authSuccess;
  final String emailValidationError;
  final String passValidationError;

  const SignInState({
    this.inLoading = false,
    this.inputValidationError = '',
    this.emailValidationError = '',
    this.passValidationError = '',
    this.email = '',
    this.resetPassStep = ResetPassStep.email,
    this.obscurePassword = true,
    this.authSuccess = false,
  });

  SignInState copyWith({
    bool? inLoading,
    String? inputValidationError,
    String? email,
    ResetPassStep? resetPassStep,
    bool? obscurePassword,
    bool? authSuccess,
    String? emailValidationError,
    String? passValidationError,
  }) {
    return SignInState(
      inLoading: inLoading ?? this.inLoading,
      inputValidationError: inputValidationError ?? this.inputValidationError,
      email: email ?? this.email,
      resetPassStep: resetPassStep ?? this.resetPassStep,
      obscurePassword: obscurePassword ?? this.obscurePassword,
      authSuccess: authSuccess ?? this.authSuccess,
      emailValidationError: emailValidationError ?? this.emailValidationError,
      passValidationError: passValidationError ?? this.passValidationError,
    );
  }
}
