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; import c.a.j.h1; 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 d0.g; import d0.z.d.a0; import d0.z.d.k; import d0.z.d.m; import d0.z.d.o; 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 { public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.V(d.class, "binding", "getBinding()Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 0)}; 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 { 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 */ public SimpleConfirmationDialogArgs mo1invoke() { 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; } StringBuilder K = c.d.b.a.a.K("Missing args for class type "); K.append(a0.getOrCreateKotlinClass(SimpleConfirmationDialogArgs.class).getSimpleName()); K.append(" + key "); throw new IllegalStateException(c.d.b.a.a.B(K, this.$argsKey, '!')); } } /* compiled from: SimpleConfirmationDialog.kt */ public static final class c { public c(DefaultConstructorMarker defaultConstructorMarker) { } } /* compiled from: SimpleConfirmationDialog.kt */ /* renamed from: c.a.a.d$d reason: collision with other inner class name */ public static final /* synthetic */ class C0011d extends k implements Function1 { public static final C0011d i = new C0011d(); public C0011d() { super(1, h1.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/SimpleConfirmationDialogBinding;", 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 h1 invoke(View view) { 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) { return new h1((LinearLayout) view2, linearLayout, textView, materialButton, materialButton2, textView2); } } } } } 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(); } public final h1 h() { return (h1) this.m.getValue((Fragment) this, i[0]); } @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); h().f102c.setOnClickListener(new a(1, this)); MaterialButton materialButton = h().f102c; m.checkNotNullExpressionValue(materialButton, "binding.simpleConfirmationDialogNegative"); materialButton.setText(g().l); TextView textView = h().e; m.checkNotNullExpressionValue(textView, "binding.simpleConfirmationDialogTitle"); c.a.l.b.a(textView, g().i); TextView textView2 = h().b; m.checkNotNullExpressionValue(textView2, "binding.simpleConfirmationDialogDescription"); c.a.l.b.a(textView2, g().j); } }