what-the-bank/sources/com/scb/phone/view/fragment/easycash/LoanRequestorFragment.java

494 lines
16 KiB
Java

package com.scb.phone.view.fragment.easycash;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
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.easycash.EasycashReferralSendDfwActivity;
import com.scb.phone.view.activity.easycash.NTBEasycashLandingActivity;
import com.scb.phone.view.activity.easycash.NTBEasycashReferralSendProductActivity;
import com.scb.phone.view.activity.privacypolicy.ScbPrivacyPolicyActivity;
import com.scb.phone.view.custom.common.DefaultButton;
import com.scb.phone.view.custom.common.InputText;
import com.scb.phone.view.fragment.easycash.LoanRequestorFragment;
import io.github.inflationx.calligraphy3.TypefaceUtils;
import java.util.List;
import o.C10965eUa;
import o.C13367fYf;
import o.C1931aSg;
import o.C1934aSj;
import o.C3172asW;
import o.C3289aui;
import o.C6583cXR;
import o.InterfaceC13391fZD;
import o.InterfaceC6621cYR;
import o.LT;
import o.LV;
import o.LW;
import o.URz;
import o.ZI;
import o.nMh;
import o.uzH;
import o.zBq;
/* loaded from: classes5.dex */
public class LoanRequestorFragment extends Hilt_LoanRequestorFragment implements InterfaceC6621cYR.BWq {
@BindView
InputText currentAddress;
@BindView
InputText firstName;
@BindView
InputText lastName;
@BindView
DefaultButton nextButton;
@BindView
InputText officeAddress;
@InterfaceC13391fZD
public C1934aSj presenter;
@BindView
LinearLayout vPrivacyNotice;
public static LoanRequestorFragment c(LV lv) {
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.EXTRA_DISPLAY", lv);
LoanRequestorFragment loanRequestorFragment = new LoanRequestorFragment();
loanRequestorFragment.setArguments(bundle);
return loanRequestorFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
byte b = 0;
View inflate = layoutInflater.inflate(R.layout.2131559605, viewGroup, false);
ButterKnife.c(this, inflate);
this.presenter.e((C1934aSj) this);
this.firstName.setOnInputChangeListener(new InputText.RVV(this) { // from class: o.eUf
private LoanRequestorFragment a;
@Override // com.scb.phone.view.custom.common.InputText.RVV
public final void b(String str) {
LoanRequestorFragment.e(this.a, str);
}
{
this.a = this;
}
});
this.lastName.setOnInputChangeListener(new InputText.RVV(this) { // from class: o.eUg
private LoanRequestorFragment a;
@Override // com.scb.phone.view.custom.common.InputText.RVV
public final void b(String str) {
LoanRequestorFragment.b(this.a, str);
}
{
this.a = this;
}
});
this.currentAddress.setOnInputChangeListener(new InputText.RVV(this) { // from class: o.eUj
private LoanRequestorFragment c;
@Override // com.scb.phone.view.custom.common.InputText.RVV
public final void b(String str) {
LoanRequestorFragment.c(this.c, str);
}
{
this.c = this;
}
});
this.currentAddress.setImeOptions(1);
this.officeAddress.setOnInputChangeListener(new InputText.RVV(this) { // from class: o.eUi
private LoanRequestorFragment c;
@Override // com.scb.phone.view.custom.common.InputText.RVV
public final void b(String str) {
LoanRequestorFragment.d(this.c, str);
}
{
this.c = this;
}
});
this.officeAddress.setImeOptions(1);
if (getArguments() != null && getArguments().getParcelable("com.scb.phone.EXTRA_DISPLAY") != null) {
final LV lv = (LV) getArguments().getParcelable("com.scb.phone.EXTRA_DISPLAY");
C1934aSj c1934aSj = this.presenter;
c1934aSj.c = lv;
ZI.IeS ieS = new ZI.IeS(lv) { // from class: o.aSp
private LV c;
@Override // o.ZI.IeS
public final void e(Object obj) {
C1934aSj.e(this.c, (InterfaceC6621cYR.BWq) obj);
}
{
this.c = lv;
}
};
if (c1934aSj.f != 0) {
ieS.e(c1934aSj.f);
}
if (c1934aSj.f != 0) {
c1934aSj.f.y();
}
zBq.RVV rvv = new zBq.RVV();
rvv.e = c1934aSj.c.b.h;
c1934aSj.e.c(new zBq(rvv, (byte) 0));
uzH uzh = c1934aSj.e;
uzh.d(uzh.i, new C1934aSj.RVV(c1934aSj, b));
}
return inflate;
}
@Override // o.InterfaceC6621cYR.BWq
public final void b(String str) {
this.firstName.setText(str);
}
@Override // o.InterfaceC6621cYR.BWq
public final void d(String str) {
this.lastName.setText(str);
}
@Override // o.InterfaceC6621cYR.BWq
public final void a(List<LT> list) {
for (LT lt : list) {
if (lt.c != null && getContext() != null) {
TextView textView = new TextView(getContext());
URz.we_(textView, R.style.f56592132017920);
textView.setTypeface(TypefaceUtils.load(getContext().getAssets(), "fonts/db_heavent_regular.ttf"));
textView.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
textView.setText(C3172asW.qI_(lt.c, 0));
textView.setMovementMethod(new C10965eUa(new C10965eUa.RVV(this) { // from class: o.eUe
private LoanRequestorFragment d;
@Override // o.C10965eUa.RVV
public final boolean b(String str) {
return LoanRequestorFragment.a(this.d, str);
}
{
this.d = this;
}
}));
this.vPrivacyNotice.addView(textView);
}
}
}
@Override // o.InterfaceC6621cYR.BWq
public final void e() {
this.vPrivacyNotice.setVisibility(8);
}
@Override // o.InterfaceC6621cYR.BWq
public final void a(boolean z) {
this.nextButton.setButtonEnabled(z);
}
@Override // o.InterfaceC6621cYR.BWq
public final void g() {
this.firstName.b(getString(R.string.incomplete_information));
}
@Override // o.InterfaceC6621cYR.BWq
public final void f() {
this.firstName.b(getString(R.string.easycash_loan_requestor_name_error));
}
@Override // o.InterfaceC6621cYR.BWq
public final void l() {
this.lastName.b(getString(R.string.incomplete_information));
}
@Override // o.InterfaceC6621cYR.BWq
public final void o() {
this.lastName.b(getString(R.string.easycash_loan_requestor_name_error));
}
@Override // o.InterfaceC6621cYR.BWq
public final void i() {
this.currentAddress.b(getString(R.string.incomplete_information));
}
@Override // o.InterfaceC6621cYR.BWq
public final void j() {
this.currentAddress.b(getString(R.string.easycash_invalid_format));
}
@Override // o.InterfaceC6621cYR.BWq
public final void k() {
this.officeAddress.b(getString(R.string.incomplete_information));
}
@Override // o.InterfaceC6621cYR.BWq
public final void m() {
this.officeAddress.b(getString(R.string.easycash_invalid_format));
}
@Override // o.InterfaceC6621cYR.BWq
public final void d() {
InputText inputText = this.firstName;
inputText.errorText.setVisibility(8);
inputText.inputEditText.setBackground(nMh.getDrawable(inputText.getContext(), R.drawable.shape_gray_rounded_rectangle));
}
@Override // o.InterfaceC6621cYR.BWq
public final void b() {
InputText inputText = this.lastName;
inputText.errorText.setVisibility(8);
inputText.inputEditText.setBackground(nMh.getDrawable(inputText.getContext(), R.drawable.shape_gray_rounded_rectangle));
}
@Override // o.InterfaceC6621cYR.BWq
public final void a() {
InputText inputText = this.currentAddress;
inputText.errorText.setVisibility(8);
inputText.inputEditText.setBackground(nMh.getDrawable(inputText.getContext(), R.drawable.shape_gray_rounded_rectangle));
}
@Override // o.InterfaceC6621cYR.BWq
public final void c() {
InputText inputText = this.officeAddress;
inputText.errorText.setVisibility(8);
inputText.inputEditText.setBackground(nMh.getDrawable(inputText.getContext(), R.drawable.shape_gray_rounded_rectangle));
}
@Override // o.InterfaceC6621cYR.BWq
public final void a(LW lw) {
NTBEasycashReferralSendProductActivity.c(getContext(), lw);
}
@Override // o.InterfaceC6621cYR.BWq
public final void c(LW lw) {
EasycashReferralSendDfwActivity.a(getContext(), lw);
}
@Override // o.InterfaceC6621cYR.BWq
public final void h() {
NTBEasycashLandingActivity.a(getContext());
}
@Override // com.scb.phone.view.fragment.BaseFragment, android.content.DialogInterface.OnDismissListener
public void onDismiss(DialogInterface dialogInterface) {
super.onDismiss(dialogInterface);
C1934aSj c1934aSj = this.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.aSs
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).h();
}
};
if (c1934aSj.f != 0) {
ieS.e(c1934aSj.f);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
super.onDestroy();
this.presenter.w_();
}
public static /* synthetic */ void c(LoanRequestorFragment loanRequestorFragment, String str) {
C1934aSj c1934aSj = loanRequestorFragment.presenter;
c1934aSj.c.d = str;
if (TextUtils.isEmpty(str.trim())) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.aSq
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).i();
}
};
if (c1934aSj.f != 0) {
ieS.e(c1934aSj.f);
}
} else if (C6583cXR.b("^[0-9\\u0E01-\\u0E39\\u0E40-\\u0E4Ca-zA-Z _*\"#&()@,.'\\-/]+$", str)) {
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.aSu
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).a();
}
};
if (c1934aSj.f != 0) {
ieS2.e(c1934aSj.f);
}
} else {
ZI.IeS ieS3 = new ZI.IeS() { // from class: o.aSf
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).j();
}
};
if (c1934aSj.f != 0) {
ieS3.e(c1934aSj.f);
}
}
C1931aSg c1931aSg = new C1931aSg(c1934aSj);
if (c1934aSj.f != 0) {
c1931aSg.e(c1934aSj.f);
}
}
public static /* synthetic */ boolean a(LoanRequestorFragment loanRequestorFragment, String str) {
loanRequestorFragment.startActivity(ScbPrivacyPolicyActivity.akT_(loanRequestorFragment.requireContext(), str));
return true;
}
public static /* synthetic */ void b(LoanRequestorFragment loanRequestorFragment, String str) {
C1934aSj c1934aSj = loanRequestorFragment.presenter;
c1934aSj.c.c = str;
if (TextUtils.isEmpty(str.trim())) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.aSi
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).l();
}
};
if (c1934aSj.f != 0) {
ieS.e(c1934aSj.f);
}
} else if (C6583cXR.b("^[\\u0E01-\\u0E39\\u0E40-\\u0E4Ca-zA-Z .'-]+$", str)) {
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.aSk
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).b();
}
};
if (c1934aSj.f != 0) {
ieS2.e(c1934aSj.f);
}
} else {
ZI.IeS ieS3 = new ZI.IeS() { // from class: o.aSm
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).o();
}
};
if (c1934aSj.f != 0) {
ieS3.e(c1934aSj.f);
}
}
C1931aSg c1931aSg = new C1931aSg(c1934aSj);
if (c1934aSj.f != 0) {
c1931aSg.e(c1934aSj.f);
}
}
public static /* synthetic */ void e(LoanRequestorFragment loanRequestorFragment, String str) {
C1934aSj c1934aSj = loanRequestorFragment.presenter;
c1934aSj.c.a = str;
if (TextUtils.isEmpty(str.trim())) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.aSh
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).g();
}
};
if (c1934aSj.f != 0) {
ieS.e(c1934aSj.f);
}
} else if (C6583cXR.b("^[\\u0E01-\\u0E39\\u0E40-\\u0E4Ca-zA-Z .'-]+$", str)) {
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.aSr
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).d();
}
};
if (c1934aSj.f != 0) {
ieS2.e(c1934aSj.f);
}
} else {
ZI.IeS ieS3 = new ZI.IeS() { // from class: o.aSt
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).f();
}
};
if (c1934aSj.f != 0) {
ieS3.e(c1934aSj.f);
}
}
C1931aSg c1931aSg = new C1931aSg(c1934aSj);
if (c1934aSj.f != 0) {
c1931aSg.e(c1934aSj.f);
}
}
public static /* synthetic */ void d(LoanRequestorFragment loanRequestorFragment, String str) {
C1934aSj c1934aSj = loanRequestorFragment.presenter;
c1934aSj.c.j = str;
if (TextUtils.isEmpty(str.trim())) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.aSo
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).k();
}
};
if (c1934aSj.f != 0) {
ieS.e(c1934aSj.f);
}
} else if (C6583cXR.b("^[0-9\\u0E01-\\u0E39\\u0E40-\\u0E4Ca-zA-Z _*\"#&()@,.'\\-/]+$", str)) {
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.aSl
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).c();
}
};
if (c1934aSj.f != 0) {
ieS2.e(c1934aSj.f);
}
} else {
ZI.IeS ieS3 = new ZI.IeS() { // from class: o.aSn
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6621cYR.BWq) obj).m();
}
};
if (c1934aSj.f != 0) {
ieS3.e(c1934aSj.f);
}
}
C1931aSg c1931aSg = new C1931aSg(c1934aSj);
if (c1934aSj.f != 0) {
c1931aSg.e(c1934aSj.f);
}
}
@OnClick
public void onClick() {
C1934aSj c1934aSj = this.presenter;
if (c1934aSj.f != 0) {
c1934aSj.f.y();
}
C13367fYf.IeS ieS = new C13367fYf.IeS();
ieS.b = c1934aSj.b.b.d();
ieS.h = c1934aSj.c.b.h;
ieS.d = c1934aSj.c.a;
ieS.e = c1934aSj.c.c;
ieS.c = c1934aSj.c.d;
ieS.a = c1934aSj.c.j;
c1934aSj.d.e(new C13367fYf(ieS, (byte) 0));
C3289aui c3289aui = c1934aSj.d;
c3289aui.d(c3289aui.i, new C1934aSj.Sts(c1934aSj, (byte) 0));
}
}