what-the-bank/sources/com/scb/phone/view/fragment/juristic/JuristicRequestFormFragment...

488 lines
16 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.juristic;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.juristic.JuristicRequestFormSuccessfulActivity;
import com.scb.phone.view.custom.common.CommonInputViewGroup;
import com.scb.phone.view.custom.common.CustomEditText;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.juristic.JuristicRequestFormFragment;
import o.AbstractC14961gcz;
import o.C14957gcv;
import o.C17674ynA;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC9436djh;
import o.QW;
import o.ZI;
import o.bLM;
import o.bLN;
import o.fSQ;
import o.fZZ;
import o.gdZ;
import o.syn;
/* loaded from: classes5.dex */
public final class JuristicRequestFormFragment extends Hilt_JuristicRequestFormFragment implements InterfaceC9436djh {
public static final Sts c = new Sts(0);
@BindView
public Button btSend;
private final View.OnFocusChangeListener d;
private final InterfaceC13393fZL f;
private final TextView.OnEditorActionListener g;
private final CustomEditText.LWm h;
private final View.OnClickListener i;
@BindView
public CommonInputViewGroup ivgEmail;
private final IeS j;
@InterfaceC13391fZD
public bLN presenter;
public JuristicRequestFormFragment() {
LWm lWm = LWm.b;
C14957gcv.e(lWm, "");
this.f = new fZZ(lWm);
this.d = new View.OnFocusChangeListener(this) { // from class: o.flb
private JuristicRequestFormFragment c;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
JuristicRequestFormFragment.c(this.c, z);
}
{
this.c = this;
}
};
this.g = new TextView.OnEditorActionListener(this) { // from class: o.flc
private JuristicRequestFormFragment a;
@Override // android.widget.TextView.OnEditorActionListener
public final boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
return JuristicRequestFormFragment.c(this.a, i);
}
{
this.a = this;
}
};
this.j = new IeS(this);
this.h = new CustomEditText.LWm(this) { // from class: o.fle
private JuristicRequestFormFragment c;
@Override // com.scb.phone.view.custom.common.CustomEditText.LWm
public final void a() {
JuristicRequestFormFragment.a(this.c);
}
{
this.c = this;
}
};
this.i = new View.OnClickListener(this) { // from class: o.flh
private JuristicRequestFormFragment c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
JuristicRequestFormFragment.b(this.c);
}
{
this.c = this;
}
};
}
/* 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.2131559738, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
bLN bln = this.presenter;
bLN bln2 = null;
if (bln == null) {
C14957gcv.a("");
bln = null;
}
bln.e((bLN) this);
CommonInputViewGroup commonInputViewGroup = this.ivgEmail;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
commonInputViewGroup.e = false;
commonInputViewGroup.mEditClearImageButton.setVisibility(8);
CommonInputViewGroup commonInputViewGroup2 = this.ivgEmail;
if (commonInputViewGroup2 == null) {
C14957gcv.a("");
commonInputViewGroup2 = null;
}
commonInputViewGroup2.setFocusListener(this.d);
CommonInputViewGroup commonInputViewGroup3 = this.ivgEmail;
if (commonInputViewGroup3 == null) {
C14957gcv.a("");
commonInputViewGroup3 = null;
}
commonInputViewGroup3.setOnEditorActionListener(this.g);
CommonInputViewGroup commonInputViewGroup4 = this.ivgEmail;
if (commonInputViewGroup4 == null) {
C14957gcv.a("");
commonInputViewGroup4 = null;
}
IeS ieS = this.j;
commonInputViewGroup4.mEditText.addTextChangedListener(ieS);
commonInputViewGroup4.d.add(ieS);
CommonInputViewGroup commonInputViewGroup5 = this.ivgEmail;
if (commonInputViewGroup5 == null) {
C14957gcv.a("");
commonInputViewGroup5 = null;
}
commonInputViewGroup5.setOnBackListener(this.h);
Button button = this.btSend;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setOnClickListener(this.i);
bLN bln3 = this.presenter;
if (bln3 != null) {
bln2 = bln3;
} else {
C14957gcv.a("");
}
final String u = bln2.a.b.u();
if (u == null) {
u = "";
}
if (!gdZ.d((CharSequence) u)) {
ZI.IeS ieS2 = new ZI.IeS(u) { // from class: o.bLU
private String c;
@Override // o.ZI.IeS
public final void e(Object obj) {
bLN.e(this.c, (InterfaceC9436djh) obj);
}
{
this.c = u;
}
};
if (bln2.f != 0) {
ieS2.e(bln2.f);
}
C14957gcv.e(u, "");
bLM blm = new bLM(bln2, u);
if (bln2.f != 0) {
blm.e(bln2.f);
}
}
syn synVar = (syn) this.f.e();
if (getActivity() != null) {
synVar.c(((BaseActivity) getActivity()).scbAnalytics, "juristic_enter_email");
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
CommonInputViewGroup commonInputViewGroup = this.ivgEmail;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
commonInputViewGroup.setFocusListener(null);
super.onDestroyView();
}
@Override // o.InterfaceC9436djh
public final void d(String str) {
C14957gcv.e(str, "");
CommonInputViewGroup commonInputViewGroup = this.ivgEmail;
CommonInputViewGroup commonInputViewGroup2 = null;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
if (str.length() > 0) {
CommonInputViewGroup commonInputViewGroup3 = this.ivgEmail;
if (commonInputViewGroup3 != null) {
commonInputViewGroup2 = commonInputViewGroup3;
} else {
C14957gcv.a("");
}
commonInputViewGroup2.e = true;
commonInputViewGroup2.mEditClearImageButton.setVisibility(0);
} else {
CommonInputViewGroup commonInputViewGroup4 = this.ivgEmail;
if (commonInputViewGroup4 != null) {
commonInputViewGroup2 = commonInputViewGroup4;
} else {
C14957gcv.a("");
}
commonInputViewGroup2.e = false;
commonInputViewGroup2.mEditClearImageButton.setVisibility(8);
}
commonInputViewGroup.setText(str);
}
@Override // o.InterfaceC9436djh
public final void e(boolean z) {
CommonInputViewGroup commonInputViewGroup = null;
if (z) {
Button button = this.btSend;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setEnabled(true);
CommonInputViewGroup commonInputViewGroup2 = this.ivgEmail;
if (commonInputViewGroup2 != null) {
commonInputViewGroup = commonInputViewGroup2;
} else {
C14957gcv.a("");
}
commonInputViewGroup.e();
return;
}
Button button2 = this.btSend;
if (button2 == null) {
C14957gcv.a("");
button2 = null;
}
button2.setEnabled(false);
CommonInputViewGroup commonInputViewGroup3 = this.ivgEmail;
if (commonInputViewGroup3 != null) {
commonInputViewGroup = commonInputViewGroup3;
} else {
C14957gcv.a("");
}
commonInputViewGroup.c();
}
@Override // o.InterfaceC9436djh
public final void b(QW qw) {
C14957gcv.e(qw, "");
Context context = getContext();
if (context != null) {
JuristicRequestFormSuccessfulActivity.LWm lWm = JuristicRequestFormSuccessfulActivity.f7523o;
C14957gcv.e(context, "");
C14957gcv.e(qw, "");
Intent intent = new Intent(context, (Class<?>) JuristicRequestFormSuccessfulActivity.class);
intent.putExtra("DISPLAY", qw);
context.startActivity(intent);
}
}
/* loaded from: classes5.dex */
public static final class IeS implements TextWatcher {
private JuristicRequestFormFragment e;
@Override // android.text.TextWatcher
public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
IeS(JuristicRequestFormFragment juristicRequestFormFragment) {
this.e = juristicRequestFormFragment;
}
@Override // android.text.TextWatcher
public final void afterTextChanged(Editable editable) {
JuristicRequestFormFragment.d(this.e);
}
@Override // android.text.TextWatcher
public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
if (charSequence != null) {
JuristicRequestFormFragment juristicRequestFormFragment = this.e;
CommonInputViewGroup commonInputViewGroup = null;
if (charSequence.length() > 0) {
CommonInputViewGroup commonInputViewGroup2 = juristicRequestFormFragment.ivgEmail;
if (commonInputViewGroup2 != null) {
commonInputViewGroup = commonInputViewGroup2;
} else {
C14957gcv.a("");
}
commonInputViewGroup.e = true;
commonInputViewGroup.mEditClearImageButton.setVisibility(0);
return;
}
CommonInputViewGroup commonInputViewGroup3 = juristicRequestFormFragment.ivgEmail;
if (commonInputViewGroup3 != null) {
commonInputViewGroup = commonInputViewGroup3;
} else {
C14957gcv.a("");
}
commonInputViewGroup.e = false;
commonInputViewGroup.mEditClearImageButton.setVisibility(8);
}
}
}
/* loaded from: classes5.dex */
static final class LWm extends AbstractC14961gcz implements InterfaceC14890gbN<syn> {
public static final LWm b = new LWm();
@Override // o.InterfaceC14890gbN
public final /* synthetic */ syn invoke() {
return new syn();
}
LWm() {
super(0);
}
}
public static /* synthetic */ void a(JuristicRequestFormFragment juristicRequestFormFragment) {
C14957gcv.e(juristicRequestFormFragment, "");
CommonInputViewGroup commonInputViewGroup = juristicRequestFormFragment.ivgEmail;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
commonInputViewGroup.clearFocus();
}
public static /* synthetic */ void c(JuristicRequestFormFragment juristicRequestFormFragment, boolean z) {
C14957gcv.e(juristicRequestFormFragment, "");
if (z) {
return;
}
bLN bln = juristicRequestFormFragment.presenter;
CommonInputViewGroup commonInputViewGroup = null;
if (bln == null) {
C14957gcv.a("");
bln = null;
}
CommonInputViewGroup commonInputViewGroup2 = juristicRequestFormFragment.ivgEmail;
if (commonInputViewGroup2 != null) {
commonInputViewGroup = commonInputViewGroup2;
} else {
C14957gcv.a("");
}
String obj = commonInputViewGroup.mEditText.getText().toString();
C14957gcv.c((Object) obj, "");
C14957gcv.e(obj, "");
bLM blm = new bLM(bln, obj);
if (bln.f != 0) {
blm.e(bln.f);
}
}
public static /* synthetic */ void b(JuristicRequestFormFragment juristicRequestFormFragment) {
C14957gcv.e(juristicRequestFormFragment, "");
final bLN bln = juristicRequestFormFragment.presenter;
CommonInputViewGroup commonInputViewGroup = null;
if (bln == null) {
C14957gcv.a("");
bln = null;
}
CommonInputViewGroup commonInputViewGroup2 = juristicRequestFormFragment.ivgEmail;
if (commonInputViewGroup2 != null) {
commonInputViewGroup = commonInputViewGroup2;
} else {
C14957gcv.a("");
}
String obj = commonInputViewGroup.mEditText.getText().toString();
C14957gcv.c((Object) obj, "");
C14957gcv.e(obj, "");
if (bln.f != 0) {
bln.f.y();
}
C17674ynA c17674ynA = bln.c;
C14957gcv.e(obj, "");
bln.c.d(c17674ynA.e.e(obj), new fSQ(bln) { // from class: o.bLO
private bLN d;
@Override // o.fSQ
public final void c(Object obj2) {
bLN.c(this.d, (QpB) obj2);
}
{
this.d = bln;
}
}, new fSQ(bln) { // from class: o.bLP
private bLN a;
@Override // o.fSQ
public final void c(Object obj2) {
r0.d(this.a.j.e((Throwable) obj2));
}
{
this.a = bln;
}
});
}
public static /* synthetic */ boolean c(JuristicRequestFormFragment juristicRequestFormFragment, int i) {
C14957gcv.e(juristicRequestFormFragment, "");
if (i != 6) {
return false;
}
CommonInputViewGroup commonInputViewGroup = juristicRequestFormFragment.ivgEmail;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
commonInputViewGroup.clearFocus();
juristicRequestFormFragment.aN_();
return true;
}
public static final /* synthetic */ void d(JuristicRequestFormFragment juristicRequestFormFragment) {
bLN bln = juristicRequestFormFragment.presenter;
CommonInputViewGroup commonInputViewGroup = null;
if (bln == null) {
C14957gcv.a("");
bln = null;
}
CommonInputViewGroup commonInputViewGroup2 = juristicRequestFormFragment.ivgEmail;
if (commonInputViewGroup2 != null) {
commonInputViewGroup = commonInputViewGroup2;
} else {
C14957gcv.a("");
}
String obj = commonInputViewGroup.mEditText.getText().toString();
C14957gcv.c((Object) obj, "");
C14957gcv.e(obj, "");
bLM blm = new bLM(bln, obj);
if (bln.f != 0) {
blm.e(bln.f);
}
}
}