what-the-bank/sources/com/scb/phone/view/fragment/hml/HmlSummaryFragment.java

424 lines
13 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.hml;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.privacypolicy.ScbPrivacyPolicyActivity;
import com.scb.phone.view.custom.tierpricing.TierPricingSimplePromotionView;
import com.scb.phone.view.fragment.BaseFragment;
import java.util.ArrayList;
import java.util.List;
import o.AbstractC5576bvf;
import o.C0740Nm;
import o.C10965eUa;
import o.C14881gav;
import o.C14957gcv;
import o.C17171uWJ;
import o.C3172asW;
import o.InterfaceC9299dhC;
import o.NO;
import o.OVB;
import o.WZ;
import o.ZI;
import o.bTI;
/* loaded from: classes5.dex */
public abstract class HmlSummaryFragment extends BaseFragment implements InterfaceC9299dhC {
@BindView
public TextView annualInterest;
@BindView
public Button btNextBusiness;
@BindView
public Button btNextCustomer;
@BindView
public TextView duration;
@BindView
public TextView durationValue;
@BindView
public TextView dutyStampDisclaimer;
@BindView
public View dutyStampSeparator;
@BindView
public TextView dutyStampTitle;
@BindView
public TextView repaymentDate;
@BindView
public TextView requestAmountValue;
@BindView
public TextView requestValue;
@BindView
public LinearLayout simplePromotionContainer;
@BindView
public ImageView step2Image;
@BindView
public TextView step2Text;
@BindView
public ImageView step3Image;
@BindView
public TextView tvLoanPersonalizationButton;
@BindView
public TextView tvLoanPersonalizationLabel;
@BindView
public TextView tvPrivacyNotice;
@BindView
public View vPrivacyNoticeContainer;
public void a() {
}
protected abstract AbstractC5576bvf f();
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559721, viewGroup, false);
ButterKnife.c(this, inflate);
f().e((AbstractC5576bvf) this);
AbstractC5576bvf f = f();
if (f.f != 0) {
f.f.y();
}
C17171uWJ c17171uWJ = f.d;
C17171uWJ.e(c17171uWJ, OVB.PRIVACY_NOTICE);
c17171uWJ.d(c17171uWJ.i, new AbstractC5576bvf.Sts(f));
Bundle arguments = getArguments();
if (arguments != null) {
boolean z = arguments.getBoolean("com.scb.phone.EXTRA_LOAN_PERSONALIZATION_SECTION");
TextView textView = this.tvLoanPersonalizationLabel;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
TextView textView3 = textView;
C14957gcv.e(textView3, "");
textView3.setVisibility(z ? 0 : 8);
TextView textView4 = this.tvLoanPersonalizationButton;
if (textView4 != null) {
textView2 = textView4;
} else {
C14957gcv.a("");
}
TextView textView5 = textView2;
C14957gcv.e(textView5, "");
textView5.setVisibility(z ? 0 : 8);
}
C14957gcv.c(inflate, "");
return inflate;
}
@Override // o.InterfaceC9299dhC
public final void c() {
View view = this.vPrivacyNoticeContainer;
if (view == null) {
C14957gcv.a("");
view = null;
}
view.setVisibility(8);
}
@Override // o.InterfaceC9299dhC
public final void e(String str) {
C14957gcv.e(str, "");
View view = this.vPrivacyNoticeContainer;
TextView textView = null;
if (view == null) {
C14957gcv.a("");
view = null;
}
view.setVisibility(0);
TextView textView2 = this.tvPrivacyNotice;
if (textView2 != null) {
textView = textView2;
} else {
C14957gcv.a("");
}
textView.setText(C3172asW.qI_(str, 0));
textView.setMovementMethod(new C10965eUa(new IeS(this)));
}
/* loaded from: classes5.dex */
public static final class IeS implements C10965eUa.RVV {
private HmlSummaryFragment d;
IeS(HmlSummaryFragment hmlSummaryFragment) {
this.d = hmlSummaryFragment;
}
@Override // o.C10965eUa.RVV
public final boolean b(String str) {
C14957gcv.e(str, "");
HmlSummaryFragment.a(this.d, str);
return true;
}
}
@Override // o.InterfaceC9299dhC
public final void a(bTI bti) {
C14957gcv.e(bti, "");
int i = RVV.c[bti.ordinal()];
Button button = null;
if (i == 1) {
Button button2 = this.btNextCustomer;
if (button2 != null) {
button = button2;
} else {
C14957gcv.a("");
}
button.setVisibility(0);
return;
}
if (i == 2) {
Button button3 = this.btNextBusiness;
if (button3 != null) {
button = button3;
} else {
C14957gcv.a("");
}
button.setVisibility(0);
}
}
@OnClick
public final void submit() {
f().c();
}
@OnClick
public final void onLoanPersonalizationClick() {
final AbstractC5576bvf f = f();
ZI.IeS ieS = new ZI.IeS(f) { // from class: o.bve
private AbstractC5576bvf e;
/* JADX WARN: Code restructure failed: missing block: B:7:0x0018, code lost:
if (r0 != null) goto L11;
*/
@Override // o.ZI.IeS
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void e(java.lang.Object r3) {
/*
r2 = this;
o.bvf r0 = r2.e
o.dhC r3 = (o.InterfaceC9299dhC) r3
java.lang.String r1 = ""
o.C14957gcv.e(r0, r1)
o.ToF r0 = r0.a
if (r0 == 0) goto L1a
java.lang.String r0 = r0.h
if (r0 == 0) goto L1a
o.EVU r0 = o.EVU.valueOf(r0) // Catch: java.lang.IllegalArgumentException -> L16
goto L18
L16:
o.EVU r0 = o.EVU.GENERAL
L18:
if (r0 != 0) goto L1c
L1a:
o.EVU r0 = o.EVU.GENERAL
L1c:
r3.c(r0)
return
*/
throw new UnsupportedOperationException("Method not decompiled: o.C5575bve.e(java.lang.Object):void");
}
{
this.e = f;
}
};
if (f.f != 0) {
ieS.e(f.f);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
f().w_();
super.onDestroyView();
}
@Override // o.InterfaceC9299dhC
public final void e(String str, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
TextView textView = this.dutyStampTitle;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
TextView textView3 = textView;
C14957gcv.e(textView3, "");
textView3.setVisibility(0);
TextView textView4 = this.dutyStampDisclaimer;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
TextView textView5 = textView4;
C14957gcv.e(textView5, "");
textView5.setVisibility(0);
View view = this.dutyStampSeparator;
if (view == null) {
C14957gcv.a("");
view = null;
}
C14957gcv.e(view, "");
view.setVisibility(0);
TextView textView6 = this.dutyStampTitle;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
textView6.setText(getString(R.string.hml_summary_duty_stamp_title, str));
TextView textView7 = this.dutyStampDisclaimer;
if (textView7 != null) {
textView2 = textView7;
} else {
C14957gcv.a("");
}
textView2.setText(getString(R.string.hml_summary_duty_stamp_disclaimer, str, str2));
}
public static final /* synthetic */ void a(HmlSummaryFragment hmlSummaryFragment, String str) {
Context context = hmlSummaryFragment.getContext();
if (context != null) {
ScbPrivacyPolicyActivity.LWm lWm = ScbPrivacyPolicyActivity.m;
hmlSummaryFragment.startActivity(ScbPrivacyPolicyActivity.LWm.akV_(context, str, null));
}
}
/* JADX WARN: Multi-variable type inference failed */
@Override // o.InterfaceC9299dhC
public final void d(NO no) {
List<WZ> list;
WZ wz;
C14957gcv.e(no, "");
C0740Nm c0740Nm = no.b;
TextView textView = this.requestValue;
LinearLayout linearLayout = null;
Object[] objArr = 0;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(getString(R.string.hml_summary_request_value, no.d));
TextView textView2 = this.requestAmountValue;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(getString(R.string.hml_summary_request_amount_value, c0740Nm.b, c0740Nm.e));
TextView textView3 = this.repaymentDate;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(no.j);
TextView textView4 = this.duration;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
textView4.setText(getString(R.string.hml_summary_duration));
TextView textView5 = this.durationValue;
if (textView5 == null) {
C14957gcv.a("");
textView5 = null;
}
textView5.setText(getString(R.string.hml_summary_duration_value, no.a, c0740Nm.a));
TextView textView6 = this.annualInterest;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
textView6.setText(getString(R.string.hml_summary_duration_description, no.c));
Context context = getContext();
if (context == null || (list = no.h) == null) {
return;
}
ArrayList arrayList = new ArrayList();
for (Object obj : list) {
if (((WZ) obj).d) {
arrayList.add(obj);
}
}
ArrayList arrayList2 = arrayList;
if (!(!arrayList2.isEmpty())) {
arrayList2 = null;
}
if (arrayList2 == null || (wz = (WZ) C14881gav.e((List) arrayList2)) == null) {
return;
}
TierPricingSimplePromotionView tierPricingSimplePromotionView = new TierPricingSimplePromotionView(context, objArr == true ? 1 : 0, 6, (byte) 0);
tierPricingSimplePromotionView.setDisplay(wz);
FrameLayout frameLayout = tierPricingSimplePromotionView.divider;
if (frameLayout == null) {
C14957gcv.a("");
frameLayout = null;
}
FrameLayout frameLayout2 = frameLayout;
C14957gcv.e(frameLayout2, "");
frameLayout2.setVisibility(0);
tierPricingSimplePromotionView.setRemarkTextColor(R.color.f3092131099816);
LinearLayout linearLayout2 = this.simplePromotionContainer;
if (linearLayout2 != null) {
linearLayout = linearLayout2;
} else {
C14957gcv.a("");
}
linearLayout.addView(tierPricingSimplePromotionView);
}
/* loaded from: classes5.dex */
public final /* synthetic */ class RVV {
public static final int[] c;
static {
int[] iArr = new int[bTI.values().length];
try {
iArr[bTI.CONSUMER.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[bTI.BUSINESS_OWNER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
c = iArr;
}
}
}