2021-07-03 23:36:06 +00:00
|
|
|
package c.a.a.e;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.ImageView;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.core.content.ContextCompat;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import c.a.i.g1;
|
|
|
|
import com.discord.app.AppDialog;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
|
|
|
import com.discord.widgets.settings.premium.WidgetSettingsPremium;
|
|
|
|
import com.google.android.material.button.MaterialButton;
|
|
|
|
import d0.z.d.k;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import java.util.Objects;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
|
|
|
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
|
|
|
|
public final class c extends AppDialog {
|
|
|
|
public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.W(c.class, "binding", "getBinding()Lcom/discord/databinding/SingleValuePropPremiumUpsellDialogBinding;", 0)};
|
|
|
|
public static final b j = new b(null);
|
|
|
|
public final FragmentViewBindingDelegate k = FragmentViewBindingDelegateKt.viewBinding$default(this, C0015c.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) {
|
|
|
|
String str = null;
|
|
|
|
if (i == 1) {
|
|
|
|
c cVar = (c) this.j;
|
|
|
|
KProperty[] kPropertyArr = c.i;
|
|
|
|
Objects.requireNonNull(cVar);
|
|
|
|
WidgetSettingsPremium.Companion companion = WidgetSettingsPremium.Companion;
|
|
|
|
Context requireContext = cVar.requireContext();
|
|
|
|
m.checkNotNullExpressionValue(requireContext, "requireContext()");
|
|
|
|
Bundle arguments = cVar.getArguments();
|
|
|
|
if (arguments != null) {
|
|
|
|
str = arguments.getString("extra_section_name");
|
|
|
|
}
|
|
|
|
WidgetSettingsPremium.Companion.launch$default(companion, requireContext, null, str, 2, null);
|
|
|
|
cVar.dismiss();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
throw null;
|
|
|
|
}
|
|
|
|
((c) this.j).dismiss();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
|
|
|
|
public static final class b {
|
|
|
|
public b(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
|
|
|
|
/* renamed from: c.a.a.e.c$c reason: collision with other inner class name */
|
|
|
|
public static final /* synthetic */ class C0015c extends k implements Function1<View, g1> {
|
|
|
|
public static final C0015c i = new C0015c();
|
|
|
|
|
|
|
|
public C0015c() {
|
|
|
|
super(1, g1.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/SingleValuePropPremiumUpsellDialogBinding;", 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 g1 invoke(View view) {
|
|
|
|
View view2 = view;
|
|
|
|
m.checkNotNullParameter(view2, "p1");
|
|
|
|
int i2 = 2131362196;
|
|
|
|
LinearLayout linearLayout = (LinearLayout) view2.findViewById(2131362196);
|
|
|
|
if (linearLayout != null) {
|
|
|
|
i2 = 2131362656;
|
|
|
|
MaterialButton materialButton = (MaterialButton) view2.findViewById(2131362656);
|
|
|
|
if (materialButton != null) {
|
|
|
|
i2 = 2131362775;
|
|
|
|
View findViewById = view2.findViewById(2131362775);
|
|
|
|
if (findViewById != null) {
|
|
|
|
i2 = 2131363290;
|
|
|
|
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(2131363290);
|
|
|
|
if (materialButton2 != null) {
|
|
|
|
i2 = 2131365373;
|
|
|
|
View findViewById2 = view2.findViewById(2131365373);
|
|
|
|
if (findViewById2 != null) {
|
2021-07-04 15:26:29 +00:00
|
|
|
i2 = 2131365418;
|
|
|
|
TextView textView = (TextView) view2.findViewById(2131365418);
|
2021-07-03 23:36:06 +00:00
|
|
|
if (textView != null) {
|
2021-07-04 15:26:29 +00:00
|
|
|
i2 = 2131365419;
|
|
|
|
TextView textView2 = (TextView) view2.findViewById(2131365419);
|
2021-07-03 23:36:06 +00:00
|
|
|
if (textView2 != null) {
|
2021-07-04 15:26:29 +00:00
|
|
|
i2 = 2131365535;
|
|
|
|
ImageView imageView = (ImageView) view2.findViewById(2131365535);
|
2021-07-03 23:36:06 +00:00
|
|
|
if (imageView != null) {
|
|
|
|
return new g1((LinearLayout) view2, linearLayout, materialButton, findViewById, materialButton2, findViewById2, textView, textView2, imageView);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public c() {
|
|
|
|
super(2131558659);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final g1 g() {
|
|
|
|
return (g1) this.k.getValue((Fragment) this, i[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog
|
|
|
|
public void onViewBound(View view) {
|
|
|
|
m.checkNotNullParameter(view, "view");
|
|
|
|
super.onViewBound(view);
|
|
|
|
Bundle arguments = getArguments();
|
|
|
|
String str = null;
|
|
|
|
Integer valueOf = arguments != null ? Integer.valueOf(arguments.getInt("extra_image_drawable_res")) : null;
|
|
|
|
Bundle arguments2 = getArguments();
|
|
|
|
String string = arguments2 != null ? arguments2.getString("extra_header_text") : null;
|
|
|
|
Bundle arguments3 = getArguments();
|
|
|
|
if (arguments3 != null) {
|
|
|
|
str = arguments3.getString("extra_body_text");
|
|
|
|
}
|
|
|
|
if (valueOf != null) {
|
|
|
|
g().f.setImageDrawable(ContextCompat.getDrawable(requireContext(), valueOf.intValue()));
|
|
|
|
}
|
|
|
|
if (string != null) {
|
|
|
|
TextView textView = g().e;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.upsellHeaderText");
|
|
|
|
textView.setText(string);
|
|
|
|
}
|
|
|
|
if (str != null) {
|
|
|
|
TextView textView2 = g().d;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.upsellBodyText");
|
|
|
|
textView2.setText(str);
|
|
|
|
}
|
|
|
|
g().b.setOnClickListener(new a(0, this));
|
|
|
|
g().f95c.setOnClickListener(new a(1, this));
|
|
|
|
}
|
|
|
|
}
|