2021-06-27 20:44:35 +00:00
|
|
|
package c.a.a.a;
|
|
|
|
|
|
|
|
import android.app.Dialog;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.Window;
|
|
|
|
import android.widget.ImageView;
|
|
|
|
import android.widget.RelativeLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import c.a.i.x0;
|
|
|
|
import com.discord.app.AppDialog;
|
|
|
|
import com.discord.utilities.resources.StringResourceUtilsKt;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
|
|
|
import com.google.android.material.button.MaterialButton;
|
|
|
|
import d0.z.d.k;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
|
|
|
/* compiled from: UpgradePremiumGuildDialog.kt */
|
|
|
|
public final class b extends AppDialog {
|
|
|
|
public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.W(b.class, "binding", "getBinding()Lcom/discord/databinding/PremiumGuildUpgradeDialogBinding;", 0)};
|
|
|
|
public static final C0003b j = new C0003b(null);
|
|
|
|
public Function0<Unit> k;
|
|
|
|
public Function0<Unit> l;
|
|
|
|
public String m;
|
|
|
|
public boolean n;
|
|
|
|
public final FragmentViewBindingDelegate o = FragmentViewBindingDelegateKt.viewBinding$default(this, c.i, null, 2, null);
|
|
|
|
|
|
|
|
/* compiled from: java-style lambda group */
|
|
|
|
public static final class a implements View.OnClickListener {
|
|
|
|
public final /* synthetic */ int i;
|
|
|
|
public final /* synthetic */ Object j;
|
|
|
|
|
|
|
|
public a(int i, Object obj) {
|
|
|
|
this.i = i;
|
|
|
|
this.j = obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
|
|
|
int i = this.i;
|
|
|
|
if (i == 0) {
|
|
|
|
Function0<Unit> function0 = ((b) this.j).k;
|
|
|
|
if (function0 != null) {
|
|
|
|
function0.mo1invoke();
|
|
|
|
}
|
|
|
|
((b) this.j).dismiss();
|
|
|
|
} else if (i == 1) {
|
|
|
|
Function0<Unit> function02 = ((b) this.j).l;
|
|
|
|
if (function02 != null) {
|
|
|
|
function02.mo1invoke();
|
|
|
|
}
|
|
|
|
((b) this.j).dismiss();
|
|
|
|
} else if (i == 2) {
|
|
|
|
((b) this.j).dismiss();
|
|
|
|
} else {
|
|
|
|
throw null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: UpgradePremiumGuildDialog.kt */
|
|
|
|
/* renamed from: c.a.a.a.b$b reason: collision with other inner class name */
|
|
|
|
public static final class C0003b {
|
|
|
|
public C0003b(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: UpgradePremiumGuildDialog.kt */
|
|
|
|
public static final /* synthetic */ class c extends k implements Function1<View, x0> {
|
|
|
|
public static final c i = new c();
|
|
|
|
|
|
|
|
public c() {
|
|
|
|
super(1, x0.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/PremiumGuildUpgradeDialogBinding;", 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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 x0 invoke(View view) {
|
|
|
|
View view2 = view;
|
|
|
|
m.checkNotNullParameter(view2, "p1");
|
|
|
|
int i2 = 2131362756;
|
|
|
|
TextView textView = (TextView) view2.findViewById(2131362756);
|
|
|
|
if (textView != null) {
|
2021-06-27 20:53:42 +00:00
|
|
|
i2 = 2131364323;
|
|
|
|
ImageView imageView = (ImageView) view2.findViewById(2131364323);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (imageView != null) {
|
2021-06-27 20:53:42 +00:00
|
|
|
i2 = 2131364324;
|
|
|
|
TextView textView2 = (TextView) view2.findViewById(2131364324);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (textView2 != null) {
|
2021-06-27 20:53:42 +00:00
|
|
|
i2 = 2131364331;
|
|
|
|
TextView textView3 = (TextView) view2.findViewById(2131364331);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (textView3 != null) {
|
2021-06-27 20:53:42 +00:00
|
|
|
i2 = 2131365344;
|
|
|
|
MaterialButton materialButton = (MaterialButton) view2.findViewById(2131365344);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (materialButton != null) {
|
|
|
|
return new x0((RelativeLayout) view2, textView, imageView, textView2, textView3, materialButton);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public b() {
|
|
|
|
super(2131558639);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final x0 g() {
|
|
|
|
return (x0) this.o.getValue((Fragment) this, i[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog, androidx.fragment.app.DialogFragment, androidx.fragment.app.Fragment
|
|
|
|
public void onStart() {
|
|
|
|
super.onStart();
|
|
|
|
Dialog requireDialog = requireDialog();
|
|
|
|
m.checkNotNullExpressionValue(requireDialog, "requireDialog()");
|
|
|
|
Window window = requireDialog.getWindow();
|
|
|
|
if (window != null) {
|
|
|
|
window.setLayout(-1, -2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog
|
|
|
|
public void onViewBoundOrOnResume() {
|
|
|
|
super.onViewBoundOrOnResume();
|
|
|
|
if (this.k == null || this.l == null) {
|
|
|
|
dismiss();
|
|
|
|
}
|
|
|
|
requireDialog().setCanceledOnTouchOutside(true);
|
|
|
|
TextView textView = g().d;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.premiumUpsellDescription");
|
2021-06-27 20:53:42 +00:00
|
|
|
c.a.l.b.n(textView, 2131892343, new Object[]{this.m}, null, 4);
|
2021-06-27 20:44:35 +00:00
|
|
|
TextView textView2 = g().e;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.premiumUpsellServerPerk");
|
|
|
|
Context requireContext = requireContext();
|
|
|
|
m.checkNotNullExpressionValue(requireContext, "requireContext()");
|
2021-06-27 20:53:42 +00:00
|
|
|
c.a.l.b.n(textView2, 2131892341, new Object[]{StringResourceUtilsKt.getI18nPluralString(requireContext, 2131755293, 2, 2)}, null, 4);
|
2021-06-27 20:44:35 +00:00
|
|
|
TextView textView3 = g().b;
|
|
|
|
m.checkNotNullExpressionValue(textView3, "binding.continueButton");
|
|
|
|
textView3.setVisibility(this.n ^ true ? 0 : 8);
|
|
|
|
g().b.setOnClickListener(new a(0, this));
|
|
|
|
g().f.setOnClickListener(new a(1, this));
|
|
|
|
g().f174c.setOnClickListener(new a(2, this));
|
|
|
|
}
|
|
|
|
}
|