package com.discord.widgets.auth; import android.content.Context; import android.content.Intent; import androidx.activity.result.ActivityResultLauncher; import c0.t.u; import c0.z.d.m; import c0.z.d.o; import com.discord.R; import com.discord.utilities.error.Error; import com.discord.utilities.view.validators.ValidationManager; import com.discord.widgets.auth.WidgetAuthPhoneVerify; import java.util.Collection; import java.util.List; import java.util.Map; import kotlin.Unit; import kotlin.jvm.functions.Function1; /* compiled from: WidgetAuthLogin.kt */ public final class WidgetAuthLogin$forgotPassword$2 extends o implements Function1 { public final /* synthetic */ String $login; public final /* synthetic */ WidgetAuthLogin this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public WidgetAuthLogin$forgotPassword$2(WidgetAuthLogin widgetAuthLogin, String str) { super(1); this.this$0 = widgetAuthLogin; this.$login = str; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Error error) { invoke(error); return Unit.a; } public final void invoke(Error error) { m.checkNotNullParameter(error, "error"); Error.Response response = error.getResponse(); m.checkNotNullExpressionValue(response, "error.response"); if (response.getCode() == 70007) { WidgetAuthPhoneVerify.Companion companion = WidgetAuthPhoneVerify.Companion; Context requireContext = this.this$0.requireContext(); ActivityResultLauncher access$getPhoneVerifyPasswordLauncher$p = WidgetAuthLogin.access$getPhoneVerifyPasswordLauncher$p(this.this$0); String str = this.$login; String string = this.this$0.getString(R.string.password_recovery_verify_phone_title); m.checkNotNullExpressionValue(string, "getString(R.string.passw…overy_verify_phone_title)"); String string2 = this.this$0.getString(R.string.password_recovery_verify_phone_subtitle); m.checkNotNullExpressionValue(string2, "getString(R.string.passw…ry_verify_phone_subtitle)"); companion.launch(requireContext, access$getPhoneVerifyPasswordLauncher$p, str, string, string2); error.setShowErrorToasts(false); return; } ValidationManager access$getValidationManager$p = WidgetAuthLogin.access$getValidationManager$p(this.this$0); Error.Response response2 = error.getResponse(); m.checkNotNullExpressionValue(response2, "error.response"); Map> messages = response2.getMessages(); m.checkNotNullExpressionValue(messages, "error.response.messages"); List mutableList = u.toMutableList((Collection) access$getValidationManager$p.setErrors(messages)); WidgetAuthCaptcha.Companion.processErrorsForCaptcha(this.this$0.requireContext(), WidgetAuthLogin.access$getCaptchaForgotPasswordLauncher$p(this.this$0), mutableList, error); error.setShowErrorToasts(!mutableList.isEmpty()); } }