正在查看: Crafto v9.3.3 应用的 C1063z0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 C1063z0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package Da;
import A8.x1;
import A8.y1;
import J9.C1950g2;
import J9.C2026r2;
import J9.C2033s2;
import J9.C2047u2;
import J9.ViewOnClickListenerC1904a2;
import J9.W1;
import J9.Z1;
import Xk.c;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.crafto.android.R;
import com.crafto.android.usa.data.model.FontData;
import com.crafto.android.usa.data.model.MembershipPlanDetails;
import com.crafto.android.usa.data.model.PostMedia;
import com.crafto.android.usa.data.model.QuoteData;
import com.crafto.android.usa.data.model.UserUsa;
import com.crafto.android.usa.data.model.crafto.Benefit;
import com.crafto.android.usa.data.model.membership.MembershipPaymentData;
import com.crafto.android.usa.data.model.membership.MembershipPaymentOrderData;
import com.crafto.android.usa.data.model.membership.MembsershipDetailsData;
import com.crafto.android.usa.data.model.membership.ProfileImageData;
import com.crafto.android.usa.data.model.membership.RazorpaySubscriptionData;
import com.crafto.android.usa.data.model.quotes.QuotesCategory;
import com.crafto.android.usa.ui.a_screens.membership_plan_options.MembershipPlanOptionsExpFragmentUsa;
import com.crafto.android.usa.ui.base.BaseActivityUsa;
import com.crafto.android.usa.ui.home.H4;
import com.crafto.android.usa.ui.support.WebViewActivityUsa;
import com.crafto.android.usa.utility.PreferencesHelperUsa;
import com.crafto.android.usa.utility.a;
import com.crafto.android.usa.utility.functional.AppEnums;
import com.paytmpayments.customuisdk.common.Constants.SDKConstants;
import com.yalantis.ucrop.view.CropImageView;
import dl.C5153g;
import in.juspay.hyper.constants.LogSubCategory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.C6430o;
import kotlin.collections.C6434t;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.text.StringsKt;
import la.C6615e;
import la.C6618h;
import mb.C6837c;
import oa.C7227Y;
import oa.C7254m0;
import oa.C7268t0;
import ob.C7281a;
import p003do.a;
import pb.AbstractC7391a;
import qb.C7505A;
import qb.C7515e;
import sb.C7791c;
import t7.C8349w2;
public final class C1063z0 implements Function0 {
public final int f3527a;
public final Object f3528b;
public final Object f3529c;
public C1063z0(int i10, Object obj, Object obj2) {
this.f3527a = i10;
this.f3528b = obj;
this.f3529c = obj2;
}
@Override
public final Object invoke() {
PostMedia postMedia;
String mediaURL;
RecyclerView recyclerView;
RecyclerView recyclerView2;
RecyclerView recyclerView3;
AppCompatTextView appCompatTextView;
AppCompatTextView appCompatTextView2;
ConstraintLayout constraintLayout;
AppCompatTextView appCompatTextView3;
Unit unit;
AppCompatTextView appCompatTextView4;
AppCompatTextView appCompatTextView5;
AppCompatTextView appCompatTextView6;
AppCompatTextView appCompatTextView7;
ConstraintLayout constraintLayout2;
ConstraintLayout constraintLayout3;
AppCompatTextView appCompatTextView8;
AppCompatTextView appCompatTextView9;
AppCompatTextView appCompatTextView10;
AppCompatTextView appCompatTextView11;
AppCompatTextView appCompatTextView12;
AppCompatTextView appCompatTextView13;
RecyclerView recyclerView4;
RecyclerView recyclerView5;
RecyclerView recyclerView6;
RecyclerView recyclerView7;
RecyclerView recyclerView8;
RecyclerView recyclerView9;
TextView textView;
C8349w2 c8349w2;
TextView textView2;
String url;
C8349w2 c8349w22;
ImageView imageView;
C8349w2 c8349w23;
ImageView imageView2;
String address;
C8349w2 c8349w24;
TextView textView3;
String description;
C8349w2 c8349w25;
TextView textView4;
TextView textView5;
C8349w2 c8349w26;
AppCompatTextView appCompatTextView14;
C8349w2 c8349w27;
AppCompatTextView appCompatTextView15;
ConstraintLayout constraintLayout4;
ConstraintLayout constraintLayout5;
TextView textView6;
NestedScrollView nestedScrollView;
C8349w2 c8349w28;
AppCompatImageView appCompatImageView;
String str;
String str2;
Float valueOf;
String str3;
String country;
String country2;
Object obj = this.f3529c;
Object obj2 = this.f3528b;
int i10 = 1;
int i11 = 0;
switch (this.f3527a) {
case 0:
A0 this$0 = (A0) obj;
Intrinsics.checkNotNullParameter(this$0, "this$0");
ArrayList arrayList = (ArrayList) obj2;
if (arrayList != null && (postMedia = (PostMedia) arrayList.get(0)) != null && (mediaURL = postMedia.getMediaURL()) != null && StringsKt.C(mediaURL, a.b.f53475l1, true)) {
this$0.f3255y1 = ((PostMedia) arrayList.get(0)).getMediaURL();
}
return Unit.f69574a;
case 1:
MembsershipDetailsData data = (MembsershipDetailsData) obj2;
Intrinsics.checkNotNullParameter(data, "$data");
final MembershipPlanOptionsExpFragmentUsa this$02 = (MembershipPlanOptionsExpFragmentUsa) obj;
Intrinsics.checkNotNullParameter(this$02, "this$0");
a.C0601a c0601a = p003do.a.f61810a;
c0601a.c("getMembershipData " + data, new Object[0]);
this$02.f49989V1 = data;
if (this$02.f50002y1 != null && data != null) {
c0601a.c("mytag quote url is " + MembershipPlanOptionsExpFragmentUsa.f49981m2, new Object[0]);
if (MembershipPlanOptionsExpFragmentUsa.f49981m2 == null) {
MembershipPlanOptionsExpFragmentUsa.f49981m2 = "https://media.crafto.app/home/9045e5a8-21f0-4e02-bf03-63f14189e1b7";
}
String str4 = MembershipPlanOptionsExpFragmentUsa.f49981m2;
if (str4 != null && (c8349w28 = (C8349w2) this$02.f19427w) != null && (appCompatImageView = c8349w28.f90475g2) != null) {
C7505A.q(appCompatImageView, str4, null, null, 0, 0, 0, 0, null, 510);
Unit unit2 = Unit.f69574a;
}
final Ref.IntRef intRef = new Ref.IntRef();
intRef.element = -1;
final Ref.ObjectRef objectRef = new Ref.ObjectRef();
final Ref.ObjectRef objectRef2 = new Ref.ObjectRef();
C8349w2 c8349w29 = (C8349w2) this$02.f19427w;
if (c8349w29 != null && (nestedScrollView = c8349w29.f90483k2) != null) {
nestedScrollView.setOnClickListener(new z7.H0());
Unit unit3 = Unit.f69574a;
}
UserUsa userUsa = this$02.f50002y1;
if (userUsa == null) {
Intrinsics.throwUninitializedPropertyAccessException(LogSubCategory.Action.USER);
userUsa = null;
}
Long userId = userUsa.getUserId();
if (userId != null) {
long longValue = userId.longValue();
C8349w2 c8349w210 = (C8349w2) this$02.f19427w;
if (c8349w210 != null && (textView6 = c8349w210.f90503u2) != null) {
textView6.setText(String.valueOf(longValue));
Unit unit4 = Unit.f69574a;
}
Unit unit5 = Unit.f69574a;
}
MembsershipDetailsData membsershipDetailsData = this$02.f49989V1;
if (membsershipDetailsData == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData = null;
}
if (membsershipDetailsData.getMonthlyPlanUiExperiment()) {
this$02.f49998k2 = true;
C8349w2 c8349w211 = (C8349w2) this$02.f19427w;
if (c8349w211 != null && (constraintLayout5 = c8349w211.f90506x) != null) {
Intrinsics.checkNotNullParameter(constraintLayout5, "<this>");
constraintLayout5.setOnClickListener(new z7.H0());
Unit unit6 = Unit.f69574a;
}
C8349w2 c8349w212 = (C8349w2) this$02.f19427w;
if (c8349w212 != null && (constraintLayout4 = c8349w212.f90506x) != null) {
C7505A.C(constraintLayout4);
Unit unit7 = Unit.f69574a;
}
}
Unit unit8 = Unit.f69574a;
this$02.T0();
MembsershipDetailsData membsershipDetailsData2 = this$02.f49989V1;
if (membsershipDetailsData2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData2 = null;
}
String header = membsershipDetailsData2.getHeader();
if (header != null && (c8349w27 = (C8349w2) this$02.f19427w) != null && (appCompatTextView15 = c8349w27.f90490o) != null) {
appCompatTextView15.setText(header);
}
MembsershipDetailsData membsershipDetailsData3 = this$02.f49989V1;
if (membsershipDetailsData3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData3 = null;
}
String subHeader = membsershipDetailsData3.getSubHeader();
if (subHeader != null && (c8349w26 = (C8349w2) this$02.f19427w) != null && (appCompatTextView14 = c8349w26.f90470d) != null) {
appCompatTextView14.setText(subHeader);
}
C8349w2 c8349w213 = (C8349w2) this$02.f19427w;
if (c8349w213 != null && (textView5 = c8349w213.f90487m2) != null) {
UserUsa userUsa2 = this$02.f50002y1;
if (userUsa2 == null) {
Intrinsics.throwUninitializedPropertyAccessException(LogSubCategory.Action.USER);
userUsa2 = null;
}
String displayNameFromNames = userUsa2.getDisplayNameFromNames();
textView5.setText(displayNameFromNames != null ? kotlin.text.p.l(displayNameFromNames, " ", "_") : null);
}
MembsershipDetailsData membsershipDetailsData4 = this$02.f49989V1;
if (membsershipDetailsData4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData4 = null;
}
ProfileImageData profileImage = membsershipDetailsData4.getProfileImage();
if (profileImage != null && (description = profileImage.getDescription()) != null && (c8349w25 = (C8349w2) this$02.f19427w) != null && (textView4 = c8349w25.f90484l) != null) {
textView4.setText(description);
}
MembsershipDetailsData membsershipDetailsData5 = this$02.f49989V1;
if (membsershipDetailsData5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData5 = null;
}
ProfileImageData profileImage2 = membsershipDetailsData5.getProfileImage();
if (profileImage2 != null && (address = profileImage2.getAddress()) != null && (c8349w24 = (C8349w2) this$02.f19427w) != null && (textView3 = c8349w24.f90496q2) != null) {
textView3.setText(address);
}
MembsershipDetailsData membsershipDetailsData6 = this$02.f49989V1;
if (membsershipDetailsData6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData6 = null;
}
ProfileImageData profileImage3 = membsershipDetailsData6.getProfileImage();
if (profileImage3 != null) {
String format = profileImage3.getFormat();
if (Intrinsics.areEqual(format, "GIF")) {
if (this$02.A() != null && (c8349w23 = (C8349w2) this$02.f19427w) != null && (imageView2 = c8349w23.f90485l2) != null) {
imageView2.post(new W1(i11, this$02, profileImage3));
}
} else if (Intrinsics.areEqual(format, "IMAGE") && (url = profileImage3.getUrl()) != null && (c8349w22 = (C8349w2) this$02.f19427w) != null && (imageView = c8349w22.f90501t2) != null) {
C7505A.u(imageView, url, null, null, null, 62);
}
}
UserUsa userUsa3 = this$02.f50002y1;
if (userUsa3 == null) {
Intrinsics.throwUninitializedPropertyAccessException(LogSubCategory.Action.USER);
userUsa3 = null;
}
String description2 = userUsa3.getDescription();
if (description2 != null && (c8349w2 = (C8349w2) this$02.f19427w) != null && (textView2 = c8349w2.f90484l) != null) {
textView2.setText(description2);
}
C8349w2 c8349w214 = (C8349w2) this$02.f19427w;
if (c8349w214 != null && (textView = c8349w214.f90504v) != null) {
UserUsa userUsa4 = this$02.f50002y1;
if (userUsa4 == null) {
Intrinsics.throwUninitializedPropertyAccessException(LogSubCategory.Action.USER);
userUsa4 = null;
}
textView.setText(userUsa4.getDisplayNameFromNames());
}
C2026r2 c2026r2 = new C2026r2(intRef, objectRef, this$02);
AppEnums.g.a aVar = AppEnums.g.a.f53684a;
UserUsa userUsa5 = this$02.f50002y1;
if (userUsa5 == null) {
Intrinsics.throwUninitializedPropertyAccessException(LogSubCategory.Action.USER);
userUsa5 = null;
}
objectRef.element = new M9.A(c2026r2, aVar, new C7254m0(userUsa5));
if (this$02.f49998k2) {
C2033s2 c2033s2 = new C2033s2(intRef, objectRef2, this$02);
UserUsa userUsa6 = this$02.f50002y1;
if (userUsa6 == null) {
Intrinsics.throwUninitializedPropertyAccessException(LogSubCategory.Action.USER);
userUsa6 = null;
}
objectRef2.element = new M9.A(c2033s2, aVar, new C7268t0(userUsa6));
}
C8349w2 c8349w215 = (C8349w2) this$02.f19427w;
if (c8349w215 != null && (recyclerView9 = c8349w215.f90458I) != null) {
recyclerView9.setLayoutManager(new GridLayoutManager(C7515e.a(this$02), 2, 0));
}
if (this$02.f49998k2) {
C8349w2 c8349w216 = (C8349w2) this$02.f19427w;
if (c8349w216 != null && (recyclerView8 = c8349w216.f90459L) != null) {
recyclerView8.setLayoutManager(new GridLayoutManager(C7515e.a(this$02), 2, 0));
}
C8349w2 c8349w217 = (C8349w2) this$02.f19427w;
if (c8349w217 != null && (recyclerView7 = c8349w217.f90459L) != null) {
recyclerView7.setAdapter((RecyclerView.h) objectRef2.element);
}
} else {
MembsershipDetailsData membsershipDetailsData7 = this$02.f49989V1;
if (membsershipDetailsData7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData7 = null;
}
if (membsershipDetailsData7.getPlansCarousel() != null) {
C8349w2 c8349w218 = (C8349w2) this$02.f19427w;
if (c8349w218 != null && (appCompatTextView2 = c8349w218.f90472f) != null) {
appCompatTextView2.setText(this$02.getString(R.string.cancel_anytime));
}
C8349w2 c8349w219 = (C8349w2) this$02.f19427w;
if (c8349w219 != null && (appCompatTextView = c8349w219.f90472f) != null) {
C7505A.C(appCompatTextView);
}
C8349w2 c8349w220 = (C8349w2) this$02.f19427w;
if (c8349w220 != null && (recyclerView3 = c8349w220.f90459L) != null) {
ViewGroup.LayoutParams layoutParams = recyclerView3.getLayoutParams();
layoutParams.width = -2;
recyclerView3.setLayoutParams(layoutParams);
}
C8349w2 c8349w221 = (C8349w2) this$02.f19427w;
if (c8349w221 != null && (recyclerView2 = c8349w221.f90459L) != null) {
recyclerView2.setLayoutManager(new GridLayoutManager(C7515e.a(this$02), 2, 0));
}
C8349w2 c8349w222 = (C8349w2) this$02.f19427w;
if (c8349w222 != null && (recyclerView = c8349w222.f90459L) != null) {
recyclerView.setAdapter((RecyclerView.h) objectRef.element);
}
}
}
C8349w2 c8349w223 = (C8349w2) this$02.f19427w;
if (c8349w223 != null && (recyclerView6 = c8349w223.f90458I) != null) {
recyclerView6.setAdapter((RecyclerView.h) objectRef.element);
}
MembsershipDetailsData membsershipDetailsData8 = this$02.f49989V1;
if (membsershipDetailsData8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData8 = null;
}
ArrayList<String> benefits = membsershipDetailsData8.getBenefits();
if (benefits == null || benefits.isEmpty()) {
C8349w2 c8349w224 = (C8349w2) this$02.f19427w;
if (c8349w224 != null && (constraintLayout = c8349w224.f90465Y) != null) {
C7505A.c(constraintLayout);
}
} else {
M9.A a10 = new M9.A(this$02, aVar, new C6615e());
M9.A a11 = new M9.A(this$02, aVar, new C6618h());
ArrayList arrayList2 = new ArrayList();
MembsershipDetailsData membsershipDetailsData9 = this$02.f49989V1;
if (membsershipDetailsData9 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData9 = null;
}
Iterator<T> it = membsershipDetailsData9.getBenefits().iterator();
while (it.hasNext()) {
arrayList2.add(new Benefit(null, (String) it.next(), 1, null));
}
a10.i(arrayList2);
C8349w2 c8349w225 = (C8349w2) this$02.f19427w;
if (c8349w225 != null && (recyclerView5 = c8349w225.f90468b) != null) {
recyclerView5.setAdapter(a10);
Unit unit9 = Unit.f69574a;
}
if (this$02.f49998k2 || this$02.f49996i2) {
a11.i(arrayList2);
C8349w2 c8349w226 = (C8349w2) this$02.f19427w;
if (c8349w226 != null && (recyclerView4 = c8349w226.f90469c) != null) {
recyclerView4.setAdapter(a11);
Unit unit10 = Unit.f69574a;
}
}
Unit unit11 = Unit.f69574a;
}
C8349w2 c8349w227 = (C8349w2) this$02.f19427w;
if (c8349w227 != null && (appCompatTextView13 = c8349w227.f90491o2) != null) {
appCompatTextView13.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AppCompatTextView appCompatTextView16;
MembershipPlanOptionsExpFragmentUsa this$03 = MembershipPlanOptionsExpFragmentUsa.this;
Intrinsics.checkNotNullParameter(this$03, "this$0");
C8349w2 c8349w228 = (C8349w2) this$03.f19427w;
if (c8349w228 == null || (appCompatTextView16 = c8349w228.f90489n2) == null) {
return;
}
appCompatTextView16.performClick();
}
});
}
C8349w2 c8349w228 = (C8349w2) this$02.f19427w;
if (c8349w228 != null && (appCompatTextView12 = c8349w228.f90489n2) != null) {
appCompatTextView12.setOnClickListener(new x1(this$02, i10));
}
C8349w2 c8349w229 = (C8349w2) this$02.f19427w;
if (c8349w229 != null && (appCompatTextView11 = c8349w229.f90464X) != null) {
appCompatTextView11.setOnClickListener(new y1(this$02, i10));
}
C8349w2 c8349w230 = (C8349w2) this$02.f19427w;
if (c8349w230 != null && (appCompatTextView10 = c8349w230.f90462Q) != null) {
appCompatTextView10.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MembershipPlanOptionsExpFragmentUsa this$03 = MembershipPlanOptionsExpFragmentUsa.this;
Intrinsics.checkNotNullParameter(this$03, "this$0");
C7281a c7281a = this$03.f49991Y;
if (c7281a == null) {
Intrinsics.throwUninitializedPropertyAccessException("deepLinkConstants");
c7281a = null;
}
String str5 = c7281a.f74405v;
int i12 = WebViewActivityUsa.f53287o;
BaseActivityUsa a12 = C7515e.a(this$03);
Resources resources = view.getResources();
this$03.startActivity(WebViewActivityUsa.a.a(a12, str5, resources != null ? resources.getString(R.string.privacy_policy) : null, null));
}
});
}
C8349w2 c8349w231 = (C8349w2) this$02.f19427w;
if (c8349w231 != null && (appCompatTextView9 = c8349w231.f90479i2) != null) {
appCompatTextView9.setOnClickListener(new Z1(this$02, 0));
}
C8349w2 c8349w232 = (C8349w2) this$02.f19427w;
if (c8349w232 != null && (appCompatTextView8 = c8349w232.f90477h2) != null) {
appCompatTextView8.setOnClickListener(new ViewOnClickListenerC1904a2(this$02, 0));
}
C8349w2 c8349w233 = (C8349w2) this$02.f19427w;
if (c8349w233 != null && (constraintLayout3 = c8349w233.f90509y1) != null) {
constraintLayout3.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
ConstraintLayout constraintLayout6;
MembershipPlanOptionsExpFragmentUsa this$03 = MembershipPlanOptionsExpFragmentUsa.this;
Intrinsics.checkNotNullParameter(this$03, "this$0");
C8349w2 c8349w234 = (C8349w2) this$03.f19427w;
if (c8349w234 == null || (constraintLayout6 = c8349w234.f90507x1) == null) {
return;
}
constraintLayout6.performClick();
}
});
}
C8349w2 c8349w234 = (C8349w2) this$02.f19427w;
if (c8349w234 != null && (constraintLayout2 = c8349w234.f90507x1) != null) {
constraintLayout2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
QuotesCategory selectedCategory;
RelativeLayout relativeLayout;
M9.A a12;
?? e10;
Ref.ObjectRef planAdapter = Ref.ObjectRef.this;
Intrinsics.checkNotNullParameter(planAdapter, "$planAdapter");
Ref.IntRef lastSelectedIndex = intRef;
Intrinsics.checkNotNullParameter(lastSelectedIndex, "$lastSelectedIndex");
final MembershipPlanOptionsExpFragmentUsa this$03 = this$02;
Intrinsics.checkNotNullParameter(this$03, "this$0");
Ref.ObjectRef planAdapterNew = objectRef2;
Intrinsics.checkNotNullParameter(planAdapterNew, "$planAdapterNew");
final Ref.ObjectRef objectRef3 = new Ref.ObjectRef();
objectRef3.element = ((M9.A) planAdapter.element).e(lastSelectedIndex.element);
if (this$03.f49998k2 && (a12 = (M9.A) planAdapterNew.element) != null && (e10 = a12.e(lastSelectedIndex.element)) != 0) {
objectRef3.element = e10;
}
if (objectRef3.element instanceof MembershipPlanDetails) {
C8349w2 c8349w235 = (C8349w2) this$03.f19427w;
if (c8349w235 != null && (relativeLayout = c8349w235.f90493p1) != null) {
C7505A.C(relativeLayout);
}
C7227Y c7227y = (C7227Y) this$03.f49993f2.getValue();
T t10 = objectRef3.element;
Intrinsics.checkNotNull(t10, "null cannot be cast to non-null type com.crafto.android.usa.data.model.MembershipPlanDetails");
C7791c.a(c7227y.f((MembershipPlanDetails) t10, null, null, null), new Function1() {
@Override
public final Object invoke(Object obj3) {
MembershipPaymentData membershipPaymentData;
MembershipPaymentOrderData data2 = (MembershipPaymentOrderData) obj3;
MembershipPlanOptionsExpFragmentUsa this$04 = MembershipPlanOptionsExpFragmentUsa.this;
Intrinsics.checkNotNullParameter(this$04, "this$0");
Ref.ObjectRef selectedPlan = objectRef3;
Intrinsics.checkNotNullParameter(selectedPlan, "$selectedPlan");
Intrinsics.checkNotNullParameter(data2, "data");
UserUsa p10 = this$04.S0().p();
if (p10 != null) {
String string = this$04.getString(R.string.crafto_membership_text);
String amount = data2.getAmount();
String amount2 = data2.getAmount();
String productId = data2.getProductId();
String subscriptionId = data2.getSubscriptionId();
String obfuscatedAccountId = data2.getObfuscatedAccountId();
String obfuscatedProfileId = data2.getObfuscatedProfileId();
T t11 = selectedPlan.element;
Intrinsics.checkNotNull(t11, "null cannot be cast to non-null type com.crafto.android.usa.data.model.MembershipPlanDetails");
String paymentMethod = ((MembershipPlanDetails) t11).getPaymentMethod();
RazorpaySubscriptionData subscriptionData = data2.getSubscriptionData();
T t12 = selectedPlan.element;
Intrinsics.checkNotNull(t12, "null cannot be cast to non-null type com.crafto.android.usa.data.model.MembershipPlanDetails");
p10.setMembershipPaymentData(new MembershipPaymentData(1, string, "", amount, amount2, productId, subscriptionId, obfuscatedAccountId, obfuscatedProfileId, paymentMethod, true, null, null, subscriptionData, ((MembershipPlanDetails) t12).getTerm(), null, 38912, null));
}
if (p10 != null && (membershipPaymentData = p10.getMembershipPaymentData()) != null) {
membershipPaymentData.setMembershipPaymentOrderData(data2);
}
this$04.S0().P(p10);
BaseActivityUsa.a aVar2 = this$04.f50134j;
if (aVar2 != null) {
aVar2.q(p10);
}
this$04.a0();
com.crafto.android.usa.ui.base.a.j0(this$04, "Log", "Purchase Membership", null, data2.toString(), "Order Fetch Success", 0, kotlin.collections.Q.f(new Pair("Source", this$04.f49997j2)), 484);
return Unit.f69574a;
}
}, new Function2() {
@Override
public final Object invoke(Object obj3, Object obj4) {
Throwable t11 = (Throwable) obj3;
AbstractC7391a f5 = (AbstractC7391a) obj4;
MembershipPlanOptionsExpFragmentUsa this$04 = MembershipPlanOptionsExpFragmentUsa.this;
Intrinsics.checkNotNullParameter(this$04, "this$0");
Intrinsics.checkNotNullParameter(t11, "t");
Intrinsics.checkNotNullParameter(f5, "f");
this$04.K0(R.string.internal_error);
FragmentActivity A10 = this$04.A();
if (A10 != null) {
A10.onBackPressed();
}
p003do.a.f61810a.e(t11);
com.crafto.android.usa.ui.base.a.j0(this$04, "Log", "Purchase Membership", null, t11.toString(), "Order Fetch Failed", 0, kotlin.collections.Q.f(new Pair("Source", this$04.f49997j2)), 484);
return Unit.f69574a;
}
});
PreferencesHelperUsa S02 = this$03.S0();
T t11 = objectRef3.element;
Intrinsics.checkNotNull(t11, "null cannot be cast to non-null type com.crafto.android.usa.data.model.MembershipPlanDetails");
S02.M((MembershipPlanDetails) t11);
String q10 = this$03.S0().q();
T t12 = objectRef3.element;
Intrinsics.checkNotNull(t12, "null cannot be cast to non-null type com.crafto.android.usa.data.model.MembershipPlanDetails");
Long planId = ((MembershipPlanDetails) t12).getPlanId();
String l10 = planId != null ? planId.toString() : null;
QuoteData quoteData = this$03.f49988Q;
String value = (quoteData == null || (selectedCategory = quoteData.getSelectedCategory()) == null) ? null : selectedCategory.getValue();
T t13 = objectRef3.element;
Intrinsics.checkNotNull(t13, "null cannot be cast to non-null type com.crafto.android.usa.data.model.MembershipPlanDetails");
Pair pair = new Pair("Term", ((MembershipPlanDetails) t13).getTerm());
T t14 = objectRef3.element;
Intrinsics.checkNotNull(t14, "null cannot be cast to non-null type com.crafto.android.usa.data.model.MembershipPlanDetails");
com.crafto.android.usa.ui.base.a.j0(this$03, "Click Action", "Purchase Membership", value, l10, "Membership Plan Purchase", 0, kotlin.collections.Q.f(pair, new Pair("Amount", ((MembershipPlanDetails) t14).getDisplayAmount()), new Pair("paymentSource", q10), new Pair("Source", this$03.f49997j2)), SDKConstants.ERROR_CODE_480);
try {
FragmentActivity A10 = this$03.A();
if (A10 != null) {
nb.f fVar = this$03.f49992Z;
if (fVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("analyticsUtil");
fVar = null;
}
fVar.e(A10, "fb_mobile_initiated_checkout", null);
nb.f fVar2 = this$03.f49992Z;
if (fVar2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("analyticsUtil");
fVar2 = null;
}
fVar2.g(null, "Crafto_initiated_checkout");
}
} catch (Exception e11) {
p003do.a.f61810a.e(e11);
}
}
}
});
}
MembsershipDetailsData membsershipDetailsData10 = this$02.f49989V1;
if (membsershipDetailsData10 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData10 = null;
}
ArrayList<MembershipPlanDetails> premiumPlan = membsershipDetailsData10.getPremiumPlan();
if (premiumPlan != null) {
int i12 = 0;
for (Object obj3 : premiumPlan) {
int i13 = i12 + 1;
if (i12 < 0) {
C6434t.m();
throw null;
}
if (((MembershipPlanDetails) obj3).getSelected()) {
intRef.element = i12;
}
i12 = i13;
}
if (intRef.element == -1 && premiumPlan.size() > 0) {
intRef.element = 0;
premiumPlan.get(0).setSelected(true);
MembsershipDetailsData membsershipDetailsData11 = this$02.f49989V1;
if (membsershipDetailsData11 == null) {
Intrinsics.throwUninitializedPropertyAccessException("planDetails");
membsershipDetailsData11 = null;
}
if (membsershipDetailsData11.getPlansCarousel() != null) {
Unit unit12 = Unit.f69574a;
} else {
String amountDescription = premiumPlan.get(0).getAmountDescription();
if (amountDescription != null) {
C8349w2 c8349w235 = (C8349w2) this$02.f19427w;
if (c8349w235 != null && (appCompatTextView5 = c8349w235.f90472f) != null) {
appCompatTextView5.setText(amountDescription);
Unit unit13 = Unit.f69574a;
}
C8349w2 c8349w236 = (C8349w2) this$02.f19427w;
if (c8349w236 != null && (appCompatTextView4 = c8349w236.f90472f) != null) {
C7505A.C(appCompatTextView4);
unit = Unit.f69574a;
break;
} else {
unit = null;
break;
}
}
C8349w2 c8349w237 = (C8349w2) this$02.f19427w;
if (c8349w237 != null && (appCompatTextView3 = c8349w237.f90472f) != null) {
C7505A.c(appCompatTextView3);
Unit unit14 = Unit.f69574a;
}
}
C8349w2 c8349w238 = (C8349w2) this$02.f19427w;
if (c8349w238 != null && (appCompatTextView7 = c8349w238.f90463V1) != null) {
appCompatTextView7.setText(premiumPlan.get(0).getActionText());
Unit unit15 = Unit.f69574a;
}
C8349w2 c8349w239 = (C8349w2) this$02.f19427w;
if (c8349w239 != null && (appCompatTextView6 = c8349w239.f90473f2) != null) {
appCompatTextView6.setText(premiumPlan.get(0).getActionText());
Unit unit16 = Unit.f69574a;
}
}
((M9.A) objectRef.element).i(premiumPlan);
if (this$02.f49998k2) {
Iterator<T> it2 = premiumPlan.iterator();
boolean z10 = false;
while (it2.hasNext()) {
if (((MembershipPlanDetails) it2.next()).getSavePercentageTitle() != null) {
z10 = true;
}
}
Iterator<T> it3 = premiumPlan.iterator();
while (it3.hasNext()) {
((MembershipPlanDetails) it3.next()).setTopSaveFlow(z10);
}
M9.A a12 = (M9.A) objectRef2.element;
if (a12 != null) {
a12.i(premiumPlan);
Unit unit17 = Unit.f69574a;
}
}
Unit unit18 = Unit.f69574a;
}
}
C5153g.b(androidx.lifecycle.J.a(this$02), null, null, new C2047u2(this$02, null), 3);
UserUsa userUsa7 = this$02.f50002y1;
if (userUsa7 == null) {
Intrinsics.throwUninitializedPropertyAccessException(LogSubCategory.Action.USER);
userUsa7 = null;
}
if (Intrinsics.areEqual(userUsa7.isLogFirstContent(), Boolean.TRUE)) {
this$02.A0(new C1950g2(this$02, 0));
}
this$02.S0().H(data);
ArrayList<MembershipPlanDetails> premiumPlan2 = data.getPremiumPlan();
com.crafto.android.usa.ui.base.a.j0(this$02, "Log", "Purchase Membership", null, premiumPlan2 != null ? premiumPlan2.toString() : null, "Plan Fetch Success", 0, kotlin.collections.Q.f(new Pair("Source", this$02.f49997j2)), 484);
this$02.a0();
return Unit.f69574a;
default:
H4 this$03 = (H4) obj2;
Intrinsics.checkNotNullParameter(this$03, "this$0");
QuoteData data2 = (QuoteData) obj;
Intrinsics.checkNotNullParameter(data2, "$data");
String[] strArr = mb.o.f71143e;
c.a aVar2 = Xk.c.f31426a;
String str5 = (String) C6430o.B(strArr, aVar2);
HashMap<String, Float> hashMap = mb.o.f71140b;
hashMap.get(str5);
UserUsa p10 = this$03.B1().p();
if (p10 == null || (country2 = p10.getCountry()) == null) {
str = null;
} else {
str = country2.toLowerCase(Locale.ROOT);
Intrinsics.checkNotNullExpressionValue(str, "toLowerCase(...)");
}
String str6 = a.b.f53356A0;
Locale locale = Locale.ROOT;
if (B.O.c(str6, locale, "toLowerCase(...)", str)) {
str2 = (String) C6430o.B(strArr, aVar2);
valueOf = hashMap.get(str2);
} else {
String[] strArr2 = mb.o.f71144f;
data2.setFont((String) C6430o.B(strArr2, aVar2));
str2 = (String) C6430o.B(strArr2, aVar2);
valueOf = Float.valueOf(CropImageView.DEFAULT_ASPECT_RATIO);
}
a.C0601a c0601a2 = p003do.a.f61810a;
c0601a2.c("spacing " + valueOf, new Object[0]);
data2.setFontData(new FontData(Typeface.createFromAsset(C7515e.a(this$03).getAssets(), str2), str2, valueOf != null ? valueOf.floatValue() : CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO, false, 0, 24, null));
String str7 = (String) C6430o.B(mb.o.f71147i, aVar2);
Double d10 = mb.o.f71148j.get(str7);
data2.setContentFont(str7);
if (d10 == null) {
d10 = 20;
}
data2.setContentFontSize(d10.doubleValue());
UserUsa p11 = this$03.B1().p();
if (p11 == null || (country = p11.getCountry()) == null) {
str3 = null;
} else {
str3 = country.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(str3, "toLowerCase(...)");
}
if (B.O.c(str6, locale, "toLowerCase(...)", str3)) {
data2.setContentFontSize(20.0d);
}
data2.setBackgroundStyle((C6837c.a) C6430o.B(new C6837c.a[]{C6837c.a.COLOR, C6837c.a.BACKGROUND_COLOR, C6837c.a.FRAME, C6837c.a.BLUR, C6837c.a.SHADOW, C6837c.a.BOX}, aVar2));
c0601a2.c("getHardcodedFrame", new Object[0]);
data2.setQuoteFrameUrl((String) C6430o.B(new String[]{"https://media.crafto.app/home/e25ba18c-c2a3-4f5d-b02a-73d931636841", "https://media.crafto.app/home/0ea842bb-e853-4bc0-9bf8-6d86e2fa38c4", "https://media.crafto.app/home/593486d8-05c1-4a35-b700-7ec054bfc23f", "https://media.crafto.app/home/bee9005e-349e-41ed-ad04-0f8719349f36", "https://media.crafto.app/home/85891dec-07b6-4ef0-81d9-74cc75758bc9", "https://media.crafto.app/home/af654912-883b-4285-8b41-f9e62997e957", "https://media.crafto.app/home/906e42be-dd02-4b22-bd2f-2136ede8d08c", "https://media.crafto.app/home/8b93da43-67ab-46f7-87d6-4293db9f2bd1", "https://media.crafto.app/home/7e563352-9abb-46d7-995f-e412b8bef63c", "https://media.crafto.app/home/f58e8857-4ec3-4b99-9850-915e0a3bf6f6", "https://media.crafto.app/home/f51d80a5-5774-456c-a7b1-899c5bb93420", "https://media.crafto.app/home/90694d6b-1fce-4314-bc96-209005b16c8e", "https://media.crafto.app/home/b7aadbbd-1438-43e9-9dc3-0c2bef6d5557", "https://media.crafto.app/home/84b16408-e8de-4efa-87e1-cd101d517081", "https://media.crafto.app/home/5d800dc7-6b8e-45e5-bc8e-2469a8ce60dd", "https://media.crafto.app/home/7c241fcd-bb66-478a-8188-d99020966ec3", "https://media.crafto.app/home/a5c2f43b-9627-4617-adaa-2fac139f60a6", "https://media.crafto.app/home/b5465913-060e-4dce-b7f4-2fa66bed96d2", "https://media.crafto.app/home/79f0a2e3-0154-49b8-88a6-8b97afad0c18", "https://media.crafto.app/home/92e4e16c-7558-42ec-8a65-cd9612c0ded5", "https://media.crafto.app/home/586398dc-fa9d-4add-95e6-5abdf02da63b", "https://media.crafto.app/home/9a9fe45b-399a-4e39-af66-1c742f9fc74b", "https://media.crafto.app/home/0be34976-f3b5-412c-83f4-2d5698fdf48e", "https://media.crafto.app/home/c72973cf-a8ed-4f06-94b4-bce28b623397", "https://media.crafto.app/diwalimithai/c4b1e5df-f65b-4344-a8aa-c8e0b049c8c5", "https://media.crafto.app/diwalimithai/88a110b4-aff9-453a-83e3-6dd92c5e0bfc", "https://media.crafto.app/diwalimithai/42ea83e5-0b28-4729-9c39-773eb751a6b1", "https://media.crafto.app/diwalimithai/686eacc3-d896-4764-b13e-5db10425bd89", "https://media.crafto.app/diwalimithai/03a69d9f-67db-44b1-8cf4-ed63f6c56c8f", "https://media.crafto.app/diwalimithai/fb3d93c8-a616-44a6-a5a1-d64cae20f12a"}, aVar2));
c0601a2.c("fontsForTextTitle_ " + data2.getFont() + " , data.contentFontSize " + data2.getContentFontSize(), new Object[0]);
return Unit.f69574a;
}
}
}