package com.scb.phone.view.fragment.transferandpay.cardlessatm; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.os.Parcelable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.Spinner; import android.widget.SpinnerAdapter; import android.widget.TextView; import androidx.appcompat.widget.LinearLayoutCompat; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.fragment.app.FragmentActivity; import com.scb.phone.R; import com.scb.phone.view.activity.transferandpay.cardlessatm.CardlessATMSuccessfulRequestActivity; import com.scb.phone.view.custom.common.DefaultButton; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource; import java.util.List; import java.util.Locale; import o.AbstractC14961gcz; import o.C10454eEo; import o.C1168Xb; import o.C1208Ya; import o.C12780fH; import o.C14866gag; import o.C14957gcv; import o.EnumC6470cTu; import o.InterfaceC13391fZD; import o.InterfaceC14890gbN; import o.InterfaceC6640cYr; import o.LkG; import o.XY; import o.XZ; import o.ZI; import o.cSV; import o.gdZ; import o.iIb; import o.mro; import o.pug; import o.qeC; /* loaded from: classes5.dex */ public final class CardlessReviewFragment extends Hilt_CardlessReviewFragment implements InterfaceC6640cYr { public static final RVV c = new RVV(0); @InterfaceC13391fZD public cSV cardlessATMReviewPresenter; private LkG d; private C1208Ya j; public static final /* synthetic */ LkG a(CardlessReviewFragment cardlessReviewFragment) { LkG lkG = cardlessReviewFragment.d; C14957gcv.e(lkG); return lkG; } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { C1208Ya c1208Ya; Parcelable parcelable; C14957gcv.e(view, ""); super.onViewCreated(view, bundle); Bundle arguments = getArguments(); if (arguments != null) { if (Build.VERSION.SDK_INT >= 33) { parcelable = (Parcelable) arguments.getParcelable("com.scb.phone.EXTRA_CARDLESS_REVIEW", C1208Ya.class); } else { Parcelable parcelable2 = arguments.getParcelable("com.scb.phone.EXTRA_CARDLESS_REVIEW"); if (!(parcelable2 instanceof C1208Ya)) { parcelable2 = null; } parcelable = (C1208Ya) parcelable2; } c1208Ya = (C1208Ya) parcelable; } else { c1208Ya = null; } this.j = c1208Ya; cSV csv = this.cardlessATMReviewPresenter; if (csv == null) { C14957gcv.a(""); csv = null; } csv.e((cSV) this); final C1208Ya c1208Ya2 = this.j; Bundle arguments2 = getArguments(); final String string = arguments2 != null ? arguments2.getString("CONDITION") : null; csv.c = c1208Ya2; final String str = c1208Ya2 != null ? c1208Ya2.g : null; ZI.IeS ieS = new ZI.IeS(str, string) { // from class: o.cSZ private String c; private String d; @Override // o.ZI.IeS public final void e(Object obj) { cSV.e(this.d, this.c, (InterfaceC6640cYr) obj); } { this.d = str; this.c = string; } }; if (csv.f != 0) { ieS.e(csv.f); } if (c1208Ya2 != null) { ZI.IeS ieS2 = new ZI.IeS(c1208Ya2) { // from class: o.cSX private C1208Ya b; @Override // o.ZI.IeS public final void e(Object obj) { cSV.c(this.b, (InterfaceC6640cYr) obj); } { this.b = c1208Ya2; } }; if (csv.f != 0) { ieS2.e(csv.f); } } c("cardless_atm_review", new pug("source", Q()), new pug("type", d())); LkG lkG = this.d; C14957gcv.e(lkG); DefaultButton defaultButton = lkG.d; C14957gcv.c(defaultButton, ""); C10454eEo.d(defaultButton, new LWm(this)); } /* loaded from: classes5.dex */ static final class LWm extends AbstractC14961gcz implements InterfaceC14890gbN { private CardlessReviewFragment c; @Override // o.InterfaceC14890gbN public final /* synthetic */ C14866gag invoke() { List list; cSV csv = this.c.cardlessATMReviewPresenter; if (csv == null) { C14957gcv.a(""); csv = null; } CardlessReviewFragment cardlessReviewFragment = this.c; C1208Ya c1208Ya = csv.c; if (c1208Ya != null && (list = c1208Ya.f) != null) { XZ xz = list.get(CardlessReviewFragment.a(cardlessReviewFragment).a.b.getSelectedItemPosition()); C14957gcv.e(xz, ""); ZI.IeS ieS = new ZI.IeS() { // from class: o.cTa @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6640cYr) obj).y(); } }; if (csv.f != 0) { ieS.e(csv.f); } C12780fH b = C12780fH.b(); C1208Ya c1208Ya2 = csv.c; b.a = c1208Ya2 != null ? c1208Ya2.h : null; b.c = xz.e; b.d = xz.a; mro mroVar = csv.b; C14957gcv.c(b, ""); mroVar.c(b); mroVar.d(mroVar.i, new cSV.Sts(csv, b, csv.c)); } return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ LWm(CardlessReviewFragment cardlessReviewFragment) { super(0); this.c = cardlessReviewFragment; } } @Override // o.InterfaceC6640cYr public final void d(C1208Ya c1208Ya) { C14957gcv.e(c1208Ya, ""); LkG lkG = this.d; C14957gcv.e(lkG); CustomTransferAndPaySource customTransferAndPaySource = lkG.c; customTransferAndPaySource.setSourceName(c1208Ya.b); String str = c1208Ya.a; if (str != null) { customTransferAndPaySource.setAccountNumber(str); } String str2 = c1208Ya.e; if (str2 != null) { customTransferAndPaySource.setAvatar(str2, R.drawable.logo_scb_new); } String str3 = c1208Ya.j; if (str3 != null) { customTransferAndPaySource.setAccountBalance(str3); } LkG lkG2 = this.d; C14957gcv.e(lkG2); CustomTransferAndPayItem customTransferAndPayItem = lkG2.e; String string = getString(R.string.cardless_atm_amount); C14957gcv.c((Object) string, ""); Locale locale = Locale.getDefault(); C14957gcv.c(locale, ""); String upperCase = string.toUpperCase(locale); C14957gcv.c((Object) upperCase, ""); customTransferAndPayItem.setText(upperCase); String str4 = c1208Ya.c; if (str4 != null) { customTransferAndPayItem.setValue(str4); } C1168Xb c1168Xb = c1208Ya.d; if (c1168Xb != null) { customTransferAndPayItem.amountInfo.setVisibility(0); customTransferAndPayItem.amountInfo.setValuesAligned(c1168Xb, true); customTransferAndPayItem.mBottomSpace.setVisibility(8); } List list = c1208Ya.i; ArrayAdapter arrayAdapter = list != null ? new ArrayAdapter(requireContext(), R.layout.2131559352, list.toArray(new String[0])) : null; LkG lkG3 = this.d; C14957gcv.e(lkG3); Spinner spinner = lkG3.a.b; spinner.setAdapter((SpinnerAdapter) arrayAdapter); spinner.setOnItemSelectedListener(new HBt(spinner)); } /* loaded from: classes5.dex */ public static final class HBt implements AdapterView.OnItemSelectedListener { private Spinner b; @Override // android.widget.AdapterView.OnItemSelectedListener public final void onNothingSelected(AdapterView adapterView) { } HBt(Spinner spinner) { this.b = spinner; } @Override // android.widget.AdapterView.OnItemSelectedListener public final void onItemSelected(AdapterView adapterView, View view, int i, long j) { if (view instanceof TextView) { ((TextView) view).setTextSize(0, this.b.getResources().getDimensionPixelSize(R.dimen.f16092131165375)); } } } @Override // o.InterfaceC6640cYr public final void c(XY xy) { C14957gcv.e(xy, ""); FragmentActivity activity = getActivity(); if (activity != null) { activity.finish(); } c("cardless_atm_slip", new pug("source", Q()), new pug("type", d())); CardlessATMSuccessfulRequestActivity.HBt hBt = CardlessATMSuccessfulRequestActivity.b; Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); C14957gcv.e(requireContext, ""); Intent intent = new Intent(requireContext, (Class) CardlessATMSuccessfulRequestActivity.class); intent.putExtra("com.scb.phone.EXTRA_CARDLESS_ATM_SUCCESFUL_REQUEST", xy); requireContext.startActivity(intent); } @Override // o.InterfaceC6640cYr public final void e(String str) { C14957gcv.e(str, ""); LkG lkG = this.d; C14957gcv.e(lkG); lkG.h.setText(str); } @Override // o.InterfaceC6640cYr public final void a() { LkG lkG = this.d; C14957gcv.e(lkG); ConstraintLayout constraintLayout = lkG.b; C14957gcv.c(constraintLayout, ""); ConstraintLayout constraintLayout2 = constraintLayout; C14957gcv.e(constraintLayout2, ""); constraintLayout2.setVisibility(8); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroyView() { super.onDestroyView(); this.d = null; } /* loaded from: classes5.dex */ public static final class RVV { private RVV() { } public /* synthetic */ RVV(byte b) { this(); } } private final String d() { C1208Ya c1208Ya = this.j; String str = c1208Ya != null ? c1208Ya.g : null; if (str == null) { str = ""; } return gdZ.a(str, EnumC6470cTu.DEPOSIT.typeCode, true) ? "deposit" : "card"; } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); View inflate = layoutInflater.inflate(R.layout.2131559484, viewGroup, false); int i = R.id.button_continue; DefaultButton defaultButton = (DefaultButton) qeC.e(inflate, R.id.button_continue); if (defaultButton != null) { i = R.id.cardless_amount; CustomTransferAndPayItem customTransferAndPayItem = (CustomTransferAndPayItem) qeC.e(inflate, R.id.cardless_amount); if (customTransferAndPayItem != null) { i = R.id.cardless_source; CustomTransferAndPaySource customTransferAndPaySource = (CustomTransferAndPaySource) qeC.e(inflate, R.id.cardless_source); if (customTransferAndPaySource != null) { i = R.id.cs_layout_cardless_important; ConstraintLayout constraintLayout = (ConstraintLayout) qeC.e(inflate, R.id.cs_layout_cardless_important); if (constraintLayout != null) { i = R.id.custom_spinner; View e = qeC.e(inflate, R.id.custom_spinner); if (e != null) { ConstraintLayout constraintLayout2 = (ConstraintLayout) e; int i2 = R.id.spinner; Spinner spinner = (Spinner) qeC.e(e, R.id.spinner); if (spinner != null) { i2 = R.id.spinner_container; ConstraintLayout constraintLayout3 = (ConstraintLayout) qeC.e(e, R.id.spinner_container); if (constraintLayout3 != null) { i2 = R.id.vw_line; View e2 = qeC.e(e, R.id.vw_line); if (e2 != null) { iIb iib = new iIb(constraintLayout2, constraintLayout2, spinner, constraintLayout3, e2); int i3 = R.id.imageWarning; ImageView imageView = (ImageView) qeC.e(inflate, R.id.imageWarning); if (imageView != null) { i3 = R.id.textview_info_mobile_no; TextView textView = (TextView) qeC.e(inflate, R.id.textview_info_mobile_no); if (textView != null) { i3 = R.id.tv_condition; TextView textView2 = (TextView) qeC.e(inflate, R.id.tv_condition); if (textView2 != null) { i3 = R.id.tv_important; TextView textView3 = (TextView) qeC.e(inflate, R.id.tv_important); if (textView3 != null) { i3 = R.id.verification; TextView textView4 = (TextView) qeC.e(inflate, R.id.verification); if (textView4 != null) { LkG lkG = new LkG((LinearLayoutCompat) inflate, defaultButton, customTransferAndPayItem, customTransferAndPaySource, constraintLayout, iib, imageView, textView, textView2, textView3, textView4); this.d = lkG; C14957gcv.e(lkG); LinearLayoutCompat linearLayoutCompat = lkG.g; C14957gcv.c(linearLayoutCompat, ""); return linearLayoutCompat; } } } } } i = i3; throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i))); } } } throw new NullPointerException("Missing required view with ID: ".concat(e.getResources().getResourceName(i2))); } } } } } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i))); } }