what-the-bank/sources/com/scb/phone/view/fragment/investment/assessment/RiskReviewFragment.java

409 lines
12 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.investment.assessment;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.adapter.investment.assessment.BasicAssetAllocationAdapter;
import com.scb.phone.view.fragment.BaseFragment;
import o.C0816Pb;
import o.C13396fZU;
import o.C14957gcv;
import o.C17809ztu;
import o.C3619bBj;
import o.InterfaceC12873fJq;
import o.InterfaceC13391fZD;
import o.InterfaceC9392diq;
import o.J;
import o.YV;
import o.ZI;
import o.eCG;
import o.fKI;
import o.tJR;
/* loaded from: classes5.dex */
public final class RiskReviewFragment extends Hilt_RiskReviewFragment implements InterfaceC9392diq.HBt {
public static final RVV c = new RVV(0);
@BindView
public Button btNext;
private InterfaceC12873fJq.Sts d;
@BindView
public LinearLayout llLayoutInvestorType;
@BindView
public LinearLayout llLayoutName;
@BindView
public LinearLayout llLayoutRiskLevel;
@BindView
public LinearLayout llLayoutScore;
@InterfaceC13391fZD
public C3619bBj presenter;
@BindView
public RecyclerView rvBaa;
@BindView
public TextView tvBaaTitle;
@BindView
public TextView tvDisclaimerDescription;
@BindView
public TextView tvRiskLevel;
@BindView
public TextView tvRiskSuccessInvestorType;
@BindView
public TextView tvRiskSuccessName;
@BindView
public TextView tvRiskSuccessNameLabel;
@BindView
public TextView tvRiskSuccessScore;
@BindView
public View vwSeparatorInvestorType;
@BindView
public View vwSeparatorName;
@BindView
public View vwSeparatorRiskLevel;
@BindView
public View vwSeparatorScore;
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.investment.assessment.Hilt_RiskReviewFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public final void onAttach(Context context) {
C14957gcv.e(context, "");
super.onAttach(context);
if (context instanceof InterfaceC12873fJq.Sts) {
this.d = (InterfaceC12873fJq.Sts) context;
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559884, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
LinearLayout linearLayout = this.llLayoutName;
C3619bBj c3619bBj = null;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
fKI.e(linearLayout2, 24, 0, 24, 0);
View view = this.vwSeparatorName;
if (view == null) {
C14957gcv.a("");
view = null;
}
fKI.e(view, 16, 0, 0, 0);
LinearLayout linearLayout3 = this.llLayoutScore;
if (linearLayout3 == null) {
C14957gcv.a("");
linearLayout3 = null;
}
LinearLayout linearLayout4 = linearLayout3;
C14957gcv.e(linearLayout4, "");
fKI.e(linearLayout4, 24, 0, 24, 0);
View view2 = this.vwSeparatorScore;
if (view2 == null) {
C14957gcv.a("");
view2 = null;
}
fKI.e(view2, 16, 0, 0, 0);
LinearLayout linearLayout5 = this.llLayoutRiskLevel;
if (linearLayout5 == null) {
C14957gcv.a("");
linearLayout5 = null;
}
LinearLayout linearLayout6 = linearLayout5;
C14957gcv.e(linearLayout6, "");
fKI.e(linearLayout6, 24, 0, 24, 0);
View view3 = this.vwSeparatorRiskLevel;
if (view3 == null) {
C14957gcv.a("");
view3 = null;
}
fKI.e(view3, 16, 0, 0, 0);
LinearLayout linearLayout7 = this.llLayoutInvestorType;
if (linearLayout7 == null) {
C14957gcv.a("");
linearLayout7 = null;
}
LinearLayout linearLayout8 = linearLayout7;
C14957gcv.e(linearLayout8, "");
fKI.e(linearLayout8, 24, 0, 24, 0);
View view4 = this.vwSeparatorInvestorType;
if (view4 == null) {
C14957gcv.a("");
view4 = null;
}
fKI.e(view4, 16, 0, 0, 0);
TextView textView = this.tvBaaTitle;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
TextView textView2 = textView;
C14957gcv.e(textView2, "");
fKI.e(textView2, 24, 16, 24, 16);
RecyclerView recyclerView = this.rvBaa;
if (recyclerView == null) {
C14957gcv.a("");
recyclerView = null;
}
RecyclerView recyclerView2 = recyclerView;
C14957gcv.e(recyclerView2, "");
fKI.e(recyclerView2, 24, 0, 24, 0);
C3619bBj c3619bBj2 = this.presenter;
if (c3619bBj2 != null) {
c3619bBj = c3619bBj2;
} else {
C14957gcv.a("");
}
c3619bBj.e((C3619bBj) this);
Bundle arguments = getArguments();
if (arguments != null) {
String string = arguments.getString("token");
if (string == null) {
string = "";
}
Parcelable parcelable = arguments.getParcelable(CommonConstant.ReqAccessTokenParam.DISPLAY_LABEL);
if (parcelable == null) {
throw new IllegalArgumentException("Required value was null.".toString());
}
final C0816Pb c0816Pb = (C0816Pb) parcelable;
C14957gcv.c(arguments, "");
YV yv = YV.OLD_SUITABILITY;
int i = arguments.getInt("suitabilityFlowType", -1);
if (i >= 0) {
yv = YV.values()[i];
}
final YV yv2 = yv;
C14957gcv.e(string, "");
C14957gcv.e(c0816Pb, "");
C14957gcv.e(yv2, "");
c3619bBj.e = string;
c3619bBj.d = yv2;
ZI.IeS ieS = new ZI.IeS(yv2, c0816Pb) { // from class: o.bBl
private YV b;
private C0816Pb d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C3619bBj.d(this.b, this.d, (InterfaceC9392diq.HBt) obj);
}
{
this.b = yv2;
this.d = c0816Pb;
}
};
if (c3619bBj.f != 0) {
ieS.e(c3619bBj.f);
}
}
return inflate;
}
@OnClick
public final void continueButtonClicked() {
C3619bBj c3619bBj = this.presenter;
YV yv = null;
if (c3619bBj == null) {
C14957gcv.a("");
c3619bBj = null;
}
if (c3619bBj.f != 0) {
c3619bBj.f.y();
}
String str = c3619bBj.e;
if (str == null) {
C14957gcv.a("");
str = null;
}
J j = new J(str);
YV yv2 = c3619bBj.d;
if (yv2 == null) {
C14957gcv.a("");
} else {
yv = yv2;
}
int i = C3619bBj.LWm.c[yv.ordinal()];
if (i == 1) {
c3619bBj.a.a(j);
} else if (i == 2) {
c3619bBj.a.b(j);
}
C17809ztu c17809ztu = c3619bBj.a;
c17809ztu.d(c17809ztu.i, new C3619bBj.Sts(c3619bBj));
}
@Override // o.InterfaceC9392diq.HBt
public final void e(C0816Pb c0816Pb) {
C14957gcv.e(c0816Pb, "");
a(c0816Pb);
LinearLayout linearLayout = this.llLayoutRiskLevel;
View view = null;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
linearLayout.setVisibility(8);
View view2 = this.vwSeparatorRiskLevel;
if (view2 != null) {
view = view2;
} else {
C14957gcv.a("");
}
view.setVisibility(8);
}
@Override // o.InterfaceC9392diq.HBt
public final void c(C0816Pb c0816Pb) {
C14957gcv.e(c0816Pb, "");
a(c0816Pb);
LinearLayout linearLayout = this.llLayoutRiskLevel;
Button button = null;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
linearLayout.setVisibility(0);
View view = this.vwSeparatorRiskLevel;
if (view == null) {
C14957gcv.a("");
view = null;
}
view.setVisibility(0);
TextView textView = this.tvRiskSuccessNameLabel;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(getString(R.string.single_form_mf_risk_review_name));
TextView textView2 = this.tvRiskLevel;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(c0816Pb.d);
Button button2 = this.btNext;
if (button2 != null) {
button = button2;
} else {
C14957gcv.a("");
}
button.setText(getString(R.string.single_form_mf_risk_review_button));
}
private final void a(C0816Pb c0816Pb) {
TextView textView = this.tvRiskSuccessName;
RecyclerView recyclerView = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0816Pb.c);
TextView textView2 = this.tvRiskSuccessScore;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(c0816Pb.i);
TextView textView3 = this.tvRiskSuccessInvestorType;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(c0816Pb.g);
TextView textView4 = this.tvDisclaimerDescription;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
textView4.setText(c0816Pb.b);
RecyclerView recyclerView2 = this.rvBaa;
if (recyclerView2 != null) {
recyclerView = recyclerView2;
} else {
C14957gcv.a("");
}
recyclerView.d(new eCG(requireContext(), 12), -1);
recyclerView.setNestedScrollingEnabled(false);
recyclerView.getContext();
recyclerView.setLayoutManager(new LinearLayoutManager(1, false));
recyclerView.setAdapter(new BasicAssetAllocationAdapter(c0816Pb.a));
}
@Override // o.InterfaceC9392diq.HBt
public final void b() {
Button button = this.btNext;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setEnabled(true);
}
@Override // o.InterfaceC9392diq.HBt
public final void d() {
InterfaceC12873fJq.Sts sts = this.d;
if (sts != null) {
sts.f();
}
}
@Override // o.InterfaceC9392diq.HBt
public final void b(C13396fZU<String, tJR> c13396fZU) {
C14957gcv.e(c13396fZU, "");
g(c13396fZU);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
C3619bBj c3619bBj = this.presenter;
if (c3619bBj == null) {
C14957gcv.a("");
c3619bBj = null;
}
c3619bBj.w_();
super.onDestroy();
}
/* loaded from: classes5.dex */
public static final class RVV {
private RVV() {
}
public /* synthetic */ RVV(byte b) {
this();
}
}
}