2021-12-17 22:01:24 +00:00
|
|
|
package b.a.a;
|
2021-08-03 07:33:18 +00:00
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
2021-09-21 07:33:49 +00:00
|
|
|
import androidx.fragment.app.FragmentManager;
|
2021-12-17 22:01:24 +00:00
|
|
|
import b.a.i.m1;
|
2021-08-09 22:50:52 +00:00
|
|
|
import com.discord.R;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.app.AppDialog;
|
|
|
|
import com.discord.dialogs.SimpleConfirmationDialogArgs;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
|
|
|
import com.google.android.material.button.MaterialButton;
|
2021-11-01 07:19:03 +00:00
|
|
|
import d0.g;
|
|
|
|
import d0.z.d.a0;
|
|
|
|
import d0.z.d.k;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import d0.z.d.o;
|
2021-08-03 07:33:18 +00:00
|
|
|
import kotlin.Lazy;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
|
|
|
/* compiled from: SimpleConfirmationDialog.kt */
|
2021-12-17 22:01:24 +00:00
|
|
|
public final class e extends AppDialog {
|
|
|
|
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(e.class, "binding", "getBinding()Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 0)};
|
|
|
|
public static final c k = new c(null);
|
|
|
|
public final Lazy l = g.lazy(new b(this, "intent_args_key"));
|
|
|
|
public View.OnClickListener m;
|
|
|
|
public final FragmentViewBindingDelegate n = FragmentViewBindingDelegateKt.viewBinding$default(this, d.j, null, 2, null);
|
2021-08-03 07:33:18 +00:00
|
|
|
|
|
|
|
/* compiled from: java-style lambda group */
|
|
|
|
public static final class a implements View.OnClickListener {
|
2021-12-17 22:01:24 +00:00
|
|
|
public final /* synthetic */ int j;
|
|
|
|
public final /* synthetic */ Object k;
|
2021-08-03 07:33:18 +00:00
|
|
|
|
|
|
|
public a(int i, Object obj) {
|
2021-12-17 22:01:24 +00:00
|
|
|
this.j = i;
|
|
|
|
this.k = obj;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
2021-12-17 22:01:24 +00:00
|
|
|
int i = this.j;
|
2021-08-03 07:33:18 +00:00
|
|
|
if (i == 0) {
|
2021-12-17 22:01:24 +00:00
|
|
|
View.OnClickListener onClickListener = ((e) this.k).m;
|
2021-08-03 07:33:18 +00:00
|
|
|
if (onClickListener != null) {
|
|
|
|
onClickListener.onClick(view);
|
|
|
|
}
|
2021-12-17 22:01:24 +00:00
|
|
|
((e) this.k).dismiss();
|
2021-08-03 07:33:18 +00:00
|
|
|
} else if (i == 1) {
|
2021-12-17 22:01:24 +00:00
|
|
|
((e) this.k).dismiss();
|
2021-08-03 07:33:18 +00:00
|
|
|
} else {
|
|
|
|
throw null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: ArgUtils.kt */
|
|
|
|
public static final class b extends o implements Function0<SimpleConfirmationDialogArgs> {
|
|
|
|
public final /* synthetic */ String $argsKey;
|
|
|
|
public final /* synthetic */ AppDialog $this_args;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public b(AppDialog appDialog, String str) {
|
|
|
|
super(0);
|
|
|
|
this.$this_args = appDialog;
|
|
|
|
this.$argsKey = str;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
|
|
/* renamed from: invoke */
|
2021-11-01 07:19:03 +00:00
|
|
|
public SimpleConfirmationDialogArgs mo1invoke() {
|
2021-08-03 07:33:18 +00:00
|
|
|
Bundle arguments = this.$this_args.getArguments();
|
|
|
|
SimpleConfirmationDialogArgs simpleConfirmationDialogArgs = null;
|
|
|
|
Object obj = arguments != null ? arguments.get(this.$argsKey) : null;
|
|
|
|
if (obj instanceof SimpleConfirmationDialogArgs) {
|
|
|
|
simpleConfirmationDialogArgs = obj;
|
|
|
|
}
|
|
|
|
SimpleConfirmationDialogArgs simpleConfirmationDialogArgs2 = simpleConfirmationDialogArgs;
|
|
|
|
if (simpleConfirmationDialogArgs2 != null) {
|
|
|
|
return simpleConfirmationDialogArgs2;
|
|
|
|
}
|
2021-12-17 22:01:24 +00:00
|
|
|
StringBuilder R = b.d.b.a.a.R("Missing args for class type ");
|
|
|
|
b.d.b.a.a.j0(SimpleConfirmationDialogArgs.class, R, " + key ");
|
|
|
|
throw new IllegalStateException(b.d.b.a.a.G(R, this.$argsKey, '!'));
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: SimpleConfirmationDialog.kt */
|
|
|
|
public static final class c {
|
|
|
|
public c(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
2021-09-21 07:33:49 +00:00
|
|
|
|
2021-12-17 22:01:24 +00:00
|
|
|
public final e a(FragmentManager fragmentManager, SimpleConfirmationDialogArgs simpleConfirmationDialogArgs, View.OnClickListener onClickListener) {
|
2021-09-21 07:33:49 +00:00
|
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
|
|
m.checkNotNullParameter(simpleConfirmationDialogArgs, "args");
|
|
|
|
m.checkNotNullParameter(onClickListener, "positiveClickListener");
|
2021-12-17 22:01:24 +00:00
|
|
|
e eVar = new e();
|
|
|
|
eVar.setArguments(b.c.a.a0.d.c2(simpleConfirmationDialogArgs));
|
|
|
|
eVar.m = onClickListener;
|
|
|
|
eVar.show(fragmentManager, a0.getOrCreateKotlinClass(e.class).toString());
|
|
|
|
return eVar;
|
2021-09-21 07:33:49 +00:00
|
|
|
}
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: SimpleConfirmationDialog.kt */
|
2021-12-17 22:01:24 +00:00
|
|
|
public static final /* synthetic */ class d extends k implements Function1<View, m1> {
|
|
|
|
public static final d j = new d();
|
2021-08-03 07:33:18 +00:00
|
|
|
|
2021-12-17 22:01:24 +00:00
|
|
|
public d() {
|
2021-11-22 08:31:21 +00:00
|
|
|
super(1, m1.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 0);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 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
|
2021-11-22 08:31:21 +00:00
|
|
|
public m1 invoke(View view) {
|
2021-08-03 07:33:18 +00:00
|
|
|
View view2 = view;
|
|
|
|
m.checkNotNullParameter(view2, "p1");
|
2021-12-17 22:01:24 +00:00
|
|
|
int i = R.id.notice_header_container;
|
2021-08-09 22:50:52 +00:00
|
|
|
LinearLayout linearLayout = (LinearLayout) view2.findViewById(R.id.notice_header_container);
|
2021-08-03 07:33:18 +00:00
|
|
|
if (linearLayout != null) {
|
2021-12-17 22:01:24 +00:00
|
|
|
i = R.id.simple_confirmation_dialog_description;
|
2021-08-09 22:50:52 +00:00
|
|
|
TextView textView = (TextView) view2.findViewById(R.id.simple_confirmation_dialog_description);
|
2021-08-03 07:33:18 +00:00
|
|
|
if (textView != null) {
|
2021-12-17 22:01:24 +00:00
|
|
|
i = R.id.simple_confirmation_dialog_negative;
|
2021-08-09 22:50:52 +00:00
|
|
|
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.simple_confirmation_dialog_negative);
|
2021-08-03 07:33:18 +00:00
|
|
|
if (materialButton != null) {
|
2021-12-17 22:01:24 +00:00
|
|
|
i = R.id.simple_confirmation_dialog_positive;
|
2021-08-09 22:50:52 +00:00
|
|
|
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(R.id.simple_confirmation_dialog_positive);
|
2021-08-03 07:33:18 +00:00
|
|
|
if (materialButton2 != null) {
|
2021-12-17 22:01:24 +00:00
|
|
|
i = R.id.simple_confirmation_dialog_title;
|
2021-08-09 22:50:52 +00:00
|
|
|
TextView textView2 = (TextView) view2.findViewById(R.id.simple_confirmation_dialog_title);
|
2021-08-03 07:33:18 +00:00
|
|
|
if (textView2 != null) {
|
2021-11-22 08:31:21 +00:00
|
|
|
return new m1((LinearLayout) view2, linearLayout, textView, materialButton, materialButton2, textView2);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-12-17 22:01:24 +00:00
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i)));
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-17 22:01:24 +00:00
|
|
|
public e() {
|
2021-08-09 22:50:52 +00:00
|
|
|
super(R.layout.simple_confirmation_dialog);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final SimpleConfirmationDialogArgs g() {
|
2021-12-17 22:01:24 +00:00
|
|
|
return (SimpleConfirmationDialogArgs) this.l.getValue();
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
2021-11-22 08:31:21 +00:00
|
|
|
public final m1 h() {
|
2021-12-17 22:01:24 +00:00
|
|
|
return (m1) this.n.getValue((Fragment) this, j[0]);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog
|
|
|
|
public void onViewBoundOrOnResume() {
|
|
|
|
super.onViewBoundOrOnResume();
|
|
|
|
requireDialog().setCanceledOnTouchOutside(true);
|
|
|
|
h().d.setOnClickListener(new a(0, this));
|
2021-12-17 22:01:24 +00:00
|
|
|
h().d.setText(g().l);
|
|
|
|
h().c.setOnClickListener(new a(1, this));
|
|
|
|
MaterialButton materialButton = h().c;
|
2021-08-03 07:33:18 +00:00
|
|
|
m.checkNotNullExpressionValue(materialButton, "binding.simpleConfirmationDialogNegative");
|
2021-12-17 22:01:24 +00:00
|
|
|
materialButton.setText(g().m);
|
2021-08-03 07:33:18 +00:00
|
|
|
TextView textView = h().e;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.simpleConfirmationDialogTitle");
|
2021-12-17 22:01:24 +00:00
|
|
|
b.a.k.b.a(textView, g().j);
|
|
|
|
TextView textView2 = h().f155b;
|
2021-08-03 07:33:18 +00:00
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.simpleConfirmationDialogDescription");
|
2021-12-17 22:01:24 +00:00
|
|
|
b.a.k.b.a(textView2, g().k);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|