package c.a.a.d; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import c.a.i.u0; import com.airbnb.lottie.LottieAnimationView; import com.discord.app.AppDialog; import com.discord.utilities.animations.LottieAnimationUtilsKt; import com.discord.utilities.resources.StringResourceUtilsKt; import com.discord.utilities.viewbinding.FragmentViewBindingDelegate; import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt; import com.google.android.material.button.MaterialButton; import d0.z.d.k; import d0.z.d.m; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.ranges.IntRange; import kotlin.reflect.KProperty; /* compiled from: PremiumGuildSubscriptionActivatedDialog.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/PremiumGuildSubscriptionActivatedDialogBinding;", 0)}; public static final IntRange j = new IntRange(540, 825); public static final a k = new a(null); public final FragmentViewBindingDelegate l = FragmentViewBindingDelegateKt.viewBinding$default(this, b.i, null, 2, null); public Function0 m; /* compiled from: PremiumGuildSubscriptionActivatedDialog.kt */ public static final class a { public a(DefaultConstructorMarker defaultConstructorMarker) { } public final void a(FragmentManager fragmentManager, Context context, String str, int i, boolean z2, Function0 function0) { m.checkNotNullParameter(fragmentManager, "fragmentManager"); m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(function0, "dismissListener"); CharSequence g = z2 ? c.a.l.b.g(context, 2131889968, new Object[0], null, 4) : c.a.l.b.g(context, 2131889951, new Object[0], null, 4); CharSequence g2 = str == null ? c.a.l.b.g(context, 2131889953, new Object[]{StringResourceUtilsKt.getI18nPluralString(context, 2131755178, i, Integer.valueOf(i))}, null, 4) : z2 ? c.a.l.b.g(context, 2131889969, new Object[]{str, StringResourceUtilsKt.getI18nPluralString(context, 2131755179, i, Integer.valueOf(i))}, null, 4) : c.a.l.b.g(context, 2131889952, new Object[]{str, StringResourceUtilsKt.getI18nPluralString(context, 2131755176, i, Integer.valueOf(i))}, null, 4); c cVar = new c(); cVar.m = function0; Bundle bundle = new Bundle(); bundle.putCharSequence("extra_body1_text", g); bundle.putCharSequence("extra_body2_text", g2); cVar.setArguments(bundle); cVar.show(fragmentManager, c.class.getName()); } } /* compiled from: PremiumGuildSubscriptionActivatedDialog.kt */ public static final /* synthetic */ class b extends k implements Function1 { public static final b i = new b(); public b() { super(1, u0.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/PremiumGuildSubscriptionActivatedDialogBinding;", 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 u0 invoke(View view) { View view2 = view; m.checkNotNullParameter(view2, "p1"); int i2 = 2131364253; TextView textView = (TextView) view2.findViewById(2131364253); if (textView != null) { i2 = 2131364254; TextView textView2 = (TextView) view2.findViewById(2131364254); if (textView2 != null) { i2 = 2131364255; LottieAnimationView lottieAnimationView = (LottieAnimationView) view2.findViewById(2131364255); if (lottieAnimationView != null) { i2 = 2131364256; MaterialButton materialButton = (MaterialButton) view2.findViewById(2131364256); if (materialButton != null) { return new u0((LinearLayout) view2, textView, textView2, lottieAnimationView, materialButton); } } } } throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2))); } } /* compiled from: PremiumGuildSubscriptionActivatedDialog.kt */ /* renamed from: c.a.a.d.c$c reason: collision with other inner class name */ public static final class View$OnClickListenerC0011c implements View.OnClickListener { public final /* synthetic */ c i; public View$OnClickListenerC0011c(c cVar) { this.i = cVar; } @Override // android.view.View.OnClickListener public final void onClick(View view) { this.i.dismiss(); } } public c() { super(2131558636); } public final u0 g() { return (u0) this.l.getValue((Fragment) this, i[0]); } @Override // androidx.fragment.app.DialogFragment, android.content.DialogInterface.OnDismissListener public void onDismiss(DialogInterface dialogInterface) { m.checkNotNullParameter(dialogInterface, "dialog"); Function0 function0 = this.m; if (function0 != null) { function0.mo1invoke(); } super.onDismiss(dialogInterface); } @Override // com.discord.app.AppDialog public void onViewBoundOrOnResume() { super.onViewBoundOrOnResume(); TextView textView = g().b; m.checkNotNullExpressionValue(textView, "binding.premiumGuildSubscriptionActivatedBody1"); Bundle arguments = getArguments(); CharSequence charSequence = null; textView.setText(arguments != null ? arguments.getCharSequence("extra_body1_text") : null); TextView textView2 = g().f159c; m.checkNotNullExpressionValue(textView2, "binding.premiumGuildSubscriptionActivatedBody2"); Bundle arguments2 = getArguments(); if (arguments2 != null) { charSequence = arguments2.getCharSequence("extra_body2_text"); } textView2.setText(charSequence); g().e.setOnClickListener(new View$OnClickListenerC0011c(this)); LottieAnimationView lottieAnimationView = g().d; m.checkNotNullExpressionValue(lottieAnimationView, "binding.premiumGuildSubscriptionActivatedLottie"); LottieAnimationUtilsKt.loopFrom(lottieAnimationView, 180, j); } }