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

865 lines
32 KiB
Java

package com.scb.phone.view.fragment.hml;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextUtils;
import android.text.method.DigitsKeyListener;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.OnCheckedChanged;
import butterknife.OnClick;
import com.pingan.ai.face.common.PaFaceConstants;
import com.scb.phone.R;
import com.scb.phone.view.activity.hml.HmlHomeAddressActivity;
import com.scb.phone.view.activity.hml.HmlNTBMonthlyIncomeAboutActivity;
import com.scb.phone.view.activity.hml.HmlNTBPersonalInfoActivity;
import com.scb.phone.view.activity.hml.ekyc.HmlNTBeKYCLandingActivity;
import com.scb.phone.view.custom.common.ClearableEditText;
import com.scb.phone.view.custom.common.CommonInputViewGroup;
import com.scb.phone.view.custom.common.CustomEditText;
import com.scb.phone.view.custom.common.CustomPhoneNumberInput;
import com.scb.phone.view.custom.common.DateInputText;
import com.scb.phone.view.custom.common.DateInputWithoutError;
import com.scb.phone.view.custom.common.ProgressStateBar;
import com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle;
import com.scb.phone.view.fragment.hml.HmlNTBPersonalInfoFragment;
import java.util.Arrays;
import java.util.List;
import o.AbstractC5071bmC;
import o.C0748Nr;
import o.C13553fcW;
import o.C13555fcY;
import o.C14957gcv;
import o.C5087bmS;
import o.C5392bsF;
import o.InterfaceC13391fZD;
import o.InterfaceC9328dhf;
import o.MYp;
import o.fJJ;
import o.fLJ;
import o.nMh;
import o.pug;
import org.jmrtd.cbeff.ISO781611;
/* loaded from: classes5.dex */
public class HmlNTBPersonalInfoFragment extends Hilt_HmlNTBPersonalInfoFragment implements InterfaceC9328dhf {
@BindView
CheckBox addressCheckbox;
@BindView
RelativeLayout addressCheckboxView;
@BindView
DateInputText birthDateInput;
@BindView
ProgressStateBar breadcrumbsNtb;
@BindView
View dateOfBirthArea;
@BindView
DateInputWithoutError expiryDate;
@BindView
CommonInputViewGroup firstNameEnglish;
@BindView
LinearLayout homeAddressArea;
@BindView
TextView homeAddressError;
@BindView
View homeAddressLayout;
@BindView
TextView homeAddressTitle;
@BindView
TextView homeView;
@BindView
DateInputWithoutError issueDate;
@BindView
TextView issueExpiryDateError;
@BindView
CommonInputViewGroup lastNameEnglish;
@BindView
LinearLayout llNTBDatesSection;
@BindView
RelativeLayout mailingAddressLayout;
@BindView
ImageView nationalIdCard;
@BindView
CommonInputViewGroup nationalIdInput;
@InterfaceC13391fZD
public C5392bsF presenter;
@BindView
TextView titleError;
@BindView
CustomSpinnerWithTitle titleSpinner;
public static HmlNTBPersonalInfoFragment k() {
return new HmlNTBPersonalInfoFragment();
}
@Override // com.scb.phone.view.fragment.hml.HmlBasePersonalInfoFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View onCreateView = super.onCreateView(layoutInflater, viewGroup, bundle);
this.presenter.e((C5392bsF) this);
this.presenter.b();
((HmlBasePersonalInfoFragment) this).d = this.presenter;
this.nationalIdCard.setImageResource(R.drawable.national_id_ntb_personal_info);
this.titleSpinner.setVisibility(0);
this.firstNameEnglish.setVisibility(0);
this.lastNameEnglish.setVisibility(0);
this.birthDateInput.setVisibility(0);
this.nationalIdInput.setVisibility(0);
this.llNTBDatesSection.setVisibility(0);
this.issueDate.setVisibility(0);
this.expiryDate.setVisibility(0);
this.homeAddressTitle.setVisibility(0);
this.homeAddressLayout.setVisibility(0);
this.addressCheckboxView.setVisibility(0);
this.mobileNumberOtpMsg.setVisibility(0);
this.breadcrumbsNtb.setStates(Arrays.asList(getResources().getStringArray(R.array.2130903050)));
this.breadcrumbsNtb.setVisibility(0);
this.breadcrumbsNtb.setCurrentState(0);
A();
D();
this.firstNameEnglish.clearFocus();
this.firstNameEnglish.mEditText.setInputType(524432);
this.firstNameEnglish.mEditText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(ISO781611.BIOMETRIC_SUBTYPE_TAG)});
b(this.firstNameEnglish, AbstractC5071bmC.HBt.FIRST_NAME_ENGLISH);
this.lastNameEnglish.clearFocus();
this.lastNameEnglish.mEditText.setInputType(524432);
this.lastNameEnglish.mEditText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(30)});
b(this.lastNameEnglish, AbstractC5071bmC.HBt.LAST_NAME_ENGLISH);
this.homeAddressArea.setVisibility(0);
this.homeView.addTextChangedListener(new LWm(this, (byte) 0));
this.homeView.clearFocus();
this.dateOfBirthArea.setVisibility(0);
this.birthDateInput.setDateUpdatedListener(new DateInputText.Sts(this) { // from class: o.fcR
private HmlNTBPersonalInfoFragment a;
@Override // com.scb.phone.view.custom.common.DateInputText.Sts
public final void c(String str) {
HmlNTBPersonalInfoFragment.f(this.a, str);
}
{
this.a = this;
}
});
this.birthDateInput.setValidateInputListener(new ClearableEditText.RVV(this) { // from class: o.fcO
private HmlNTBPersonalInfoFragment a;
@Override // com.scb.phone.view.custom.common.ClearableEditText.RVV
public final boolean c(String str) {
boolean d;
d = this.a.presenter.d(str);
return d;
}
{
this.a = this;
}
});
this.issueDate.setDateUpdatedListener(new DateInputText.Sts(this) { // from class: o.fcP
private HmlNTBPersonalInfoFragment e;
@Override // com.scb.phone.view.custom.common.DateInputText.Sts
public final void c(String str) {
HmlNTBPersonalInfoFragment.a(this.e, str);
}
{
this.e = this;
}
});
this.issueDate.setValidateInputListener(new ClearableEditText.RVV(this) { // from class: o.fcQ
private HmlNTBPersonalInfoFragment c;
@Override // com.scb.phone.view.custom.common.ClearableEditText.RVV
public final boolean c(String str) {
boolean d;
d = this.c.presenter.d(str);
return d;
}
{
this.c = this;
}
});
this.expiryDate.setDateUpdatedListener(new C13555fcY(this));
this.expiryDate.setValidateInputListener(new C13553fcW(this));
CommonInputViewGroup commonInputViewGroup = this.nationalIdInput;
commonInputViewGroup.e = false;
commonInputViewGroup.mEditClearImageButton.setVisibility(8);
this.nationalIdInput.mEditText.setInputType(2);
this.nationalIdInput.mEditText.setKeyListener(DigitsKeyListener.getInstance("1234567890-"));
this.nationalIdInput.setOnPasteListener(new CustomEditText.IeS(this) { // from class: o.fcV
private HmlNTBPersonalInfoFragment a;
@Override // com.scb.phone.view.custom.common.CustomEditText.IeS
public final boolean e(CustomEditText customEditText, String str) {
return HmlNTBPersonalInfoFragment.j(this.a, str);
}
{
this.a = this;
}
});
CommonInputViewGroup commonInputViewGroup2 = this.nationalIdInput;
fLJ flj = new fLJ(commonInputViewGroup2.mEditText, "X-XXXX-XXXXX-XX-X", new fLJ.Sts(this) { // from class: o.fcX
private HmlNTBPersonalInfoFragment c;
@Override // o.fLJ.Sts
public final String c(String str) {
String e;
e = this.c.presenter.e(str);
return e;
}
{
this.c = this;
}
});
flj.b = new fLJ.IeS(this) { // from class: com.scb.phone.view.fragment.hml.HmlNTBPersonalInfoFragment.5
private HmlNTBPersonalInfoFragment d;
AnonymousClass5(HmlNTBPersonalInfoFragment this) {
this.d = this;
}
@Override // o.fLJ.IeS
public final void b(String str) {
this.d.presenter.b(str);
}
@Override // o.fLJ.IeS
public final void e(String str) {
this.d.presenter.b(str);
}
};
flj.e = true;
commonInputViewGroup2.mEditText.addTextChangedListener(flj);
commonInputViewGroup2.d.add(flj);
this.mailingView.setHint(R.string.hml_personal_info_mailing_address_hint);
return onCreateView;
}
@Override // com.scb.phone.view.fragment.hml.HmlBasePersonalInfoFragment
protected final void B() {
this.expiryDate.setDateUpdatedListener(new C13555fcY(this));
this.expiryDate.setValidateInputListener(new C13553fcW(this));
}
@Override // com.scb.phone.view.fragment.hml.HmlBasePersonalInfoFragment
protected final void b(CommonInputViewGroup commonInputViewGroup, AbstractC5071bmC.HBt hBt) {
commonInputViewGroup.setOnBackListener(new CustomEditText.LWm(this) { // from class: o.fcU
private HmlNTBPersonalInfoFragment a;
@Override // com.scb.phone.view.custom.common.CustomEditText.LWm
public final void a() {
HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment = this.a;
hmlNTBPersonalInfoFragment.root.setFocusable(true);
hmlNTBPersonalInfoFragment.root.setFocusableInTouchMode(true);
hmlNTBPersonalInfoFragment.root.requestFocus();
}
{
this.a = this;
}
});
commonInputViewGroup.setOnEditorActionListener(new TextView.OnEditorActionListener(this) { // from class: o.fdb
private HmlNTBPersonalInfoFragment e;
@Override // android.widget.TextView.OnEditorActionListener
public final boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
return HmlNTBPersonalInfoFragment.d(this.e, i);
}
{
this.e = this;
}
});
commonInputViewGroup.setFocusListener(new View.OnFocusChangeListener(this, hBt, commonInputViewGroup) { // from class: o.fdd
private CommonInputViewGroup a;
private HmlNTBPersonalInfoFragment d;
private AbstractC5071bmC.HBt e;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
this.d.presenter.c(this.e, r1.mEditText.getText().toString(), this.a.a, z);
}
{
this.d = this;
this.e = hBt;
this.a = commonInputViewGroup;
}
});
}
@OnCheckedChanged
public void addressCheckboxCheckedChange() {
this.presenter.e(this.addressCheckbox.isChecked());
}
@Override // o.InterfaceC9328dhf
public final void i() {
this.mailingArrow.setEnabled(true);
this.mailingView.setEnabled(true);
this.mailingView.setText(getString(R.string.hml_personal_info_mailing_address_hint));
this.mailingView.setTextColor(nMh.getColor(getContext(), R.color.f3092131099816));
}
@Override // o.InterfaceC9249dgE
public final void c() {
this.presenter.c(this.firstNameView.mEditText.getText().toString(), this.lastNameView.mEditText.getText().toString(), this.firstNameEnglish.mEditText.getText().toString(), this.lastNameEnglish.mEditText.getText().toString(), this.nationalIdInput.mEditText.getText().toString(), this.laserIdInput.c(), this.mobileNumberView.mEditText.getText().toString(), this.emailView.mEditText.getText().toString(), this.addressCheckbox.isChecked(), this.income.getText().toString(), ((MYp) this.titleSpinner.c.e()).c.getSelectedItemPosition(), this.titleSpinner.c(), this.birthDateInput.inputEditText.getText().toString(), this.issueDate.inputEditText.getText().toString(), this.expiryDate.inputEditText.getText().toString(), this.maritalStatusSpinner.d(), this.residentialStatusSpinner.d(), this.educationLevelSpinner.d());
c("p10x1_ntb_verification_personal_info", new pug("monthly_income", this.income.getText().toString()));
}
@OnClick
public void onHomeClick() {
C5392bsF c5392bsF = this.presenter;
C5392bsF.c(new Object[]{c5392bsF}, 1740425565, -1740425558, System.identityHashCode(c5392bsF));
}
/* renamed from: com.scb.phone.view.fragment.hml.HmlNTBPersonalInfoFragment$5 */
/* loaded from: classes5.dex */
final class AnonymousClass5 implements fLJ.IeS {
private HmlNTBPersonalInfoFragment d;
AnonymousClass5(HmlNTBPersonalInfoFragment this) {
this.d = this;
}
@Override // o.fLJ.IeS
public final void b(String str) {
this.d.presenter.b(str);
}
@Override // o.fLJ.IeS
public final void e(String str) {
this.d.presenter.b(str);
}
}
@Override // o.InterfaceC9328dhf
public final void a(String str) {
this.nationalIdInput.setText(str);
}
@Override // o.InterfaceC9328dhf
public final void a(boolean z) {
if (z) {
CommonInputViewGroup commonInputViewGroup = this.nationalIdInput;
commonInputViewGroup.e = true;
commonInputViewGroup.mEditClearImageButton.setVisibility(0);
} else {
CommonInputViewGroup commonInputViewGroup2 = this.nationalIdInput;
commonInputViewGroup2.e = false;
commonInputViewGroup2.mEditClearImageButton.setVisibility(8);
}
}
@OnClick
public void onAboutClicked(View view) {
startActivity(HmlNTBMonthlyIncomeAboutActivity.agd_(getContext()));
}
@Override // com.scb.phone.view.fragment.hml.HmlBasePersonalInfoFragment, o.InterfaceC9249dgE
public final void a(String str, List<String> list, AbstractC5071bmC.HBt hBt) {
if (hBt != AbstractC5071bmC.HBt.TITLE) {
super.a(str, list, hBt);
} else {
a(this.titleSpinner, str, list, R.string.hml_personal_info_select);
this.titleSpinner.setOnCustomSpinnerWithTitleCompletion(new CustomSpinnerWithTitle.LWm(this, str) { // from class: com.scb.phone.view.fragment.hml.HmlNTBPersonalInfoFragment.1
private HmlNTBPersonalInfoFragment a;
private String e;
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bn_() {
}
AnonymousClass1(HmlNTBPersonalInfoFragment this, String str2) {
this.a = this;
this.e = str2;
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bo_() {
this.a.b(AbstractC5071bmC.HBt.TITLE);
this.a.presenter.c(((MYp) this.a.titleSpinner.c.e()).c.getSelectedItemPosition(), this.e, AbstractC5071bmC.HBt.TITLE);
}
});
}
}
/* renamed from: com.scb.phone.view.fragment.hml.HmlNTBPersonalInfoFragment$1 */
/* loaded from: classes5.dex */
final class AnonymousClass1 implements CustomSpinnerWithTitle.LWm {
private HmlNTBPersonalInfoFragment a;
private String e;
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bn_() {
}
AnonymousClass1(HmlNTBPersonalInfoFragment this, String str2) {
this.a = this;
this.e = str2;
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bo_() {
this.a.b(AbstractC5071bmC.HBt.TITLE);
this.a.presenter.c(((MYp) this.a.titleSpinner.c.e()).c.getSelectedItemPosition(), this.e, AbstractC5071bmC.HBt.TITLE);
}
}
@Override // o.InterfaceC9328dhf
public final void e(String str, String str2) {
this.separator.setVisibility(0);
this.firstNameEnglish.setVisibility(0);
this.lastNameEnglish.setVisibility(0);
CommonInputViewGroup commonInputViewGroup = this.firstNameEnglish;
if (str != null && !str.isEmpty()) {
commonInputViewGroup.setText(str);
}
CommonInputViewGroup commonInputViewGroup2 = this.lastNameEnglish;
if (str2 == null || str2.isEmpty()) {
return;
}
commonInputViewGroup2.setText(str2);
}
@Override // o.InterfaceC9328dhf
public final void o() {
this.mailingView.setTextColor(nMh.getColor(getContext(), R.color.f3092131099816));
this.mailingView.setText(this.homeView.getText());
}
@Override // o.InterfaceC9328dhf
public final void d(String str) {
this.titleSpinner.setDisabledText(str);
}
/* renamed from: com.scb.phone.view.fragment.hml.HmlNTBPersonalInfoFragment$2 */
/* loaded from: classes5.dex */
static /* synthetic */ class AnonymousClass2 {
static final int[] e;
static {
int[] iArr = new int[AbstractC5071bmC.HBt.values().length];
e = iArr;
try {
iArr[AbstractC5071bmC.HBt.TITLE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
e[AbstractC5071bmC.HBt.FIRST_NAME.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
e[AbstractC5071bmC.HBt.LAST_NAME.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
e[AbstractC5071bmC.HBt.HOME_ADDRESS.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
e[AbstractC5071bmC.HBt.MAILING_ADDRESS.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
e[AbstractC5071bmC.HBt.EMAIL.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
e[AbstractC5071bmC.HBt.NATIONAL_ID.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
e[AbstractC5071bmC.HBt.LASER_ID.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
e[AbstractC5071bmC.HBt.EXPIRY_DATE.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
e[AbstractC5071bmC.HBt.BIRTH_DATE.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
try {
e[AbstractC5071bmC.HBt.ISSUE_DATE.ordinal()] = 11;
} catch (NoSuchFieldError unused11) {
}
try {
e[AbstractC5071bmC.HBt.FIRST_NAME_ENGLISH.ordinal()] = 12;
} catch (NoSuchFieldError unused12) {
}
try {
e[AbstractC5071bmC.HBt.LAST_NAME_ENGLISH.ordinal()] = 13;
} catch (NoSuchFieldError unused13) {
}
try {
e[AbstractC5071bmC.HBt.RESIDENCE_TYPE.ordinal()] = 14;
} catch (NoSuchFieldError unused14) {
}
try {
e[AbstractC5071bmC.HBt.MOBILE_NUMBER.ordinal()] = 15;
} catch (NoSuchFieldError unused15) {
}
}
}
@Override // o.InterfaceC9328dhf
public final void e(AbstractC5071bmC.HBt hBt) {
switch (AnonymousClass2.e[hBt.ordinal()]) {
case 1:
this.titleSpinner.setEnabled(false);
return;
case 2:
this.firstNameView.setEnabled(false);
return;
case 3:
this.lastNameView.setEnabled(false);
return;
case 4:
default:
return;
case 5:
this.mailingView.setEnabled(false);
this.mailingView.setTextColor(nMh.getColor(getContext(), R.color.f3092131099816));
this.mailingArrow.setEnabled(false);
return;
case 6:
this.emailView.setEnabled(false);
return;
case 7:
this.nationalIdInput.setEnabled(false);
return;
case 8:
this.laserIdInput.setEnabled(false);
return;
case 9:
this.expiryDate.setEnabled(false);
return;
case 10:
this.birthDateInput.setEnabled(false);
return;
case 11:
this.issueDate.setEnabled(false);
return;
case 12:
this.firstNameEnglish.setEnabled(false);
return;
case 13:
this.lastNameEnglish.setEnabled(false);
return;
}
}
@Override // o.InterfaceC9328dhf
public final void f() {
if (getContext() != null) {
HmlNTBeKYCLandingActivity.IeS ieS = HmlNTBeKYCLandingActivity.l;
Context context = getContext();
C14957gcv.e(context, "");
startActivity(new Intent(context, (Class<?>) HmlNTBeKYCLandingActivity.class));
}
}
@Override // com.scb.phone.view.fragment.hml.HmlBasePersonalInfoFragment, o.InterfaceC9249dgE
public final void a(AbstractC5071bmC.HBt hBt) {
int i = AnonymousClass2.e[hBt.ordinal()];
if (i == 4) {
this.homeAddressError.setVisibility(0);
return;
}
if (i == 7) {
this.nationalIdInput.setErrorText(getString(R.string.auto_personal_id_card_info_error_invalid));
this.nationalIdInput.c();
return;
}
switch (i) {
case 9:
this.expiryDate.setHighlight(true);
this.issueExpiryDateError.setVisibility(0);
return;
case 10:
this.birthDateInput.setErrorText(getString(R.string.hml_personal_info_date_birth_error));
this.birthDateInput.setErrorVisible(true);
return;
case 11:
this.issueDate.setHighlight(true);
this.issueExpiryDateError.setVisibility(0);
return;
case 12:
this.firstNameEnglish.setErrorText(getString(R.string.hml_personal_info_first_name_eng_only));
this.firstNameEnglish.c();
return;
case 13:
this.lastNameEnglish.setErrorText(getString(R.string.hml_personal_info_last_name_eng_only));
this.lastNameEnglish.c();
return;
case 14:
return;
case 15:
this.mobileNumberOtpMsg.setVisibility(8);
this.mobileNumberView.setErrorText(getString(R.string.hml_personal_info_invalid_format));
this.mobileNumberView.c();
return;
default:
super.a(hBt);
return;
}
}
@Override // com.scb.phone.view.fragment.hml.HmlBasePersonalInfoFragment, o.InterfaceC9249dgE
public final void b(AbstractC5071bmC.HBt hBt) {
int i = AnonymousClass2.e[hBt.ordinal()];
if (i == 1) {
this.titleError.setVisibility(8);
this.titleSpinner.setSpinnerBackground(false);
return;
}
if (i == 4) {
this.homeAddressError.setVisibility(8);
return;
}
if (i == 7) {
this.nationalIdInput.e();
return;
}
if (i != 15) {
switch (i) {
case 9:
this.issueDate.setErrorVisible(false);
this.expiryDate.setErrorVisible(false);
this.expiryDate.setHighlight(false);
this.presenter.b(this.issueDate.inputEditText.getText().toString(), this.expiryDate.inputEditText.getText().toString());
return;
case 10:
this.birthDateInput.setErrorVisible(false);
return;
case 11:
this.issueDate.setErrorVisible(false);
this.expiryDate.setErrorVisible(false);
this.issueDate.setHighlight(false);
this.presenter.b(this.issueDate.inputEditText.getText().toString(), this.expiryDate.inputEditText.getText().toString());
return;
case 12:
this.firstNameEnglish.e();
return;
case 13:
this.lastNameEnglish.e();
return;
default:
super.b(hBt);
return;
}
}
this.mobileNumberView.e();
this.mobileNumberOtpMsg.setVisibility(0);
}
@Override // o.InterfaceC9328dhf
public final void n() {
this.issueExpiryDateError.setVisibility(8);
}
@Override // o.InterfaceC9328dhf
public final void c(String str) {
this.homeView.setText(str);
}
@Override // o.InterfaceC9328dhf
public final void l() {
startActivityForResult(HmlHomeAddressActivity.afT_(getContext()), PaFaceConstants.MotionType.BLINK_EYE);
}
@Override // com.scb.phone.view.fragment.hml.HmlBasePersonalInfoFragment, o.InterfaceC9249dgE
public final void c(AbstractC5071bmC.HBt hBt) {
int i = AnonymousClass2.e[hBt.ordinal()];
if (i == 1) {
this.titleError.setText(getString(R.string.hml_personal_info_title_empty));
this.titleError.setVisibility(0);
this.titleSpinner.setSpinnerBackground(true);
return;
}
if (i == 7) {
this.nationalIdInput.setErrorText(getString(R.string.hml_personal_info_empty_field));
this.nationalIdInput.c();
return;
}
if (i != 15) {
switch (i) {
case 9:
case 11:
this.issueExpiryDateError.setVisibility(0);
return;
case 10:
this.birthDateInput.setErrorText(getString(R.string.hml_personal_info_empty_field));
this.birthDateInput.setErrorVisible(true);
return;
case 12:
this.firstNameEnglish.setErrorText(getString(R.string.hml_personal_info_empty_field));
this.firstNameEnglish.c();
return;
case 13:
this.lastNameEnglish.setErrorText(getString(R.string.hml_personal_info_empty_field));
this.lastNameEnglish.c();
return;
default:
super.c(hBt);
return;
}
}
this.mobileNumberView.setErrorText(getString(R.string.hml_personal_info_empty_field));
this.mobileNumberOtpMsg.setVisibility(8);
this.mobileNumberView.c();
}
@Override // o.InterfaceC9249dgE
public final void a() {
if (getContext() != null) {
startActivity(HmlNTBPersonalInfoActivity.age_(getContext()));
}
}
/* loaded from: classes5.dex */
class LWm extends fJJ {
private HmlNTBPersonalInfoFragment e;
private LWm(HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment) {
this.e = hmlNTBPersonalInfoFragment;
}
@Override // o.fJJ, android.text.TextWatcher
public final void afterTextChanged(Editable editable) {
this.e.presenter.a(AbstractC5071bmC.HBt.HOME_ADDRESS, !TextUtils.isEmpty(editable.toString()));
}
/* synthetic */ LWm(HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment, byte b) {
this(hmlNTBPersonalInfoFragment);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onActivityResult(int i, int i2, Intent intent) {
if (i == 1002 && i2 == -1 && intent != null) {
C5392bsF c5392bsF = this.presenter;
String stringExtra = intent.getStringExtra("com.scb.phone.EXTRA_RESULT_ADDRESS");
C5087bmS c5087bmS = new C5087bmS(stringExtra);
if (c5392bsF.f != 0) {
c5087bmS.e(c5392bsF.f);
}
c5392bsF.c(AbstractC5071bmC.HBt.MAILING_ADDRESS, !stringExtra.isEmpty(), TextUtils.isEmpty(stringExtra));
}
if (i == 1003 && i2 == -1 && intent != null) {
this.presenter.b(this.sameAddressCheckBox.isChecked(), intent.getStringExtra("com.scb.phone.EXTRA_RESULT_ADDRESS"));
}
super.onActivityResult(i, i2, intent);
}
public static /* synthetic */ void a(HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment, String str) {
C5392bsF c5392bsF = hmlNTBPersonalInfoFragment.presenter;
c5392bsF.c(AbstractC5071bmC.HBt.ISSUE_DATE, c5392bsF.d(str), TextUtils.isEmpty(str));
}
public static /* synthetic */ void d(HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment, String str) {
C5392bsF c5392bsF = hmlNTBPersonalInfoFragment.presenter;
c5392bsF.c(AbstractC5071bmC.HBt.EXPIRY_DATE, c5392bsF.d(str), TextUtils.isEmpty(str));
}
public static /* synthetic */ boolean d(HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment, int i) {
if (i != 6) {
return false;
}
hmlNTBPersonalInfoFragment.root.setFocusable(true);
hmlNTBPersonalInfoFragment.root.setFocusableInTouchMode(true);
hmlNTBPersonalInfoFragment.root.requestFocus();
hmlNTBPersonalInfoFragment.aN_();
return false;
}
public static /* synthetic */ boolean j(HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment, String str) {
hmlNTBPersonalInfoFragment.presenter.c(str);
return true;
}
public static /* synthetic */ void f(HmlNTBPersonalInfoFragment hmlNTBPersonalInfoFragment, String str) {
C5392bsF c5392bsF = hmlNTBPersonalInfoFragment.presenter;
c5392bsF.c(AbstractC5071bmC.HBt.BIRTH_DATE, c5392bsF.d(str), TextUtils.isEmpty(str));
}
@Override // o.InterfaceC9328dhf
public final void e(C0748Nr c0748Nr) {
String str = c0748Nr.k;
CustomPhoneNumberInput customPhoneNumberInput = this.mobileNumberView;
if (str != null && !str.isEmpty()) {
customPhoneNumberInput.setText(str);
}
String str2 = c0748Nr.d;
CommonInputViewGroup commonInputViewGroup = this.emailView;
if (str2 != null && !str2.isEmpty()) {
commonInputViewGroup.setText(str2);
}
String str3 = c0748Nr.g;
if (!TextUtils.isEmpty(str3)) {
this.income.setText(str3);
}
if (!TextUtils.isEmpty(c0748Nr.e)) {
this.expiryDate.setText(c0748Nr.e);
}
if (!TextUtils.isEmpty(c0748Nr.h)) {
this.issueDate.setText(c0748Nr.h);
}
if (!TextUtils.isEmpty(c0748Nr.b)) {
this.birthDateInput.setText(c0748Nr.b);
}
this.mailingView.setText(c0748Nr.j);
this.mailingView.setTextColor(nMh.getColor(getContext(), R.color.f2982131099805));
this.homeView.setText(c0748Nr.i);
if (!TextUtils.isEmpty(c0748Nr.f)) {
this.laserIdInput.setLaserId(c0748Nr.f);
}
if (!TextUtils.isEmpty(c0748Nr.l)) {
String str4 = c0748Nr.l;
CommonInputViewGroup commonInputViewGroup2 = this.nationalIdInput;
if (str4 != null && !str4.isEmpty()) {
commonInputViewGroup2.setText(str4);
}
}
this.addressCheckbox.setChecked(c0748Nr.m.booleanValue());
}
}