what-the-bank/sources/com/scb/phone/view/fragment/easycash/creditpower/EasycashCreditPowerSummaryF...

380 lines
14 KiB
Java

package com.scb.phone.view.fragment.easycash.creditpower;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.easycash.EasycashLandingActivity;
import com.scb.phone.view.activity.easycash.EasycashReferralSendProductActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashCommercialLoanIntroductionActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashCreditCardIntroductionActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashMCMCIntroductionActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashMortgageIntroductionActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashPurposefulLoanIntroductionActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashSpeedyCashIntroductionActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashSpeedyLoanIntroductionActivity;
import com.scb.phone.view.activity.easycash.introduction.EasycashSpeedyLoanTopupIntroductionActivity;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.fragment.easycash.creditpower.EasycashCreditPowerSummaryFragment;
import java.util.ArrayList;
import java.util.List;
import o.AbstractC14961gcz;
import o.C0593Kf;
import o.C0652Lk;
import o.C0657Lo;
import o.C12174etI;
import o.C14957gcv;
import o.C1986aUD;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC6621cYR;
import o.JM;
import o.LW;
import o.Lld;
import o.eCG;
import o.fZZ;
/* loaded from: classes5.dex */
public final class EasycashCreditPowerSummaryFragment extends Hilt_EasycashCreditPowerSummaryFragment implements InterfaceC6621cYR.mxa, C12174etI.Sts {
public static final Sts d = new Sts(0);
@BindView
public Button btExit;
public final InterfaceC13393fZL c;
private C12174etI i;
@InterfaceC13391fZD
public C1986aUD presenter;
@BindView
public RecyclerView rvLoans;
@InterfaceC13391fZD
public Lld tracker;
public EasycashCreditPowerSummaryFragment() {
RVV rvv = new RVV(this);
C14957gcv.e(rvv, "");
this.c = new fZZ(rvv);
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
/* loaded from: classes5.dex */
public static final class RVV extends AbstractC14961gcz implements InterfaceC14890gbN<CustomDialog> {
private EasycashCreditPowerSummaryFragment b;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ CustomDialog invoke() {
CustomDialog d = CustomDialog.b(this.b.getContext()).c(R.string.return_to_apply_loan_dialog_title).d(R.string.return_to_apply_loan_dialog_description);
final EasycashCreditPowerSummaryFragment easycashCreditPowerSummaryFragment = this.b;
return (CustomDialog) CustomDialog.e(new Object[]{d.aoT_(R.string.confirm, new DialogInterface.OnClickListener(easycashCreditPowerSummaryFragment) { // from class: o.eUM
private EasycashCreditPowerSummaryFragment e;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
EasycashCreditPowerSummaryFragment.RVV.a(this.e);
}
{
this.e = easycashCreditPowerSummaryFragment;
}
}), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.eUJ
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
}});
}
public static /* synthetic */ void a(EasycashCreditPowerSummaryFragment easycashCreditPowerSummaryFragment) {
C14957gcv.e(easycashCreditPowerSummaryFragment, "");
C1986aUD c1986aUD = easycashCreditPowerSummaryFragment.presenter;
if (c1986aUD == null) {
C14957gcv.a("");
c1986aUD = null;
}
c1986aUD.d();
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
RVV(EasycashCreditPowerSummaryFragment easycashCreditPowerSummaryFragment) {
super(0);
this.b = easycashCreditPowerSummaryFragment;
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559592, viewGroup, false);
ButterKnife.c(this, inflate);
C1986aUD c1986aUD = this.presenter;
if (c1986aUD == null) {
C14957gcv.a("");
c1986aUD = null;
}
c1986aUD.e((C1986aUD) this);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
ArrayList parcelableArrayList;
String str = "";
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
Button button = this.btExit;
C1986aUD c1986aUD = null;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setOnClickListener(new View.OnClickListener(this) { // from class: o.eUL
private EasycashCreditPowerSummaryFragment d;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
EasycashCreditPowerSummaryFragment.b(this.d);
}
{
this.d = this;
}
});
Bundle arguments = getArguments();
if (arguments == null || !arguments.containsKey("tile_displays") || !arguments.containsKey("ncb_accepted_flag") || (parcelableArrayList = arguments.getParcelableArrayList("tile_displays")) == null) {
return;
}
C1986aUD c1986aUD2 = this.presenter;
if (c1986aUD2 != null) {
c1986aUD = c1986aUD2;
} else {
C14957gcv.a("");
}
C14957gcv.c(parcelableArrayList, "");
ArrayList arrayList = parcelableArrayList;
C14957gcv.e("ncb_accepted_flag", "");
if (arguments != null) {
String string = arguments.getString("ncb_accepted_flag", "");
C14957gcv.c((Object) string, "");
str = string;
}
c1986aUD.b(arrayList, str);
}
@Override // o.C12174etI.Sts
public final void c(int i) {
C1986aUD c1986aUD = this.presenter;
if (c1986aUD == null) {
C14957gcv.a("");
c1986aUD = null;
}
c1986aUD.a(i);
}
@Override // o.InterfaceC6621cYR.mxa
public final void b(List<JM> list) {
C14957gcv.e(list, "");
Context context = getContext();
RecyclerView recyclerView = null;
if (context != null) {
RecyclerView recyclerView2 = this.rvLoans;
if (recyclerView2 == null) {
C14957gcv.a("");
recyclerView2 = null;
}
recyclerView2.setLayoutManager(new LinearLayoutManager());
RecyclerView recyclerView3 = this.rvLoans;
if (recyclerView3 == null) {
C14957gcv.a("");
recyclerView3 = null;
}
recyclerView3.d(new eCG(context, 16), -1);
}
C12174etI c12174etI = new C12174etI(list, this);
RecyclerView recyclerView4 = this.rvLoans;
if (recyclerView4 != null) {
recyclerView = recyclerView4;
} else {
C14957gcv.a("");
}
recyclerView.setAdapter(c12174etI);
this.i = c12174etI;
}
@Override // o.InterfaceC6621cYR.mxa
public final void a(LW lw) {
C14957gcv.e(lw, "");
Intent aeA_ = EasycashReferralSendProductActivity.aeA_(getContext(), lw);
C14957gcv.c(aeA_, "");
aeA_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeA_);
}
@Override // o.InterfaceC6621cYR.mxa
public final void b() {
EasycashLandingActivity.c(getContext());
}
@Override // o.InterfaceC6621cYR.AcL
public final void c(C0657Lo c0657Lo, C0593Kf c0593Kf) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
Intent aeI_ = EasycashCreditCardIntroductionActivity.aeI_(getContext(), c0657Lo, c0593Kf, null);
C14957gcv.c(aeI_, "");
aeI_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeI_);
}
@Override // o.InterfaceC6621cYR.AcL
public final void e(C0657Lo c0657Lo, C0593Kf c0593Kf, C0652Lk c0652Lk) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
C14957gcv.e(c0652Lk, "");
Object[] objArr = {getContext(), c0657Lo, c0593Kf};
Intent intent = (Intent) EasycashSpeedyCashIntroductionActivity.a(objArr);
C14957gcv.c(intent, "");
intent.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(intent);
}
@Override // o.InterfaceC6621cYR.AcL
public final void b(C0657Lo c0657Lo, C0593Kf c0593Kf, C0652Lk c0652Lk) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
C14957gcv.e(c0652Lk, "");
Intent aeO_ = EasycashSpeedyLoanIntroductionActivity.aeO_(getContext(), c0657Lo, c0593Kf);
C14957gcv.c(aeO_, "");
aeO_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeO_);
}
@Override // o.InterfaceC6621cYR.AcL
public final void c(C0657Lo c0657Lo, C0593Kf c0593Kf, C0652Lk c0652Lk) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
C14957gcv.e(c0652Lk, "");
Intent aeQ_ = EasycashSpeedyLoanTopupIntroductionActivity.aeQ_(getContext(), c0657Lo, c0593Kf);
C14957gcv.c(aeQ_, "");
aeQ_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeQ_);
}
@Override // o.InterfaceC6621cYR.AcL
public final void h(C0657Lo c0657Lo, C0593Kf c0593Kf) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
Intent aeL_ = EasycashPurposefulLoanIntroductionActivity.aeL_(getContext(), c0657Lo, c0593Kf, null);
C14957gcv.c(aeL_, "");
aeL_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeL_);
}
@Override // o.InterfaceC6621cYR.AcL
public final void b(C0657Lo c0657Lo, C0593Kf c0593Kf) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
Intent aeH_ = EasycashCommercialLoanIntroductionActivity.aeH_(getContext(), c0657Lo, c0593Kf, null);
C14957gcv.c(aeH_, "");
aeH_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeH_);
}
@Override // o.InterfaceC6621cYR.AcL
public final void a(C0657Lo c0657Lo, C0593Kf c0593Kf) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
Context context = getContext();
if (context != null) {
EasycashMCMCIntroductionActivity.HBt hBt = EasycashMCMCIntroductionActivity.b;
Intent aeJ_ = EasycashMCMCIntroductionActivity.HBt.aeJ_(context, c0657Lo, c0593Kf, null);
aeJ_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeJ_);
}
}
@Override // o.InterfaceC6621cYR.AcL
public final void j(C0657Lo c0657Lo, C0593Kf c0593Kf) {
C14957gcv.e(c0657Lo, "");
C14957gcv.e(c0593Kf, "");
Intent aeK_ = EasycashMortgageIntroductionActivity.aeK_(getContext(), c0657Lo, c0593Kf, null);
C14957gcv.c(aeK_, "");
aeK_.putExtra("com.scb.phone.view.activity.easycash.PRODUCT_TYPE", "CREDIT_POWER");
startActivity(aeK_);
}
@Override // o.InterfaceC6621cYR.mxa
public final void b(String str) {
C14957gcv.e(str, "");
Lld lld = this.tracker;
Lld lld2 = null;
if (lld == null) {
C14957gcv.a("");
lld = null;
}
lld.a("entry_point", "REGULAR");
Lld lld3 = this.tracker;
if (lld3 == null) {
C14957gcv.a("");
lld3 = null;
}
if (C14957gcv.b((Object) str, (Object) "COMMERCIAL_LOAN")) {
str = "BUSINESS_LOAN";
}
lld3.a("product_type", str);
Lld lld4 = this.tracker;
if (lld4 != null) {
lld2 = lld4;
} else {
C14957gcv.a("");
}
Lld lld5 = lld2;
if (getActivity() != null) {
lld5.c(((BaseActivity) getActivity()).scbAnalytics, "apply_credit_power_launcher");
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
Lld lld = this.tracker;
if (lld == null) {
C14957gcv.a("");
lld = null;
}
lld.b();
super.onDestroy();
}
public static /* synthetic */ void b(EasycashCreditPowerSummaryFragment easycashCreditPowerSummaryFragment) {
C14957gcv.e(easycashCreditPowerSummaryFragment, "");
Object e = easycashCreditPowerSummaryFragment.c.e();
C14957gcv.c(e, "");
if (((CustomDialog) e).isShowing()) {
return;
}
Object e2 = easycashCreditPowerSummaryFragment.c.e();
C14957gcv.c(e2, "");
((CustomDialog) e2).show();
}
}