package com.scb.phone.view.fragment.easycash; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import butterknife.ButterKnife; import butterknife.OnClick; import com.scb.phone.R; import com.scb.phone.view.activity.BaseActivity; import com.scb.phone.view.activity.easycash.EasycashCreditPowerInputActivity; import com.scb.phone.view.activity.easycash.EasycashSuccessActivity; import com.scb.phone.view.fragment.BaseFragment; import java.util.Locale; import o.C0618Ku; import o.FCh; import o.InterfaceC13391fZD; import o.InterfaceC1903aRj; import o.InterfaceC6621cYR; import o.JX; import o.Lld; import o.aSA; import o.aSF; /* loaded from: classes5.dex */ public class EasycashReviewFragment extends Hilt_EasycashReviewFragment implements InterfaceC6621cYR.RNg { private InterfaceC1903aRj c; private boolean d; @InterfaceC13391fZD public aSA presenter; @InterfaceC13391fZD public Lld tracker; public static EasycashReviewFragment e(C0618Ku c0618Ku) { Bundle bundle = new Bundle(); bundle.putParcelable("com.scb.phone.EXTRA_DISPLAY", c0618Ku); EasycashReviewFragment easycashReviewFragment = new EasycashReviewFragment(); easycashReviewFragment.setArguments(bundle); return easycashReviewFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559612, viewGroup, false); ((BaseFragment) this).a = ButterKnife.c(this, inflate); this.presenter.e((aSA) this); if (getArguments() != null && getArguments().getParcelable("com.scb.phone.EXTRA_DISPLAY") != null) { this.presenter.e((C0618Ku) getArguments().getParcelable("com.scb.phone.EXTRA_DISPLAY")); } this.btnSubmit.setText(getString(R.string.easycash_review_submit_button)); return inflate; } /* JADX WARN: Multi-variable type inference failed */ @Override // com.scb.phone.view.fragment.easycash.Hilt_EasycashReviewFragment, com.scb.phone.view.fragment.etb.BreadcrumbFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public void onAttach(Context context) { super.onAttach(context); if (context instanceof InterfaceC1903aRj) { this.c = (InterfaceC1903aRj) context; } } @OnClick public void onConfirmButtonClicked() { InterfaceC1903aRj interfaceC1903aRj; if (this.d || (interfaceC1903aRj = this.c) == null) { return; } this.d = true; this.tracker.j(interfaceC1903aRj.j()); String h = this.c.h(); h.hashCode(); if (h.equals("HOME")) { Lld lld = this.tracker; Lld.a(new Object[]{lld, this.c.d().r}, -758484914, 758484920, System.identityHashCode(lld)); this.tracker.C(String.valueOf(this.c.d().d)); this.tracker.i(String.format(Locale.getDefault(), "%.2f", Double.valueOf(this.c.d().c))); } else if (h.equals("PURPOSEFUL_LOAN")) { Lld lld2 = this.tracker; Lld.a(new Object[]{lld2, this.c.d().r}, -758484914, 758484920, System.identityHashCode(lld2)); } Lld lld3 = this.tracker; if (getActivity() != null) { lld3.c(((BaseActivity) getActivity()).scbAnalytics, "apply_loan_review"); } aSA asa = this.presenter; String h2 = this.c.h(); String j = this.c.j(); byte b = 0; if (!h2.equals("HOME")) { if (h2.equals("PURPOSEFUL") && j.equals("REFERRAL")) { if (asa.f != 0) { asa.f.y(); } asa.b.d(asa.c()); FCh fCh = asa.b; fCh.d(fCh.i, new aSA.HBt(asa, b)); return; } return; } if (asa.f != 0) { asa.f.y(); } asa.b.e(asa.c()); FCh fCh2 = asa.b; fCh2.d(fCh2.i, new aSA.HBt(asa, b)); } @Override // o.InterfaceC6621cYR.RNg public final void d(C0618Ku c0618Ku, JX jx) { EasycashSuccessActivity.c(getContext(), c0618Ku.f, this.c.h(), this.c.k(), jx.g, jx.j, jx.i, jx.h, c0618Ku.a); } @Override // com.scb.phone.view.fragment.easycash.EasycashSuccessDialogFragment.HBt public final void j() { InterfaceC1903aRj interfaceC1903aRj = this.c; if (interfaceC1903aRj != null) { this.tracker.j(interfaceC1903aRj.j()); Lld lld = this.tracker; if (getActivity() != null) { lld.c(((BaseActivity) getActivity()).scbAnalytics, "apply_loan_result"); } } aSA asa = this.presenter; aSF asf = new aSF(); if (asa.f != 0) { asf.e(asa.f); } } @Override // o.InterfaceC6621cYR.RNg public final void d() { startActivity(EasycashCreditPowerInputActivity.aep_(getContext())); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroyView() { this.tracker = null; this.presenter.w_(); super.onDestroyView(); } @Override // androidx.fragment.app.Fragment public void onResume() { super.onResume(); this.d = false; } @Override // o.InterfaceC6621cYR.RNg public final InterfaceC1903aRj a() { return this.c; } }