package com.scb.phone.view.fragment.remittance; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.os.Parcelable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import androidx.fragment.app.FragmentActivity; import com.scb.phone.R; import com.scb.phone.view.activity.bot.BotContactScbActivity; import com.scb.phone.view.activity.facialrecognition.BotCommonFacialRecognitionLandingActivity; import com.scb.phone.view.activity.remittance.RemittanceInputActivity; import com.scb.phone.view.activity.remittance.RemittanceOtpActivity; import com.scb.phone.view.activity.remittance.RemittanceSuccessActivity; import com.scb.phone.view.custom.common.DefaultButton; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayTarget; import com.scb.phone.view.fragment.remittance.RemittanceReviewFragment; import o.C1099Vp; import o.C1114Vy; import o.C11560ehe; import o.C14957gcv; import o.C3172asW; import o.C5934cDn; import o.Heg; import o.IAY; import o.InterfaceC0834Plv; import o.InterfaceC12880fJx; import o.InterfaceC13391fZD; import o.InterfaceC9624dnK; import o.MC; import o.YC; import o.YHT; import o.huo; import o.qeC; /* loaded from: classes5.dex */ public final class RemittanceReviewFragment extends Hilt_RemittanceReviewFragment implements InterfaceC9624dnK { public static final IeS d = new IeS(0); private IAY c; private huo f; private InterfaceC12880fJx g; private huo i; private C1114Vy j; @InterfaceC13391fZD public C5934cDn presenter; /* loaded from: classes5.dex */ public static final class IeS { private IeS() { } public /* synthetic */ IeS(byte b) { this(); } } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { Parcelable parcelable; String str; C14957gcv.e(view, ""); super.onViewCreated(view, bundle); C5934cDn c5934cDn = this.presenter; if (c5934cDn == null) { C14957gcv.a(""); c5934cDn = null; } c5934cDn.e((C5934cDn) this); Bundle arguments = getArguments(); if (arguments != null) { if (Build.VERSION.SDK_INT >= 33) { parcelable = (Parcelable) arguments.getParcelable("EXTRA_REVIEW_REMITTANCE_DISPLAY", C1114Vy.class); } else { Parcelable parcelable2 = arguments.getParcelable("EXTRA_REVIEW_REMITTANCE_DISPLAY"); parcelable = (C1114Vy) (parcelable2 instanceof C1114Vy ? parcelable2 : null); } C1114Vy c1114Vy = (C1114Vy) parcelable; this.j = c1114Vy; if (c1114Vy != null) { C1099Vp c1099Vp = c1114Vy.b; CustomTransferAndPaySource j = j(); CustomTransferAndPaySource customTransferAndPaySource = j; C14957gcv.e(customTransferAndPaySource, ""); customTransferAndPaySource.setVisibility(0); j.setSourceName(c1099Vp.a); if (c1099Vp.e.length() > 0) { str = c1099Vp.e; } else { str = c1099Vp.b; } j.setAccountNumber(str); String str2 = c1099Vp.c; if (str2 == null) { str2 = ""; } j.setAvatar(str2); CustomTransferAndPayTarget g = g(); CustomTransferAndPayTarget customTransferAndPayTarget = g; C14957gcv.e(customTransferAndPayTarget, ""); customTransferAndPayTarget.setVisibility(0); g.setTargetName(c1114Vy.d.a); g.setReferenceNumbers(c1114Vy.d.c); g.setReferenceNo1(c1114Vy.d.e); String str3 = c1114Vy.d.d; if (str3 == null) { str3 = ""; } g.setAvatar(str3, R.drawable.bankicon_remittance); String str4 = c1114Vy.j; if (str4 != null && !TextUtils.isEmpty(str4)) { g.setFavoriteName(str4); } YC yc = c1114Vy.y; if (yc != null) { IAY iay = this.c; C14957gcv.e(iay); LinearLayout linearLayout = iay.a; C14957gcv.c(linearLayout, ""); LinearLayout linearLayout2 = linearLayout; C14957gcv.e(linearLayout2, ""); linearLayout2.setVisibility(0); iay.f.setText(yc.e); iay.g.setText(yc.c); } e(c1114Vy); IAY iay2 = this.c; C14957gcv.e(iay2); iay2.d.setOnClickListener(new View.OnClickListener(this) { // from class: o.fyD private RemittanceReviewFragment c; @Override // android.view.View.OnClickListener public final void onClick(View view2) { RemittanceReviewFragment.e(this.c); } { this.c = this; } }); } } IAY iay3 = this.c; C14957gcv.e(iay3); iay3.i.setText(C3172asW.qI_(getString(R.string.remittance_review_disclaimer_message), 0)); iay3.j.setText(C3172asW.qI_(getString(R.string.remittance_review_disclaimer_message_more), 0)); iay3.h.setText(C3172asW.qI_(getString(R.string.remittance_review_disclaimer_message_rejected), 0)); huo registerForActivityResult = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.fyH private RemittanceReviewFragment e; @Override // o.InterfaceC0834Plv public final void d(Object obj) { RemittanceReviewFragment.e(this.e, (Heg) obj); } { this.e = this; } }); C14957gcv.c(registerForActivityResult, ""); this.f = registerForActivityResult; huo registerForActivityResult2 = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.fyI private RemittanceReviewFragment d; @Override // o.InterfaceC0834Plv public final void d(Object obj) { RemittanceReviewFragment.a(this.d, (Heg) obj); } { this.d = this; } }); C14957gcv.c(registerForActivityResult2, ""); this.i = registerForActivityResult2; } /* JADX WARN: Multi-variable type inference failed */ @Override // com.scb.phone.view.fragment.remittance.Hilt_RemittanceReviewFragment, com.scb.phone.view.fragment.remittance.Hilt_BaseRemittanceDetailsFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public final void onAttach(Context context) { C14957gcv.e(context, ""); super.onAttach(context); if (context instanceof InterfaceC12880fJx) { this.g = (InterfaceC12880fJx) context; } } @Override // o.InterfaceC9624dnK public final void a(C1114Vy c1114Vy) { C14957gcv.e(c1114Vy, ""); FragmentActivity activity = getActivity(); if (activity != null) { RemittanceSuccessActivity.Sts sts = RemittanceSuccessActivity.f7897o; startActivity(RemittanceSuccessActivity.Sts.alB_(activity, c1114Vy)); } } @Override // o.InterfaceC9624dnK public final void a() { FragmentActivity activity = getActivity(); if (activity != null) { RemittanceOtpActivity.RVV rvv = RemittanceOtpActivity.b; FragmentActivity fragmentActivity = activity; C1114Vy c1114Vy = this.j; C14957gcv.e(fragmentActivity, ""); Intent intent = new Intent(fragmentActivity, (Class) RemittanceOtpActivity.class); intent.putExtra("EXTRA_REVIEW_DISPLAY", c1114Vy); startActivity(intent); activity.finish(); } } @Override // o.InterfaceC9624dnK public final void e() { FragmentActivity activity = getActivity(); if (activity != null) { RemittanceInputActivity.IeS ieS = RemittanceInputActivity.m; FragmentActivity fragmentActivity = activity; C14957gcv.e(fragmentActivity, ""); Intent intent = new Intent(fragmentActivity, (Class) RemittanceInputActivity.class); intent.setFlags(603979776); startActivity(intent); } } @Override // o.InterfaceC9624dnK public final void d() { FragmentActivity activity = getActivity(); if (activity != null) { Intent intent = new Intent(); intent.putExtra("EXTRA_IS_FROM_REVIEW", true); activity.setResult(-1, intent); activity.finish(); } } @Override // o.InterfaceC9624dnK public final void b(String str, String str2) { C14957gcv.e(str, ""); C14957gcv.e(str2, ""); Context context = getContext(); if (context != null) { huo huoVar = this.f; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } BotContactScbActivity.IeS ieS = BotContactScbActivity.b; huoVar.d(BotContactScbActivity.IeS.YE_(context, str, str2), null); } } @Override // o.InterfaceC9624dnK public final void a(MC mc) { C14957gcv.e(mc, ""); Context context = getContext(); if (context != null) { huo huoVar = this.i; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } BotCommonFacialRecognitionLandingActivity.LWm lWm = BotCommonFacialRecognitionLandingActivity.b; huoVar.d(BotCommonFacialRecognitionLandingActivity.LWm.afq_(context, mc), null); } } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroyView() { C5934cDn c5934cDn = this.presenter; if (c5934cDn == null) { C14957gcv.a(""); c5934cDn = null; } c5934cDn.w_(); huo huoVar = this.f; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } huoVar.e(); huo huoVar2 = this.i; if (huoVar2 == null) { C14957gcv.a(""); huoVar2 = null; } huoVar2.e(); this.c = null; super.onDestroyView(); } public static /* synthetic */ void a(RemittanceReviewFragment remittanceReviewFragment, Heg heg) { FragmentActivity activity; C14957gcv.e(remittanceReviewFragment, ""); C14957gcv.e(heg, ""); if (heg.e == -1) { InterfaceC12880fJx interfaceC12880fJx = remittanceReviewFragment.g; C5934cDn c5934cDn = null; if (interfaceC12880fJx == null) { C14957gcv.a(""); interfaceC12880fJx = null; } interfaceC12880fJx.j(); remittanceReviewFragment.y(); Intent intent = heg.b; boolean booleanExtra = intent != null ? intent.getBooleanExtra("com.scb.phone.EXTRA_IS_FACE_VALIDATE", false) : false; C1114Vy c1114Vy = remittanceReviewFragment.j; if (c1114Vy != null) { C5934cDn c5934cDn2 = remittanceReviewFragment.presenter; if (c5934cDn2 != null) { c5934cDn = c5934cDn2; } else { C14957gcv.a(""); } c5934cDn.b(c1114Vy, booleanExtra); return; } return; } if (heg.e != 0 || (activity = remittanceReviewFragment.getActivity()) == null) { return; } RemittanceInputActivity.IeS ieS = RemittanceInputActivity.m; FragmentActivity fragmentActivity = activity; C14957gcv.e(fragmentActivity, ""); Intent intent2 = new Intent(fragmentActivity, (Class) RemittanceInputActivity.class); intent2.setFlags(603979776); remittanceReviewFragment.startActivity(intent2); } public static /* synthetic */ void e(RemittanceReviewFragment remittanceReviewFragment, Heg heg) { C14957gcv.e(remittanceReviewFragment, ""); C14957gcv.e(heg, ""); if (heg.e == 0) { FragmentActivity activity = remittanceReviewFragment.getActivity(); if (activity != null) { RemittanceInputActivity.IeS ieS = RemittanceInputActivity.m; FragmentActivity fragmentActivity = activity; C14957gcv.e(fragmentActivity, ""); Intent intent = new Intent(fragmentActivity, (Class) RemittanceInputActivity.class); intent.setFlags(603979776); remittanceReviewFragment.startActivity(intent); return; } return; } FragmentActivity activity2 = remittanceReviewFragment.getActivity(); if (activity2 != null) { activity2.finish(); } } public static /* synthetic */ void e(RemittanceReviewFragment remittanceReviewFragment) { C14957gcv.e(remittanceReviewFragment, ""); C1114Vy c1114Vy = remittanceReviewFragment.j; if (c1114Vy != null) { C5934cDn c5934cDn = remittanceReviewFragment.presenter; if (c5934cDn == null) { C14957gcv.a(""); c5934cDn = null; } c5934cDn.b(c1114Vy, false); } } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); View inflate = layoutInflater.inflate(R.layout.2131559966, viewGroup, false); int i = R.id.btn_confirm_review_remittance; DefaultButton defaultButton = (DefaultButton) qeC.e(inflate, R.id.btn_confirm_review_remittance); if (defaultButton != null) { i = R.id.full_divider; View e = qeC.e(inflate, R.id.full_divider); if (e != null) { i = R.id.iv_warning_message_icon; ImageView imageView = (ImageView) qeC.e(inflate, R.id.iv_warning_message_icon); if (imageView != null) { i = R.id.layout_common_remittance_review; View e2 = qeC.e(inflate, R.id.layout_common_remittance_review); if (e2 != null) { YHT c = YHT.c(e2); i = R.id.ll_warning_message_layout; LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, R.id.ll_warning_message_layout); if (linearLayout != null) { i = R.id.remittance_logo; ImageView imageView2 = (ImageView) qeC.e(inflate, R.id.remittance_logo); if (imageView2 != null) { i = R.id.tv_remittance_review_remark_1; TextView textView = (TextView) qeC.e(inflate, R.id.tv_remittance_review_remark_1); if (textView != null) { i = R.id.tv_remittance_review_remark_2; TextView textView2 = (TextView) qeC.e(inflate, R.id.tv_remittance_review_remark_2); if (textView2 != null) { i = R.id.tv_remittance_review_remark_3; TextView textView3 = (TextView) qeC.e(inflate, R.id.tv_remittance_review_remark_3); if (textView3 != null) { i = R.id.tv_warning_message; TextView textView4 = (TextView) qeC.e(inflate, R.id.tv_warning_message); if (textView4 != null) { i = R.id.tv_warning_message_header; TextView textView5 = (TextView) qeC.e(inflate, R.id.tv_warning_message_header); if (textView5 != null) { IAY iay = new IAY((ScrollView) inflate, defaultButton, e, imageView, c, linearLayout, imageView2, textView, textView2, textView3, textView4, textView5); this.c = iay; C14957gcv.e(iay); YHT yht = iay.e; C14957gcv.c(yht, ""); IAY iay2 = this.c; C14957gcv.e(iay2); ImageView imageView3 = iay2.c; C14957gcv.c(imageView3, ""); axj_(yht, imageView3); IAY iay3 = this.c; C14957gcv.e(iay3); ScrollView scrollView = iay3.b; C14957gcv.c(scrollView, ""); return scrollView; } } } } } } } } } } } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i))); } }