package c.a.a; import android.content.Context; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import androidx.fragment.app.Fragment; import c.a.d.o; import com.discord.app.AppDialog; import com.discord.utilities.uri.UriHandler; import com.discord.utilities.view.extensions.ViewExtensions; import com.discord.utilities.viewbinding.FragmentViewBindingDelegate; import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt; import d0.z.d.k; import d0.z.d.m; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.reflect.KProperty; /* compiled from: ConnectedAccountActionsDialog.kt */ public final class h extends AppDialog { public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.W(h.class, "binding", "getBinding()Lcom/discord/databinding/ConnectedAccountActionsDialogBinding;", 0)}; public static final b j = new b(null); public final FragmentViewBindingDelegate k = 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 final /* synthetic */ Object k; public a(int i, Object obj, Object obj2) { this.i = i; this.j = obj; this.k = obj2; } @Override // android.view.View.OnClickListener public final void onClick(View view) { int i = this.i; if (i == 0) { UriHandler uriHandler = UriHandler.INSTANCE; Context requireContext = ((h) this.j).requireContext(); m.checkNotNullExpressionValue(requireContext, "requireContext()"); UriHandler.handle$default(uriHandler, requireContext, (String) this.k, null, 4, null); ((h) this.j).dismiss(); } else if (i == 1) { Context requireContext2 = ((h) this.j).requireContext(); m.checkNotNullExpressionValue(requireContext2, "requireContext()"); String str = (String) this.k; m.checkNotNullExpressionValue(str, "username"); o.a(requireContext2, str, 2131887622); ((h) this.j).dismiss(); } else { throw null; } } } /* compiled from: ConnectedAccountActionsDialog.kt */ public static final class b { public b(DefaultConstructorMarker defaultConstructorMarker) { } } /* compiled from: ConnectedAccountActionsDialog.kt */ public static final /* synthetic */ class c extends k implements Function1 { public static final c i = new c(); public c() { super(1, c.a.i.h.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/ConnectedAccountActionsDialogBinding;", 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 c.a.i.h invoke(View view) { View view2 = view; m.checkNotNullParameter(view2, "p1"); int i2 = 2131362679; TextView textView = (TextView) view2.findViewById(2131362679); if (textView != null) { i2 = 2131362680; TextView textView2 = (TextView) view2.findViewById(2131362680); if (textView2 != null) { i2 = 2131362681; TextView textView3 = (TextView) view2.findViewById(2131362681); if (textView3 != null) { return new c.a.i.h((LinearLayout) view2, textView, textView2, textView3); } } } throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2))); } } public h() { super(2131558447); } public final c.a.i.h g() { return (c.a.i.h) this.k.getValue((Fragment) this, i[0]); } @Override // com.discord.app.AppDialog public void onViewBound(View view) { m.checkNotNullParameter(view, "view"); super.onViewBound(view); String string = getArgumentsOrDefault().getString("ARG_PROFILE_URL", ""); String string2 = getArgumentsOrDefault().getString("ARG_USERNAME", ""); int i2 = getArgumentsOrDefault().getInt("ARG_PLATFORM_IMAGE_RES", 0); if (i2 != 0) { TextView textView = g().f98c; m.checkNotNullExpressionValue(textView, "binding.connectedAccountActionsDialogHeader"); ViewExtensions.setCompoundDrawableWithIntrinsicBounds$default(textView, i2, 0, 0, 0, 14, null); } TextView textView2 = g().f98c; m.checkNotNullExpressionValue(textView2, "binding.connectedAccountActionsDialogHeader"); textView2.setText(string2); TextView textView3 = g().d; m.checkNotNullExpressionValue(textView3, "binding.connectedAccountActionsDialogOpenInBrowser"); textView3.setVisibility((string == null || string.length() == 0) ^ true ? 0 : 8); g().d.setOnClickListener(new a(0, this, string)); g().b.setOnClickListener(new a(1, this, string2)); } }