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

591 lines
20 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.graphics.drawable.Drawable;
import android.net.Uri;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.OnClick;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.activity.HomeActivity;
import com.scb.phone.view.activity.ccsof.CcSofReviewActivity;
import com.scb.phone.view.custom.ScbEditText;
import com.scb.phone.view.custom.common.AmountEditText;
import com.scb.phone.view.custom.common.DefaultButton;
import com.scb.phone.view.custom.common.NoteEditText;
import java.util.List;
import o.C1096Vn;
import o.C12160esv;
import o.C12891fKc;
import o.C14957gcv;
import o.C3331avY;
import o.HL;
import o.HO;
import o.InterfaceC13391fZD;
import o.InterfaceC9115ddd;
import o.UXP;
import o.YY;
import o.ZI;
import o.guQ;
import o.nMh;
/* loaded from: classes5.dex */
public final class CcSofCreditCardOnlyInputFragment extends Hilt_CcSofCreditCardOnlyInputFragment implements InterfaceC9115ddd.IeS, C12160esv.LWm {
public static final Sts c = new Sts(0);
@BindView
public LinearLayout availableInstallmentsContainer;
@BindView
public DefaultButton btnReview;
@BindView
public CheckBox cbApplyCcIpp;
private C12160esv d;
@BindView
public ScbEditText etRef1;
private UXP g;
@BindView
public ImageView imageIcon;
@BindView
public LinearLayout installmentLayout;
@InterfaceC13391fZD
public C3331avY mPresenter;
@BindView
public NoteEditText noteEditText;
@BindView
public RecyclerView rvTenor;
@BindView
public LinearLayout selectedInstallmentDetailsContainer;
@BindView
public AmountEditText tvAmount;
@BindView
public TextView tvInterestAmount;
@BindView
public TextView tvMerchantId;
@BindView
public TextView tvMerchantTitle;
@BindView
public TextView tvMonthlyInterestRate;
@BindView
public TextView tvMonthlyPaymentAmount;
@BindView
public TextView tvPrincipalAmount;
@BindView
public TextView tvPrincipalInterestCalculation;
@BindView
public TextView tvTotalPayment;
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
/* JADX WARN: Code restructure failed: missing block: B:25:0x008b, code lost:
if (r2 == null) goto L34;
*/
@Override // androidx.fragment.app.Fragment
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final android.view.View onCreateView(android.view.LayoutInflater r6, android.view.ViewGroup r7, android.os.Bundle r8) {
/*
r5 = this;
java.lang.String r8 = ""
o.C14957gcv.e(r6, r8)
r0 = 2131559492(0x7f0d0444, float:1.874433E38)
r1 = 0
android.view.View r6 = r6.inflate(r0, r7, r1)
butterknife.ButterKnife.c(r5, r6)
o.UXP r7 = new o.UXP
r7.<init>()
r5.g = r7
com.scb.phone.view.custom.common.AmountEditText r7 = r5.tvAmount
r0 = 0
if (r7 == 0) goto L1d
goto L21
L1d:
o.C14957gcv.a(r8)
r7 = r0
L21:
r7.setEnabled(r1)
com.scb.phone.view.custom.common.AmountEditText r7 = r5.tvAmount
if (r7 == 0) goto L29
goto L2d
L29:
o.C14957gcv.a(r8)
r7 = r0
L2d:
r7.setInputType(r1)
com.scb.phone.view.custom.common.NoteEditText r7 = r5.noteEditText
if (r7 == 0) goto L35
goto L39
L35:
o.C14957gcv.a(r8)
r7 = r0
L39:
o.eMc r2 = new o.eMc
r2.<init>(r5)
java.lang.String r3 = "^(?=\\S)[0-9a-zA-Z\\u0E00-\\u0E3E\\u0E40-\\u0E7F _*'\"#&*()@\\-]+$"
r7.setOnNoteInputListener(r2, r3, r1)
o.avY r7 = r5.mPresenter
if (r7 == 0) goto L48
goto L4c
L48:
o.C14957gcv.a(r8)
r7 = r0
L4c:
r1 = r5
o.cYp r1 = (o.InterfaceC6638cYp) r1
r7.e(r1)
android.os.Bundle r7 = r5.getArguments()
if (r7 == 0) goto L61
java.lang.String r1 = "EXTRA_CREDIT_CARD_DISPLAY"
android.os.Parcelable r7 = r7.getParcelable(r1)
o.Fb r7 = (o.C0367Fb) r7
goto L62
L61:
r7 = r0
L62:
android.os.Bundle r1 = r5.getArguments()
if (r1 == 0) goto L6f
java.lang.String r2 = "EXTRA_CALLBACK_URL"
java.lang.String r1 = r1.getString(r2)
goto L70
L6f:
r1 = r0
L70:
android.os.Bundle r2 = r5.getArguments()
if (r2 == 0) goto L8d
java.lang.String r3 = "com.scb.phone.EXTRA_PAYMENT_FLOW_TYPE"
r4 = -1
int r2 = r2.getInt(r3, r4)
if (r2 < 0) goto L88
o.YY[] r3 = o.YY.values()
r2 = r3[r2]
java.lang.Enum r2 = (java.lang.Enum) r2
goto L89
L88:
r2 = r0
L89:
o.YY r2 = (o.YY) r2
if (r2 != 0) goto L8f
L8d:
o.YY r2 = o.YY.NORMAL
L8f:
android.os.Bundle r3 = r5.getArguments()
if (r3 == 0) goto Lab
java.lang.String r4 = "EXTRA_CC_SOURCE_OF_FUND_DISPLAY"
android.os.Parcelable r3 = r3.getParcelable(r4)
o.HR r3 = (o.HR) r3
if (r3 == 0) goto Lab
o.avY r4 = r5.mPresenter
if (r4 == 0) goto La5
r0 = r4
goto La8
La5:
o.C14957gcv.a(r8)
La8:
r0.a(r3, r7, r1, r2)
Lab:
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.fragment.ccsof.CcSofCreditCardOnlyInputFragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):android.view.View");
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C3331avY c3331avY = this.mPresenter;
if (c3331avY == null) {
C14957gcv.a("");
c3331avY = null;
}
c3331avY.w_();
super.onDestroyView();
}
@OnClick
public final void onCheckboxClick() {
C3331avY c3331avY = this.mPresenter;
if (c3331avY == null) {
C14957gcv.a("");
c3331avY = null;
}
c3331avY.b = !c3331avY.b;
c3331avY.b(true);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:100:0x015b */
/* JADX WARN: Removed duplicated region for block: B:103:0x0163 */
/* JADX WARN: Removed duplicated region for block: B:105:0x0170 */
/* JADX WARN: Removed duplicated region for block: B:107:0x017d */
/* JADX WARN: Removed duplicated region for block: B:109:0x0190 */
/* JADX WARN: Removed duplicated region for block: B:111:0x0196 */
/* JADX WARN: Removed duplicated region for block: B:113:0x01a3 */
/* JADX WARN: Removed duplicated region for block: B:115:0x01b0 */
/* JADX WARN: Removed duplicated region for block: B:117:0x01bd */
/* JADX WARN: Removed duplicated region for block: B:119:0x01ca */
/* JADX WARN: Removed duplicated region for block: B:122:0x01d8 */
/* JADX WARN: Removed duplicated region for block: B:124:0x01cd */
/* JADX WARN: Removed duplicated region for block: B:125:0x01c6 */
/* JADX WARN: Removed duplicated region for block: B:126:0x01b9 */
/* JADX WARN: Removed duplicated region for block: B:127:0x01ac */
/* JADX WARN: Removed duplicated region for block: B:128:0x019f */
/* JADX WARN: Removed duplicated region for block: B:129:0x0193 */
/* JADX WARN: Removed duplicated region for block: B:130:0x0189 */
/* JADX WARN: Removed duplicated region for block: B:131:0x0179 */
/* JADX WARN: Removed duplicated region for block: B:132:0x016c */
/* JADX WARN: Removed duplicated region for block: B:133:0x015e */
/* JADX WARN: Removed duplicated region for block: B:134:0x0156 */
/* JADX WARN: Removed duplicated region for block: B:135:0x0145 */
/* JADX WARN: Removed duplicated region for block: B:136:0x0134 */
/* JADX WARN: Removed duplicated region for block: B:44:0x01fe */
/* JADX WARN: Removed duplicated region for block: B:45:0x0211 */
/* JADX WARN: Removed duplicated region for block: B:79:0x011c */
/* JADX WARN: Removed duplicated region for block: B:82:0x0128 */
/* JADX WARN: Removed duplicated region for block: B:88:0x0139 */
/* JADX WARN: Removed duplicated region for block: B:94:0x014a */
@butterknife.OnClick
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void onReviewButtonClick() {
/*
Method dump skipped, instructions count: 640
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.fragment.ccsof.CcSofCreditCardOnlyInputFragment.onReviewButtonClick():void");
}
@Override // o.InterfaceC9115ddd.IeS
public final void a(String str, String str2, String str3, String str4, String str5) {
ImageView imageView;
TextView textView = this.tvMerchantTitle;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(str);
TextView textView2 = this.tvMerchantId;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(str2);
ScbEditText scbEditText = this.etRef1;
if (scbEditText == null) {
C14957gcv.a("");
scbEditText = null;
}
scbEditText.setText(str4);
AmountEditText amountEditText = this.tvAmount;
if (amountEditText == null) {
C14957gcv.a("");
amountEditText = null;
}
amountEditText.setText(str3);
if (str5 != null) {
Drawable drawable = nMh.getDrawable(requireContext(), R.drawable.biller_place_holder);
Context context = getContext();
ImageView imageView2 = this.imageIcon;
if (imageView2 != null) {
imageView = imageView2;
} else {
C14957gcv.a("");
imageView = null;
}
C12891fKc.azg_(context, drawable, imageView, str5, getResources().getDimensionPixelOffset(R.dimen.f15222131165286), nMh.getColor(requireContext(), R.color.f3412131099849));
}
}
@Override // o.InterfaceC9115ddd.IeS
public final void d(boolean z, boolean z2, int i) {
CheckBox checkBox = this.cbApplyCcIpp;
CheckBox checkBox2 = null;
if (checkBox == null) {
C14957gcv.a("");
checkBox = null;
}
checkBox.setChecked(z);
CheckBox checkBox3 = this.cbApplyCcIpp;
if (checkBox3 == null) {
C14957gcv.a("");
checkBox3 = null;
}
checkBox3.setEnabled(z2);
CheckBox checkBox4 = this.cbApplyCcIpp;
if (checkBox4 != null) {
checkBox2 = checkBox4;
} else {
C14957gcv.a("");
}
checkBox2.setButtonDrawable(i);
}
@Override // o.InterfaceC9115ddd.IeS
public final void d(List<HO> list, Integer num) {
C14957gcv.e(list, "");
RecyclerView recyclerView = this.rvTenor;
C12160esv c12160esv = null;
if (recyclerView == null) {
C14957gcv.a("");
recyclerView = null;
}
if (recyclerView.x == null) {
RecyclerView recyclerView2 = this.rvTenor;
if (recyclerView2 == null) {
C14957gcv.a("");
recyclerView2 = null;
}
getActivity();
recyclerView2.setLayoutManager(new LinearLayoutManager(0, false));
}
C12160esv c12160esv2 = this.d;
if (c12160esv2 == null) {
this.d = new C12160esv(list, num, this);
RecyclerView recyclerView3 = this.rvTenor;
if (recyclerView3 == null) {
C14957gcv.a("");
recyclerView3 = null;
}
C12160esv c12160esv3 = this.d;
if (c12160esv3 == null) {
C14957gcv.a("");
} else {
c12160esv = c12160esv3;
}
recyclerView3.setAdapter(c12160esv);
return;
}
if (c12160esv2 == null) {
C14957gcv.a("");
c12160esv2 = null;
}
C14957gcv.e(list, "");
c12160esv2.c = list;
C12160esv c12160esv4 = this.d;
if (c12160esv4 == null) {
C14957gcv.a("");
c12160esv4 = null;
}
c12160esv4.e = num;
C12160esv c12160esv5 = this.d;
if (c12160esv5 == null) {
C14957gcv.a("");
} else {
c12160esv = c12160esv5;
}
c12160esv.notifyDataSetChanged();
}
@Override // o.InterfaceC9115ddd.IeS
public final void e(HL hl, String str) {
TextView textView = this.tvMonthlyInterestRate;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(hl != null ? hl.e : null);
TextView textView2 = this.tvTotalPayment;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(hl != null ? hl.c : null);
TextView textView3 = this.tvPrincipalAmount;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(str);
TextView textView4 = this.tvInterestAmount;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
textView4.setText(hl != null ? hl.d : null);
TextView textView5 = this.tvMonthlyPaymentAmount;
if (textView5 == null) {
C14957gcv.a("");
textView5 = null;
}
textView5.setText(hl != null ? hl.b : null);
TextView textView6 = this.tvPrincipalInterestCalculation;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
Object[] objArr = new Object[1];
objArr[0] = hl != null ? hl.a : null;
textView6.setText(getString(R.string.auto_ccsof_input_disclaimer_text, objArr));
}
@Override // o.InterfaceC9115ddd.IeS
public final void a(boolean z) {
LinearLayout linearLayout = this.installmentLayout;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(z ? 0 : 8);
}
@Override // o.InterfaceC9115ddd.IeS
public final void c(boolean z) {
LinearLayout linearLayout = this.availableInstallmentsContainer;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(z ? 0 : 8);
}
@Override // o.InterfaceC9115ddd.IeS
public final void b(boolean z) {
LinearLayout linearLayout = this.selectedInstallmentDetailsContainer;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(z ? 0 : 8);
}
@Override // o.InterfaceC9115ddd.IeS
public final void d(boolean z) {
DefaultButton defaultButton = this.btnReview;
if (defaultButton == null) {
C14957gcv.a("");
defaultButton = null;
}
defaultButton.setButtonEnabled(z);
}
@Override // o.InterfaceC9115ddd.IeS
public final void e(boolean z) {
NoteEditText noteEditText = null;
if (z) {
NoteEditText noteEditText2 = this.noteEditText;
if (noteEditText2 != null) {
noteEditText = noteEditText2;
} else {
C14957gcv.a("");
}
noteEditText.b();
return;
}
NoteEditText noteEditText3 = this.noteEditText;
if (noteEditText3 != null) {
noteEditText = noteEditText3;
} else {
C14957gcv.a("");
}
noteEditText.d();
}
@Override // o.InterfaceC9115ddd.IeS
public final void d(C1096Vn c1096Vn, YY yy) {
C14957gcv.e(c1096Vn, "");
C14957gcv.e(yy, "");
CcSofReviewActivity.HBt hBt = CcSofReviewActivity.b;
Context requireContext = requireContext();
C14957gcv.c(requireContext, "");
C14957gcv.e(requireContext, "");
C14957gcv.e(c1096Vn, "");
C14957gcv.e(yy, "");
Intent putExtra = new Intent(requireContext, (Class<?>) CcSofReviewActivity.class).putExtra("EXTRA_CCSOF_INPUT_DISPLAY", c1096Vn);
C14957gcv.c(putExtra, "");
Intent putExtra2 = putExtra.putExtra("com.scb.phone.EXTRA_PAYMENT_FLOW_TYPE", yy.ordinal());
C14957gcv.c(putExtra2, "");
Fragment parentFragment = getParentFragment();
if (parentFragment != null) {
parentFragment.startActivityForResult(putExtra2, 90);
}
}
@Override // o.InterfaceC9115ddd.IeS
public final void e() {
k(false);
}
@Override // o.InterfaceC9115ddd.IeS
public final void b(String str) {
C14957gcv.e(str, "");
try {
startActivity((Intent) HomeActivity.e(new Object[]{requireContext()}, -1290522472, 1290522474, (int) System.currentTimeMillis()));
startActivity(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, Uri.parse(str)));
} catch (Exception e) {
guQ.e(e);
}
}
@Override // o.C12160esv.LWm
public final void e(HO ho) {
C14957gcv.e(ho, "");
C3331avY c3331avY = this.mPresenter;
if (c3331avY == null) {
C14957gcv.a("");
c3331avY = null;
}
C14957gcv.e(ho, "");
c3331avY.h = Integer.valueOf(ho.j);
c3331avY.b(false);
}
public static /* synthetic */ void c(CcSofCreditCardOnlyInputFragment ccSofCreditCardOnlyInputFragment) {
C14957gcv.e(ccSofCreditCardOnlyInputFragment, "");
C3331avY c3331avY = ccSofCreditCardOnlyInputFragment.mPresenter;
if (c3331avY == null) {
C14957gcv.a("");
c3331avY = null;
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.awc
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9115ddd.IeS) obj).e(true);
}
};
if (c3331avY.f != 0) {
ieS.e(c3331avY.f);
}
}
}