what-the-bank/sources/com/scb/phone/view/fragment/ntb/fatca/FatcaLandingQuestionFragmen...

208 lines
7.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.ntb.fatca;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.FragmentActivity;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.domain.interactor.FatcaQuestionnaireCase;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.fragment.ntb.fatca.FatcaLandingQuestionFragment;
import java.lang.ref.WeakReference;
import java.util.List;
import o.AbstractC13482fbE;
import o.C12912fKx;
import o.C13396fZU;
import o.C15716hvG;
import o.C1805aOv;
import o.InterfaceC12818fIA;
import o.InterfaceC13391fZD;
import o.InterfaceC8954dab;
import o.InterfaceC9713dpA;
import o.MF;
import o.QKH;
import o.cYP;
import o.pug;
/* loaded from: classes5.dex */
public class FatcaLandingQuestionFragment extends Hilt_FatcaLandingQuestionFragment implements cYP.RVV, InterfaceC9713dpA.HBt {
private InterfaceC9713dpA c;
private int d;
private InterfaceC12818fIA f;
@InterfaceC13391fZD
public C1805aOv fatcaLandingPresenter;
private InterfaceC8954dab.jbe g;
private QKH h = new QKH();
public boolean p() {
return true;
}
@Override // o.InterfaceC9713dpA.HBt
public final int t() {
return 2;
}
public static FatcaLandingQuestionFragment d() {
FatcaLandingQuestionFragment fatcaLandingQuestionFragment = new FatcaLandingQuestionFragment();
Bundle bundle = new Bundle();
bundle.putInt("BUNDLE_FATCA_TYPE", 0);
fatcaLandingQuestionFragment.setArguments(bundle);
return fatcaLandingQuestionFragment;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.ntb.fatca.Hilt_FatcaLandingQuestionFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof InterfaceC12818fIA) {
this.f = (InterfaceC12818fIA) context;
}
if (context instanceof InterfaceC9713dpA) {
this.c = (InterfaceC9713dpA) context;
}
if (context instanceof InterfaceC8954dab.jbe) {
this.g = (InterfaceC8954dab.jbe) context;
}
}
@Override // androidx.fragment.app.Fragment
public void onDetach() {
super.onDetach();
this.f = null;
this.c = null;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559649, viewGroup, false);
ButterKnife.c(this, inflate);
aa();
this.fatcaLandingPresenter.e((C1805aOv) this);
int i = getArguments().getInt("BUNDLE_FATCA_TYPE");
this.d = i;
this.fatcaLandingPresenter.b = i;
if (this.f != null) {
int i2 = this.d;
if (i2 == 0) {
InterfaceC8954dab.jbe jbeVar = this.g;
String e = jbeVar != null ? jbeVar.e() : "ekyc";
QKH qkh = this.h;
String e2 = this.fatcaLandingPresenter.c.d.e();
qkh.d("source", e);
if ("touchpoint".equals(e)) {
qkh.d("customer_group", e2);
}
} else {
if (i2 == 1) {
v("mfonboard_fatca");
} else if (i2 == 2) {
this.h.e("etb");
} else if (i2 == 3) {
this.h.e("scbs");
c("scbsonboard_fatca", new pug("source", "scbs"));
} else if (i2 == 4) {
this.h.e("your_loan");
} else if (i2 == 5) {
C15716hvG.RVV rvv = C15716hvG.d;
C15716hvG c15716hvG = new C15716hvG();
c15716hvG.d("source", "investment");
g(new C13396fZU("investment_onboard_fatca", c15716hvG));
}
this.f.f();
}
QKH qkh2 = this.h;
if (getActivity() != null) {
qkh2.c(((BaseActivity) getActivity()).scbAnalytics, "ekyc_fatca");
}
this.f.f();
}
return inflate;
}
@Override // androidx.fragment.app.Fragment
public void onStart() {
super.onStart();
InterfaceC9713dpA interfaceC9713dpA = this.c;
if (interfaceC9713dpA != null) {
interfaceC9713dpA.c(this);
}
}
public final void h() {
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.ntb_pop_up_title_exit).d(R.string.ntb_pop_up_message_exit), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.fqo
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
}})).aoT_(R.string.ok, new DialogInterface.OnClickListener(this) { // from class: o.fqz
private FatcaLandingQuestionFragment c;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
FatcaLandingQuestionFragment.awh_(this.c, dialogInterface);
}
{
this.c = this;
}
}).show();
}
@Override // o.InterfaceC9713dpA.HBt
public final String q() {
return getString(R.string.etb_answer_fatca);
}
public static /* synthetic */ void awh_(FatcaLandingQuestionFragment fatcaLandingQuestionFragment, DialogInterface dialogInterface) {
dialogInterface.dismiss();
int i = fatcaLandingQuestionFragment.fatcaLandingPresenter.b;
if (i != 1 && i != 2 && i != 3) {
if (i == 4) {
fatcaLandingQuestionFragment.getActivity().finish();
return;
} else if (i != 5) {
FragmentActivity activity = fatcaLandingQuestionFragment.getActivity();
if (activity != null) {
C12912fKx.d((WeakReference<BaseActivity>) new WeakReference((BaseActivity) fatcaLandingQuestionFragment.getActivity()));
activity.finish();
return;
}
return;
}
}
fatcaLandingQuestionFragment.k(false);
}
@Override // o.cYP.RVV
public final void a(List<MF> list) {
FatcaQuestionnaireFragment c = FatcaQuestionnaireFragment.c(list, this.fatcaLandingPresenter.b);
AbstractC13482fbE a = getChildFragmentManager().a();
a.b(R.id.fatca_containner, c, null, 2);
if (!a.d) {
throw new IllegalStateException("This FragmentTransaction is not allowed to be added to the back stack.");
}
a.a = true;
a.m = "fatca";
a.b();
}
@OnClick
public void onNextButtonClick() {
C1805aOv c1805aOv = this.fatcaLandingPresenter;
if (c1805aOv.f != 0) {
c1805aOv.f.y();
}
c1805aOv.e.b();
FatcaQuestionnaireCase fatcaQuestionnaireCase = c1805aOv.e;
fatcaQuestionnaireCase.d(fatcaQuestionnaireCase.i, new C1805aOv.HBt(c1805aOv, (byte) 0));
}
}