package com.scb.phone.view.fragment.cardmanagement; 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 com.scb.phone.R; import com.scb.phone.view.activity.cardmanagement.TempLimitConfirmationActivity; import com.scb.phone.view.custom.common.DefaultButton; import com.scb.phone.view.fragment.cardmanagement.TempLimitReviewFragment; import o.AbstractC14961gcz; import o.C0455Gy; import o.C10454eEo; import o.C11560ehe; import o.C14866gag; import o.C14957gcv; import o.C16929sVC; import o.C3005apN; import o.GB; import o.GE; import o.GF; import o.Heg; import o.InterfaceC0834Plv; import o.InterfaceC13391fZD; import o.InterfaceC13393fZL; import o.InterfaceC14890gbN; import o.InterfaceC9074dcp; import o.ZI; import o.cXG; import o.fZZ; import o.huo; import o.krX; import o.mXR; import o.qeC; import o.uKr; import o.xZj; /* loaded from: classes5.dex */ public final class TempLimitReviewFragment extends Hilt_TempLimitReviewFragment implements InterfaceC9074dcp.HBt { private huo c; private final InterfaceC13393fZL d; @InterfaceC13391fZD public C3005apN presenter; public TempLimitReviewFragment() { RVV rvv = new RVV(this); C14957gcv.e(rvv, ""); this.d = new fZZ(rvv); } /* loaded from: classes5.dex */ static final class RVV extends AbstractC14961gcz implements InterfaceC14890gbN { private TempLimitReviewFragment a; @Override // o.InterfaceC14890gbN public final /* synthetic */ uKr invoke() { View inflate = this.a.getLayoutInflater().inflate(R.layout.2131559951, (ViewGroup) null, false); int i = R.id.btn_confirm_redemption; DefaultButton defaultButton = (DefaultButton) qeC.e(inflate, R.id.btn_confirm_redemption); if (defaultButton != null) { i = R.id.layout_temp_limit_increase_info; View e = qeC.e(inflate, R.id.layout_temp_limit_increase_info); if (e != null) { mXR c = mXR.c(e); TextView textView = (TextView) qeC.e(inflate, R.id.tv_remark); if (textView != null) { return new uKr((ScrollView) inflate, defaultButton, c, textView); } i = R.id.tv_remark; } } 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) */ RVV(TempLimitReviewFragment tempLimitReviewFragment) { super(0); this.a = tempLimitReviewFragment; } } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); ScrollView scrollView = ((uKr) this.d.e()).e; C14957gcv.c(scrollView, ""); return scrollView; } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { Intent intent; Parcelable parcelable; C14957gcv.e(view, ""); super.onViewCreated(view, bundle); C3005apN c3005apN = this.presenter; if (c3005apN == null) { C14957gcv.a(""); c3005apN = null; } c3005apN.e((C3005apN) this); FragmentActivity activity = getActivity(); if (activity != null && (intent = activity.getIntent()) != null) { final C3005apN c3005apN2 = this.presenter; if (c3005apN2 == null) { C14957gcv.a(""); c3005apN2 = null; } final boolean booleanExtra = intent.getBooleanExtra("com.scb.phone.view.activity.card_management.TempLimitReviewActivity.KEY_TEMP_LIMIT_IS_CDX_FLOW", false); if (Build.VERSION.SDK_INT >= 33) { Bundle extras = intent.getExtras(); parcelable = extras != null ? (Parcelable) extras.getParcelable("com.scb.phone.view.activity.card_management.TempLimitReviewActivity.KEY_TEMP_LIMIT_PRE_APPROVED_DTO", GF.class) : null; } else { Bundle extras2 = intent.getExtras(); Parcelable parcelable2 = extras2 != null ? extras2.getParcelable("com.scb.phone.view.activity.card_management.TempLimitReviewActivity.KEY_TEMP_LIMIT_PRE_APPROVED_DTO") : null; if (!(parcelable2 instanceof GF)) { parcelable2 = null; } parcelable = (GF) parcelable2; } final GF gf = (GF) parcelable; if (Build.VERSION.SDK_INT >= 33) { Bundle extras3 = intent.getExtras(); if (extras3 != null) { r9 = (Parcelable) extras3.getParcelable("com.scb.phone.view.activity.card_management.TempLimitReviewActivity.KEY_TEMP_LIMIT_CDX_PRE_APPROVED", C0455Gy.class); } } else { Bundle extras4 = intent.getExtras(); Parcelable parcelable3 = extras4 != null ? extras4.getParcelable("com.scb.phone.view.activity.card_management.TempLimitReviewActivity.KEY_TEMP_LIMIT_CDX_PRE_APPROVED") : null; r9 = (C0455Gy) (parcelable3 instanceof C0455Gy ? parcelable3 : null); } final C0455Gy c0455Gy = (C0455Gy) r9; c3005apN2.e = booleanExtra; c3005apN2.a = gf; c3005apN2.c = c0455Gy; ZI.IeS ieS = new ZI.IeS(booleanExtra, c0455Gy, gf, c3005apN2) { // from class: o.apM private C0455Gy a; private C3005apN b; private GF c; private boolean e; @Override // o.ZI.IeS public final void e(Object obj) { C3005apN.b(this.e, this.a, this.c, this.b, (InterfaceC9074dcp.HBt) obj); } { this.e = booleanExtra; this.a = c0455Gy; this.c = gf; this.b = c3005apN2; } }; if (c3005apN2.f != 0) { ieS.e(c3005apN2.f); } } DefaultButton defaultButton = ((uKr) this.d.e()).c; C14957gcv.c(defaultButton, ""); C10454eEo.d(defaultButton, new IeS(this)); huo registerForActivityResult = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.eJU private TempLimitReviewFragment d; @Override // o.InterfaceC0834Plv public final void d(Object obj) { TempLimitReviewFragment.b(this.d, (Heg) obj); } { this.d = this; } }); C14957gcv.c(registerForActivityResult, ""); this.c = registerForActivityResult; v("templimit_review"); } /* loaded from: classes5.dex */ static final class IeS extends AbstractC14961gcz implements InterfaceC14890gbN { private TempLimitReviewFragment b; @Override // o.InterfaceC14890gbN public final /* synthetic */ C14866gag invoke() { C3005apN c3005apN = this.b.presenter; if (c3005apN == null) { C14957gcv.a(""); c3005apN = null; } if (c3005apN.f != 0) { c3005apN.f.y(); } if (c3005apN.e) { C0455Gy c0455Gy = c3005apN.c; if (c0455Gy != null) { String str = c0455Gy.b; String str2 = str == null ? "" : str; Double d = c0455Gy.e; int doubleValue = d != null ? (int) d.doubleValue() : 0; Double d2 = c0455Gy.f8189o; int doubleValue2 = d2 != null ? (int) d2.doubleValue() : 0; Boolean bool = c0455Gy.j; krX krx = new krX(str2, doubleValue, doubleValue2, bool != null ? bool.booleanValue() : false, c3005apN.b); if (!C14957gcv.b(c0455Gy.d, Boolean.TRUE)) { krx.a = c0455Gy.c; krx.d = c0455Gy.g; } c3005apN.d.a(krx); xZj xzj = c3005apN.d; xzj.d(xzj.i, new C3005apN.Sts(c3005apN)); } } else { GF gf = c3005apN.a; if (gf != null) { c3005apN.d.b(new C16929sVC(gf.g, gf.c, gf.e, gf.i, gf.b)); xZj xzj2 = c3005apN.d; xzj2.d(xzj2.i, new C3005apN.LWm(c3005apN)); } } return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ IeS(TempLimitReviewFragment tempLimitReviewFragment) { super(0); this.b = tempLimitReviewFragment; } } @Override // o.InterfaceC9074dcp.HBt public final void c(GF gf) { C14957gcv.e(gf, ""); mXR mxr = ((uKr) this.d.e()).b; mxr.b.setText(gf.h); mxr.d.setText(gf.f); TextView textView = mxr.c; if (this.presenter == null) { C14957gcv.a(""); } textView.setText(C3005apN.d(Double.valueOf(gf.c))); TextView textView2 = mxr.j; if (this.presenter == null) { C14957gcv.a(""); } textView2.setText(C3005apN.d(Double.valueOf(gf.n))); TextView textView3 = mxr.a; String VL_ = cXG.VL_(getResources(), "dd MMM yyyy", cXG.d("yyyy-MM-dd", gf.a)); C14957gcv.c((Object) VL_, ""); textView3.setText(VL_); TextView textView4 = mxr.e; String VL_2 = cXG.VL_(getResources(), "dd MMM yyyy", cXG.d("yyyy-MM-dd", gf.e)); C14957gcv.c((Object) VL_2, ""); textView4.setText(VL_2); } @Override // o.InterfaceC9074dcp.HBt public final void c(C0455Gy c0455Gy) { C14957gcv.e(c0455Gy, ""); mXR mxr = ((uKr) this.d.e()).b; mxr.b.setText(c0455Gy.h); mxr.d.setText(c0455Gy.i); TextView textView = mxr.c; if (this.presenter == null) { C14957gcv.a(""); } textView.setText(C3005apN.d(c0455Gy.e)); TextView textView2 = mxr.j; if (this.presenter == null) { C14957gcv.a(""); } textView2.setText(C3005apN.d(c0455Gy.f8189o)); mxr.a.setText(c0455Gy.a); mxr.e.setText(c0455Gy.k); } @Override // o.InterfaceC9074dcp.HBt public final void a(String str) { C14957gcv.e(str, ""); ((uKr) this.d.e()).a.setText(str); } @Override // o.InterfaceC9074dcp.HBt public final void c(GE ge) { C14957gcv.e(ge, ""); huo huoVar = this.c; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } huoVar.d(TempLimitConfirmationActivity.Zp_(getContext(), ge), null); } @Override // o.InterfaceC9074dcp.HBt public final void b(C0455Gy c0455Gy, GB gb) { C14957gcv.e(c0455Gy, ""); C14957gcv.e(gb, ""); huo huoVar = this.c; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } huoVar.d(TempLimitConfirmationActivity.Zo_(getContext(), c0455Gy, gb), null); } @Override // o.InterfaceC9074dcp.HBt public final void d() { FragmentActivity activity = getActivity(); if (activity != null) { activity.setResult(3); } } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroy() { huo huoVar = this.c; if (huoVar == null) { C14957gcv.a(""); huoVar = null; } huoVar.e(); super.onDestroy(); } /* loaded from: classes5.dex */ public static final class HBt { private HBt() { } public /* synthetic */ HBt(byte b) { this(); } } public static /* synthetic */ void b(TempLimitReviewFragment tempLimitReviewFragment, Heg heg) { FragmentActivity activity; C14957gcv.e(tempLimitReviewFragment, ""); if (heg.e != 104 || (activity = tempLimitReviewFragment.getActivity()) == null) { return; } activity.setResult(104); activity.finish(); } static { new HBt((byte) 0); } }