what-the-bank/sources/com/scb/phone/view/fragment/ccsof/CcSofReviewFragment.java

438 lines
14 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.ccsof;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.components.ItemCustom;
import com.scb.phone.view.activity.ccsof.CcSofOTPActivity;
import com.scb.phone.view.activity.ccsof.CcSofReviewTermsAndConditionsActivity;
import com.scb.phone.view.activity.ccsof.CcSofSuccessActivity;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.ccsof.CcSofReviewFragment;
import java.util.List;
import o.C1096Vn;
import o.C14823gO;
import o.C14957gcv;
import o.C15715hv;
import o.C16480oi;
import o.C17046tXv;
import o.C3367awH;
import o.EM;
import o.EW;
import o.HG;
import o.HH;
import o.HI;
import o.HJ;
import o.HK;
import o.HN;
import o.HP;
import o.InterfaceC13391fZD;
import o.InterfaceC9125ddn;
import o.QI;
import o.UXP;
import o.YL;
import o.ZI;
import o.gdZ;
/* loaded from: classes5.dex */
public final class CcSofReviewFragment extends Hilt_CcSofReviewFragment implements InterfaceC9125ddn.RVV {
public static final Sts c = new Sts(0);
@InterfaceC13391fZD
public C3367awH ccSofReviewFragmentPresenter;
@BindView
public Button confirmButton;
private UXP d;
@BindView
public LinearLayout itemContainer;
@InterfaceC13391fZD
public C14823gO mComponentFactory;
@BindView
public LinearLayout reviewRemarkLayout;
@BindView
public TextView reviewRemarkText;
@BindView
public CheckBox reviewTcCheck;
@BindView
public LinearLayout reviewTcLayout;
@BindView
public TextView reviewTcText;
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559494, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
C3367awH c3367awH = this.ccSofReviewFragmentPresenter;
if (c3367awH == null) {
C14957gcv.a("");
c3367awH = null;
}
c3367awH.e((C3367awH) this);
this.d = new UXP();
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onActivityCreated(Bundle bundle) {
String str;
Double d;
Double d2;
HP hp;
HP hp2;
super.onActivityCreated(bundle);
Bundle arguments = getArguments();
String str2 = null;
C1096Vn c1096Vn = arguments != null ? (C1096Vn) arguments.getParcelable("EXTRA_CCSOF_INPUT_DISPLAY") : null;
if (c1096Vn != null) {
final C3367awH c3367awH = this.ccSofReviewFragmentPresenter;
if (c3367awH == null) {
C14957gcv.a("");
c3367awH = null;
}
C14957gcv.e(c1096Vn, "");
c3367awH.c = c1096Vn;
C16480oi c16480oi = c3367awH.d;
C14957gcv.e(c1096Vn, "");
if (C16480oi.k(c1096Vn.b.h)) {
HG hg = c1096Vn.c.c;
str = hg != null ? hg.c : null;
HG hg2 = c1096Vn.c.c;
if (hg2 != null) {
d = hg2.b;
d2 = d;
}
d2 = null;
} else {
HJ hj = c1096Vn.c.d;
str = hj != null ? hj.e : null;
HJ hj2 = c1096Vn.c.d;
if (hj2 != null) {
d = hj2.c;
d2 = d;
}
d2 = null;
}
HI hi = new HI(c1096Vn.b.a, c1096Vn.a.X, c1096Vn.a.g, c1096Vn.a.r);
HN hn = c1096Vn.c.f;
String str3 = (hn == null || (hp2 = hn.d) == null) ? null : hp2.i;
HN hn2 = c1096Vn.c.f;
if (hn2 != null && (hp = hn2.d) != null) {
str2 = hp.d;
}
C1096Vn c1096Vn2 = c1096Vn;
HH hh = new HH(c1096Vn.b.g, hi, new HK(str3, str2, str), d2, Double.valueOf(Double.parseDouble(c1096Vn.b.b)), c1096Vn.b.d, c1096Vn.h, c1096Vn.c.d, c1096Vn.c.f, c1096Vn.b.e, c1096Vn.b.i, c1096Vn.d, c1096Vn.b.h);
c3367awH.a = hh;
final List<EM> d3 = c3367awH.d.d(hh, c1096Vn2.e);
ZI.IeS ieS = new ZI.IeS(d3) { // from class: o.awK
private List e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C3367awH.c(this.e, (InterfaceC9125ddn.RVV) obj);
}
{
this.e = d3;
}
};
if (c3367awH.f != 0) {
ieS.e(c3367awH.f);
}
String str4 = c1096Vn2.b.h;
if (gdZ.a(YL.CREDIT_CARD_INSTALLMENT_PAYMENT_PLAN.code, str4, false) || C3367awH.b(str4, c1096Vn2.e)) {
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.awN
@Override // o.ZI.IeS
public final void e(Object obj) {
C3367awH.a((InterfaceC9125ddn.RVV) obj);
}
};
if (c3367awH.f != 0) {
ieS2.e(c3367awH.f);
}
}
if (C3367awH.b(str4, c1096Vn2.e)) {
ZI.IeS ieS3 = new ZI.IeS(c3367awH) { // from class: o.awL
private C3367awH d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C3367awH.b(this.d, (InterfaceC9125ddn.RVV) obj);
}
{
this.d = c3367awH;
}
};
if (c3367awH.f != 0) {
ieS3.e(c3367awH.f);
}
}
}
}
@Override // o.InterfaceC9125ddn.RVV
public final void e(List<? extends EM> list) {
C14957gcv.e(list, "");
for (EM em : list) {
C14823gO c14823gO = this.mComponentFactory;
LinearLayout linearLayout = null;
if (c14823gO == null) {
C14957gcv.a("");
c14823gO = null;
}
ItemCustom e = c14823gO.e(requireContext(), em);
e.setUpWithDisplay(em);
LinearLayout linearLayout2 = this.itemContainer;
if (linearLayout2 != null) {
linearLayout = linearLayout2;
} else {
C14957gcv.a("");
}
linearLayout.addView(e);
}
}
@Override // o.InterfaceC9125ddn.RVV
public final void e(EW ew, String str, List<QI> list) {
C14957gcv.e(ew, "");
C14957gcv.e(str, "");
Context requireContext = requireContext();
CcSofSuccessActivity.LWm lWm = CcSofSuccessActivity.b;
Context requireContext2 = requireContext();
C14957gcv.c(requireContext2, "");
requireContext.startActivity(CcSofSuccessActivity.LWm.aat_(requireContext2, ew, str, list));
}
@Override // o.InterfaceC9125ddn.RVV
public final void c(int i, String str, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
CcSofReviewTermsAndConditionsActivity.IeS ieS = CcSofReviewTermsAndConditionsActivity.b;
Context requireContext = requireContext();
C14957gcv.c(requireContext, "");
C14957gcv.e(requireContext, "");
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
Intent putExtra = new Intent(requireContext, (Class<?>) CcSofReviewTermsAndConditionsActivity.class).putExtra("EXTRA_CARD_TYPE", i).putExtra("EXTRA_PARTNER_SUBTYPE", str).putExtra("EXTRA_TERM_AND_CON", str2);
C14957gcv.c(putExtra, "");
requireContext().startActivity(putExtra);
}
@Override // o.InterfaceC9125ddn.RVV
public final void a() {
TextView textView = this.reviewTcText;
CheckBox checkBox = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setMovementMethod(new LinkMovementMethod());
TextView textView2 = this.reviewTcText;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(C17046tXv.Qo_(getString(R.string.auto_ccsof_review_t_c_plan_text), getString(R.string.auto_ccsof_review_t_c_link), getResources(), new C17046tXv.HBt(this) { // from class: o.eMi
private CcSofReviewFragment e;
@Override // o.C17046tXv.HBt
public final void e() {
CcSofReviewFragment.c(this.e);
}
{
this.e = this;
}
}, true, 0, C15715hv.LWm.scb_purple));
LinearLayout linearLayout = this.reviewTcLayout;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(0);
CheckBox checkBox2 = this.reviewTcCheck;
if (checkBox2 != null) {
checkBox = checkBox2;
} else {
C14957gcv.a("");
}
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this) { // from class: o.eMj
private CcSofReviewFragment d;
@Override // android.widget.CompoundButton.OnCheckedChangeListener
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
CcSofReviewFragment.e(this.d, z);
}
{
this.d = this;
}
});
}
@Override // o.InterfaceC9125ddn.RVV
public final void c(String str) {
C14957gcv.e(str, "");
LinearLayout linearLayout = this.reviewRemarkLayout;
TextView textView = null;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(0);
TextView textView2 = this.reviewRemarkText;
if (textView2 != null) {
textView = textView2;
} else {
C14957gcv.a("");
}
textView.setText(str);
}
@Override // o.InterfaceC9125ddn.RVV
public final void d() {
Button button = this.confirmButton;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setEnabled(false);
}
@Override // o.InterfaceC9125ddn.RVV
public final void c() {
k(true);
}
@Override // o.InterfaceC9125ddn.RVV
public final void b() {
FragmentActivity activity = getActivity();
if (activity != null) {
activity.setResult(-1);
}
FragmentActivity activity2 = getActivity();
if (activity2 != null) {
activity2.finish();
}
}
@Override // o.InterfaceC9125ddn.RVV
public final void e(String str, HH hh) {
C14957gcv.e(str, "");
C14957gcv.e(hh, "");
Context context = getContext();
if (context != null) {
CcSofOTPActivity.Sts sts = CcSofOTPActivity.b;
C14957gcv.e(context, "");
C14957gcv.e(str, "");
C14957gcv.e(hh, "");
Intent intent = new Intent(context, (Class<?>) CcSofOTPActivity.class);
intent.putExtra("EXTRA_CCSOF_TRANSACTION_TOKEN_REQUEST", str);
intent.putExtra("EXTRA_CCSOF_REVIEW_DISPLAY", hh);
startActivityForResult(intent, 1100);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (-1 == i2 && i == 1100) {
requireActivity().finish();
}
}
/* JADX WARN: Code restructure failed: missing block: B:7:0x001c, code lost:
if (r0 == null) goto L10;
*/
@butterknife.OnClick
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void onClickConfirm() {
/*
Method dump skipped, instructions count: 320
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.fragment.ccsof.CcSofReviewFragment.onClickConfirm():void");
}
public static /* synthetic */ void e(CcSofReviewFragment ccSofReviewFragment, boolean z) {
C14957gcv.e(ccSofReviewFragment, "");
Button button = ccSofReviewFragment.confirmButton;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setEnabled(z);
}
public static /* synthetic */ void c(CcSofReviewFragment ccSofReviewFragment) {
C14957gcv.e(ccSofReviewFragment, "");
C3367awH c3367awH = ccSofReviewFragment.ccSofReviewFragmentPresenter;
final C1096Vn c1096Vn = null;
if (c3367awH == null) {
C14957gcv.a("");
c3367awH = null;
}
C1096Vn c1096Vn2 = c3367awH.c;
if (c1096Vn2 == null) {
C14957gcv.a("");
} else {
c1096Vn = c1096Vn2;
}
ZI.IeS ieS = new ZI.IeS(c1096Vn) { // from class: o.awI
private C1096Vn b;
@Override // o.ZI.IeS
public final void e(Object obj) {
C3367awH.c(this.b, (InterfaceC9125ddn.RVV) obj);
}
{
this.b = c1096Vn;
}
};
if (c3367awH.f != 0) {
ieS.e(c3367awH.f);
}
}
}