import 'package:auth/src/features/sign_up/domain/entities/two_fa_secret_entity.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'address_view_state.dart';

part 'sign_up_view_state.freezed.dart';

@freezed
abstract class SignUpViewState with _$SignUpViewState {
  const factory SignUpViewState({
    @Default(0) int currentIndex,

    @Default('') String documentNumber,
    @Default('') String documentType,
    @Default(false) bool acceptTerms,
    @Default('') String relationship,

    @Default('') String firstName,
    @Default('') String lastName,
    @Default('') String email,
    @Default('') String phone,
    @Default('') String language,
    DateTime? bornAt,
    @Default('') String password,
    @Default('') String repeatPassword,
    @Default(false) bool isShowPassword,
    @Default('') String userId,
    @Default('') String placeOfBirth,
    @Default('') String birthCountry,

    @Default(AddressViewState()) AddressViewState address,

    @Default('') String emailError,
    @Default('') String passwordError,
    @Default('') String phoneError,
    @Default('') String errorMessage,
    @Default(false) bool isLoading,
    @Default(false) bool showErrors,
    @Default('') String token,
    TwoFASecretEntity? twoFASecret,
    @Default('') String otpCode,
    @Default('') String otpError,
    @Default(false) bool isOtpLoading,
    @Default(false) bool showAccountCreated,
  }) = _SignUpViewState;
}
