package com.scb.phone.view.fragment.cardmanagement.deejungtransfer; 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.ScrollView; import android.widget.TextView; import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentContainerView; import com.scb.phone.R; import com.scb.phone.view.activity.cardmanagement.deejungtransfer.DeejungTermsAndConditionsActivity; import com.scb.phone.view.activity.cardmanagement.deejungtransfer.DeejungTransferMinFullOtpActivity; import com.scb.phone.view.custom.cardmanagement.TermsAndConditionsView; import com.scb.phone.view.fragment.BaseFragment; import com.scb.phone.view.fragment.cardmanagement.deejungtransfer.DeejungTransferMinFullReviewFragment; import o.AbstractC14961gcz; import o.C11146eZo; import o.C11560ehe; import o.C14957gcv; import o.C3066aqW; import o.GP; import o.Heg; import o.InterfaceC0834Plv; import o.InterfaceC10303eAL; import o.InterfaceC13391fZD; import o.InterfaceC13393fZL; import o.InterfaceC14890gbN; import o.InterfaceC9033dcA; import o.NXe; import o.ZI; import o.eAO; import o.fZZ; import o.huo; import o.qeC; /* loaded from: classes5.dex */ public final class DeejungTransferMinFullReviewFragment extends Hilt_DeejungTransferMinFullReviewFragment implements InterfaceC9033dcA.LWm, InterfaceC10303eAL, eAO { private GP c; private final InterfaceC13393fZL d; private huo h; @InterfaceC13391fZD public C3066aqW presenter; public DeejungTransferMinFullReviewFragment() { LWm lWm = new LWm(this); C14957gcv.e(lWm, ""); this.d = new fZZ(lWm); } /* loaded from: classes5.dex */ static final class LWm extends AbstractC14961gcz implements InterfaceC14890gbN { private DeejungTransferMinFullReviewFragment b; @Override // o.InterfaceC14890gbN public final /* synthetic */ NXe invoke() { View inflate = this.b.getLayoutInflater().inflate(R.layout.2131559965, (ViewGroup) null, false); int i = R.id.fragment_container; FragmentContainerView fragmentContainerView = (FragmentContainerView) qeC.e(inflate, R.id.fragment_container); if (fragmentContainerView != null) { i = R.id.layout_review_page_bottom; View e = qeC.e(inflate, R.id.layout_review_page_bottom); if (e != null) { C11146eZo a = C11146eZo.a(e); TextView textView = (TextView) qeC.e(inflate, R.id.min_max_transfer_declaration); if (textView != null) { return new NXe((ScrollView) inflate, fragmentContainerView, a, textView); } i = R.id.min_max_transfer_declaration; } } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i))); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ LWm(DeejungTransferMinFullReviewFragment deejungTransferMinFullReviewFragment) { super(0); this.b = deejungTransferMinFullReviewFragment; } } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); ScrollView scrollView = ((NXe) this.d.e()).d; C14957gcv.c(scrollView, ""); return scrollView; } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { GP gp; Intent intent; Parcelable parcelable; C14957gcv.e(view, ""); super.onViewCreated(view, bundle); C3066aqW c3066aqW = this.presenter; final C3066aqW c3066aqW2 = null; if (c3066aqW == null) { C14957gcv.a(""); c3066aqW = null; } c3066aqW.e((C3066aqW) this); ((NXe) this.d.e()).a.e.setOnClickListener(new View.OnClickListener(this) { // from class: o.eKx private DeejungTransferMinFullReviewFragment b; @Override // android.view.View.OnClickListener public final void onClick(View view2) { DeejungTransferMinFullReviewFragment.c(this.b); } { this.b = this; } }); FragmentActivity activity = getActivity(); if (activity == null || (intent = activity.getIntent()) == null) { gp = null; } else { if (Build.VERSION.SDK_INT >= 33) { Bundle extras = intent.getExtras(); parcelable = extras != null ? (Parcelable) extras.getParcelable("com.scb.phone.view.activity.card_management.DeejungTransferMinFullSummaryFragment.KEY_TRANSFER_INSTALLMENT_SUMMARY_DISPLAY_MODEL", GP.class) : null; } else { Bundle extras2 = intent.getExtras(); Parcelable parcelable2 = extras2 != null ? extras2.getParcelable("com.scb.phone.view.activity.card_management.DeejungTransferMinFullSummaryFragment.KEY_TRANSFER_INSTALLMENT_SUMMARY_DISPLAY_MODEL") : null; if (!(parcelable2 instanceof GP)) { parcelable2 = null; } parcelable = (GP) parcelable2; } gp = (GP) parcelable; } this.c = gp; C11146eZo c11146eZo = ((NXe) this.d.e()).a; c11146eZo.e.setEnabled(false); TermsAndConditionsView termsAndConditionsView = c11146eZo.a; termsAndConditionsView.setTermsAndConditionsListener(this); termsAndConditionsView.setTermsCheckboxListener(this); huo registerForActivityResult = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.eKs private DeejungTransferMinFullReviewFragment a; @Override // o.InterfaceC0834Plv public final void d(Object obj) { DeejungTransferMinFullReviewFragment.d(this.a, (Heg) obj); } { this.a = this; } }); C14957gcv.c(registerForActivityResult, ""); this.h = registerForActivityResult; C3066aqW c3066aqW3 = this.presenter; if (c3066aqW3 != null) { c3066aqW2 = c3066aqW3; } else { C14957gcv.a(""); } final GP gp2 = this.c; ZI.IeS ieS = new ZI.IeS(c3066aqW2, gp2) { // from class: o.aqT private GP a; private C3066aqW c; @Override // o.ZI.IeS public final void e(Object obj) { C3066aqW.b(this.c, this.a, (InterfaceC9033dcA.LWm) obj); } { this.c = c3066aqW2; this.a = gp2; } }; if (c3066aqW2.f != 0) { ieS.e(c3066aqW2.f); } } @Override // o.InterfaceC10303eAL public final void j() { FragmentActivity activity; BaseFragment.HBt hBt = new BaseFragment.HBt(this) { // from class: o.eKy private DeejungTransferMinFullReviewFragment e; @Override // com.scb.phone.view.fragment.BaseFragment.HBt public final void c(Context context) { DeejungTransferMinFullReviewFragment.c(this.e, context); } { this.e = this; } }; if (!isAdded() || (activity = getActivity()) == null) { return; } hBt.c(activity); } @Override // o.eAO public final void c(boolean z) { ((NXe) this.d.e()).a.e.setEnabled(z); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroy() { huo huoVar = this.h; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } huoVar.e(); super.onDestroy(); } @Override // o.InterfaceC9033dcA.LWm public final void e(String str) { C14957gcv.e(str, ""); TextView textView = ((NXe) this.d.e()).e; C14957gcv.c(textView, ""); TextView textView2 = textView; C14957gcv.e(textView2, ""); textView2.setVisibility(0); textView.setText(str); } @Override // o.InterfaceC9033dcA.LWm public final void a() { TextView textView = ((NXe) this.d.e()).e; C14957gcv.c(textView, ""); TextView textView2 = textView; C14957gcv.e(textView2, ""); textView2.setVisibility(8); } public static /* synthetic */ void d(DeejungTransferMinFullReviewFragment deejungTransferMinFullReviewFragment, Heg heg) { FragmentActivity activity; C14957gcv.e(deejungTransferMinFullReviewFragment, ""); if (-1 != heg.e || (activity = deejungTransferMinFullReviewFragment.getActivity()) == null) { return; } activity.finish(); } public static /* synthetic */ void c(DeejungTransferMinFullReviewFragment deejungTransferMinFullReviewFragment) { C14957gcv.e(deejungTransferMinFullReviewFragment, ""); DeejungTransferMinFullOtpActivity.IeS ieS = DeejungTransferMinFullOtpActivity.b; Intent putExtra = new Intent(deejungTransferMinFullReviewFragment.getContext(), (Class) DeejungTransferMinFullOtpActivity.class).putExtra("com.scb.phone.view.activity.card_management.DeejungTransferMinFullSummaryFragment.KEY_TRANSFER_INSTALLMENT_SUMMARY_DISPLAY_MODEL", deejungTransferMinFullReviewFragment.c); C14957gcv.c(putExtra, ""); huo huoVar = deejungTransferMinFullReviewFragment.h; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } huoVar.d(putExtra, null); } public static /* synthetic */ void c(DeejungTransferMinFullReviewFragment deejungTransferMinFullReviewFragment, Context context) { C14957gcv.e(deejungTransferMinFullReviewFragment, ""); Intent intent = null; if (context != null) { DeejungTermsAndConditionsActivity.RVV rvv = DeejungTermsAndConditionsActivity.b; GP gp = deejungTransferMinFullReviewFragment.c; String str = gp != null ? gp.i : null; C14957gcv.e(context, ""); Intent intent2 = new Intent(context, (Class) DeejungTermsAndConditionsActivity.class); intent2.putExtra("EXTRA_DEEJUNG_TERMS_AND_CONDITIONS_URL", str); intent = intent2; } deejungTransferMinFullReviewFragment.startActivity(intent); } }