discord-jadx/app/src/main/java/com/discord/utilities/auth/RegistrationFlowRepo.java

159 lines
4.9 KiB
Java

package com.discord.utilities.auth;
import com.discord.models.domain.ModelInvite;
import com.discord.utilities.analytics.AnalyticsTracker;
import d0.g;
import d0.z.d.m;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.Lazy;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: RegistrationFlowRepo.kt */
public final class RegistrationFlowRepo {
public static final Companion Companion = new Companion(null);
private static final Lazy INSTANCE$delegate = g.lazy(RegistrationFlowRepo$Companion$INSTANCE$2.INSTANCE);
private Long birthday;
private String email;
private Map<String, ? extends List<String>> errors;
private ModelInvite invite;
private boolean isRegistering;
private String password = "";
private String phone;
private String phoneToken;
private String username = "";
/* compiled from: RegistrationFlowRepo.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final RegistrationFlowRepo getINSTANCE() {
Lazy access$getINSTANCE$cp = RegistrationFlowRepo.access$getINSTANCE$cp();
Companion companion = RegistrationFlowRepo.Companion;
return (RegistrationFlowRepo) access$getINSTANCE$cp.getValue();
}
}
public static final /* synthetic */ Lazy access$getINSTANCE$cp() {
return INSTANCE$delegate;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.utilities.auth.RegistrationFlowRepo */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void trackTransition$default(RegistrationFlowRepo registrationFlowRepo, String str, String str2, List list, int i, Object obj) {
if ((i & 4) != 0) {
list = null;
}
registrationFlowRepo.trackTransition(str, str2, list);
}
public final void clear() {
this.email = null;
this.phone = null;
this.phoneToken = null;
this.username = "";
this.password = "";
this.birthday = null;
this.errors = null;
}
public final Long getBirthday() {
return this.birthday;
}
public final String getEmail() {
return this.email;
}
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: java.util.Map<java.lang.String, ? extends java.util.List<java.lang.String>>, java.util.Map<java.lang.String, java.util.List<java.lang.String>> */
public final Map<String, List<String>> getErrors() {
return this.errors;
}
public final ModelInvite getInvite() {
return this.invite;
}
public final String getPassword() {
return this.password;
}
public final String getPhone() {
return this.phone;
}
public final String getPhoneToken() {
return this.phoneToken;
}
public final String getUsername() {
return this.username;
}
public final boolean isRegistering() {
return this.isRegistering;
}
public final void setBirthday(Long l) {
this.birthday = l;
}
public final void setEmail(String str) {
this.email = str;
}
public final void setErrors(Map<String, ? extends List<String>> map) {
this.errors = map;
}
public final void setInvite(ModelInvite modelInvite) {
this.invite = modelInvite;
}
public final void setPassword(String str) {
m.checkNotNullParameter(str, "<set-?>");
this.password = str;
}
public final void setPhone(String str) {
this.phone = str;
}
public final void setPhoneToken(String str) {
this.phoneToken = str;
}
public final void setRegistering(boolean z2) {
this.isRegistering = z2;
}
public final void setUsername(String str) {
m.checkNotNullParameter(str, "<set-?>");
this.username = str;
}
public final void trackTransition(String str, String str2, List<String> list) {
m.checkNotNullParameter(str, "step");
m.checkNotNullParameter(str2, "actionType");
if (this.isRegistering) {
AnalyticsTracker analyticsTracker = AnalyticsTracker.INSTANCE;
Map<String, Object> modelInviteToProperties = analyticsTracker.modelInviteToProperties(this.invite, new LinkedHashMap());
if (this.invite != null) {
modelInviteToProperties.put("registration_source", "invite");
}
String str3 = null;
if (this.email != null) {
str3 = "email";
} else if (this.phone != null) {
str3 = "phone";
}
analyticsTracker.registerTransition(str, str2, str3, list, modelInviteToProperties);
}
}
}