part of 'register_form_bloc.dart';

@freezed
class RegisterFormState with _$RegisterFormState {
  const factory RegisterFormState({
    required String phoneNumber,
    required String name,
    required DateTime birthDate,
    required Option<Either<AuthFailure, Register>> failureOrRegisterOption,
    @Default(false) bool isSubmitting,
    @Default(false) bool showErrorMessages,
  }) = _RegisterFormState;

  factory RegisterFormState.initial() => RegisterFormState(
    phoneNumber: '',
    failureOrRegisterOption: none(),
    name: '',
    birthDate: DateTime.now(),
  );
}
