2021-08-10 21:50:53 +00:00
|
|
|
package c.a.a;
|
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
2021-09-29 00:45:08 +00:00
|
|
|
import androidx.fragment.app.FragmentManager;
|
2021-09-14 19:31:33 +00:00
|
|
|
import c.a.i.l1;
|
2021-10-19 23:48:27 +00:00
|
|
|
import c0.g;
|
|
|
|
import c0.z.d.a0;
|
|
|
|
import c0.z.d.k;
|
|
|
|
import c0.z.d.m;
|
|
|
|
import c0.z.d.o;
|
2021-08-10 21:50:53 +00:00
|
|
|
import com.discord.R;
|
|
|
|
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;
|
|
|
|
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 */
|
|
|
|
public final class d extends AppDialog {
|
2021-10-14 23:16:01 +00:00
|
|
|
public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.Z(d.class, "binding", "getBinding()Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 0)};
|
2021-08-10 21:50:53 +00:00
|
|
|
public static final c j = new c(null);
|
|
|
|
public final Lazy k = g.lazy(new b(this, "intent_args_key"));
|
|
|
|
public View.OnClickListener l;
|
|
|
|
public final FragmentViewBindingDelegate m = FragmentViewBindingDelegateKt.viewBinding$default(this, C0011d.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) {
|
|
|
|
View.OnClickListener onClickListener = ((d) this.j).l;
|
|
|
|
if (onClickListener != null) {
|
|
|
|
onClickListener.onClick(view);
|
|
|
|
}
|
|
|
|
((d) this.j).dismiss();
|
|
|
|
} else if (i == 1) {
|
|
|
|
((d) this.j).dismiss();
|
|
|
|
} 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-10-19 23:48:27 +00:00
|
|
|
public SimpleConfirmationDialogArgs mo17invoke() {
|
2021-08-10 21:50:53 +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-10-14 23:16:01 +00:00
|
|
|
StringBuilder O = c.d.b.a.a.O("Missing args for class type ");
|
|
|
|
O.append(a0.getOrCreateKotlinClass(SimpleConfirmationDialogArgs.class).getSimpleName());
|
|
|
|
O.append(" + key ");
|
|
|
|
throw new IllegalStateException(c.d.b.a.a.F(O, this.$argsKey, '!'));
|
2021-08-10 21:50:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: SimpleConfirmationDialog.kt */
|
|
|
|
public static final class c {
|
|
|
|
public c(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
2021-09-29 00:45:08 +00:00
|
|
|
|
|
|
|
public final d a(FragmentManager fragmentManager, SimpleConfirmationDialogArgs simpleConfirmationDialogArgs, View.OnClickListener onClickListener) {
|
|
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
|
|
m.checkNotNullParameter(simpleConfirmationDialogArgs, "args");
|
|
|
|
m.checkNotNullParameter(onClickListener, "positiveClickListener");
|
|
|
|
d dVar = new d();
|
2021-10-19 23:48:27 +00:00
|
|
|
dVar.setArguments(c.c.a.a0.d.d2(simpleConfirmationDialogArgs));
|
2021-09-29 00:45:08 +00:00
|
|
|
dVar.l = onClickListener;
|
|
|
|
dVar.show(fragmentManager, a0.getOrCreateKotlinClass(d.class).toString());
|
|
|
|
return dVar;
|
|
|
|
}
|
2021-08-10 21:50:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: SimpleConfirmationDialog.kt */
|
|
|
|
/* renamed from: c.a.a.d$d reason: collision with other inner class name */
|
2021-09-14 19:31:33 +00:00
|
|
|
public static final /* synthetic */ class C0011d extends k implements Function1<View, l1> {
|
2021-08-10 21:50:53 +00:00
|
|
|
public static final C0011d i = new C0011d();
|
|
|
|
|
|
|
|
public C0011d() {
|
2021-09-14 19:31:33 +00:00
|
|
|
super(1, l1.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 0);
|
2021-08-10 21:50:53 +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-09-14 19:31:33 +00:00
|
|
|
public l1 invoke(View view) {
|
2021-08-10 21:50:53 +00:00
|
|
|
View view2 = view;
|
|
|
|
m.checkNotNullParameter(view2, "p1");
|
|
|
|
int i2 = R.id.notice_header_container;
|
|
|
|
LinearLayout linearLayout = (LinearLayout) view2.findViewById(R.id.notice_header_container);
|
|
|
|
if (linearLayout != null) {
|
|
|
|
i2 = R.id.simple_confirmation_dialog_description;
|
|
|
|
TextView textView = (TextView) view2.findViewById(R.id.simple_confirmation_dialog_description);
|
|
|
|
if (textView != null) {
|
|
|
|
i2 = R.id.simple_confirmation_dialog_negative;
|
|
|
|
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.simple_confirmation_dialog_negative);
|
|
|
|
if (materialButton != null) {
|
|
|
|
i2 = R.id.simple_confirmation_dialog_positive;
|
|
|
|
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(R.id.simple_confirmation_dialog_positive);
|
|
|
|
if (materialButton2 != null) {
|
|
|
|
i2 = R.id.simple_confirmation_dialog_title;
|
|
|
|
TextView textView2 = (TextView) view2.findViewById(R.id.simple_confirmation_dialog_title);
|
|
|
|
if (textView2 != null) {
|
2021-09-14 19:31:33 +00:00
|
|
|
return new l1((LinearLayout) view2, linearLayout, textView, materialButton, materialButton2, textView2);
|
2021-08-10 21:50:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public d() {
|
|
|
|
super(R.layout.simple_confirmation_dialog);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final SimpleConfirmationDialogArgs g() {
|
|
|
|
return (SimpleConfirmationDialogArgs) this.k.getValue();
|
|
|
|
}
|
|
|
|
|
2021-09-14 19:31:33 +00:00
|
|
|
public final l1 h() {
|
|
|
|
return (l1) this.m.getValue((Fragment) this, i[0]);
|
2021-08-10 21:50:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog
|
|
|
|
public void onViewBoundOrOnResume() {
|
|
|
|
super.onViewBoundOrOnResume();
|
|
|
|
requireDialog().setCanceledOnTouchOutside(true);
|
|
|
|
h().d.setOnClickListener(new a(0, this));
|
|
|
|
h().d.setText(g().k);
|
2021-10-19 23:48:27 +00:00
|
|
|
h().f123c.setOnClickListener(new a(1, this));
|
|
|
|
MaterialButton materialButton = h().f123c;
|
2021-08-10 21:50:53 +00:00
|
|
|
m.checkNotNullExpressionValue(materialButton, "binding.simpleConfirmationDialogNegative");
|
|
|
|
materialButton.setText(g().l);
|
|
|
|
TextView textView = h().e;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.simpleConfirmationDialogTitle");
|
2021-08-24 17:45:16 +00:00
|
|
|
c.a.k.b.a(textView, g().i);
|
2021-08-10 21:50:53 +00:00
|
|
|
TextView textView2 = h().b;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.simpleConfirmationDialogDescription");
|
2021-08-24 17:45:16 +00:00
|
|
|
c.a.k.b.a(textView2, g().j);
|
2021-08-10 21:50:53 +00:00
|
|
|
}
|
|
|
|
}
|