495 lines
17 KiB
Java
495 lines
17 KiB
Java
|
package com.scb.phone.view.fragment.directdebit;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.os.Bundle;
|
||
|
import android.text.InputFilter;
|
||
|
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 butterknife.OnClick;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.directdebit.DirectDebitReviewActivity;
|
||
|
import com.scb.phone.view.custom.ScbEditText;
|
||
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayBiller;
|
||
|
import com.scb.phone.view.fragment.directdebit.DirectDebitInputSelectedFragment;
|
||
|
import com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment;
|
||
|
import com.scb.phone.view.fragment.transferandpay.billpaymenttab.BillPaymentBillerSelectedFragment;
|
||
|
import java.util.concurrent.TimeUnit;
|
||
|
import o.AbstractC13163fSk;
|
||
|
import o.AbstractC14961gcz;
|
||
|
import o.C1193Xr;
|
||
|
import o.C12919fLP;
|
||
|
import o.C13417fZt;
|
||
|
import o.C14866gag;
|
||
|
import o.C14957gcv;
|
||
|
import o.C1838aPr;
|
||
|
import o.InterfaceC12846fIu;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC14894gbR;
|
||
|
import o.InterfaceC16541pFg;
|
||
|
import o.InterfaceC9235dfr;
|
||
|
import o.InterfaceC9663dnz;
|
||
|
import o.JD;
|
||
|
import o.JE;
|
||
|
import o.WW;
|
||
|
import o.fRR;
|
||
|
import o.fSJ;
|
||
|
import o.fSQ;
|
||
|
import o.guQ;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class DirectDebitInputSelectedFragment extends Hilt_DirectDebitInputSelectedFragment implements InterfaceC12846fIu, InterfaceC9235dfr.IeS, AccountSourceSelectFragment.Sts {
|
||
|
public static final Sts c = new Sts(0);
|
||
|
private String d;
|
||
|
private InterfaceC9663dnz.RVV f;
|
||
|
private String h;
|
||
|
private fSJ j;
|
||
|
|
||
|
@BindView
|
||
|
public Button mButton;
|
||
|
|
||
|
@BindView
|
||
|
public CustomTransferAndPayBiller mCustomTransferAndPayBiller;
|
||
|
|
||
|
@BindView
|
||
|
public ScbEditText mReferenceEditText1;
|
||
|
|
||
|
@BindView
|
||
|
public ScbEditText mReferenceEditText2;
|
||
|
|
||
|
@BindView
|
||
|
public TextView mReferenceTextView1;
|
||
|
|
||
|
@BindView
|
||
|
public TextView mReferenceTextView2;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C1838aPr presenter;
|
||
|
|
||
|
/* 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, "");
|
||
|
super.onCreateView(layoutInflater, viewGroup, bundle);
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559566, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
C1838aPr c1838aPr = this.presenter;
|
||
|
Button button = null;
|
||
|
if (c1838aPr == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1838aPr = null;
|
||
|
}
|
||
|
c1838aPr.e((C1838aPr) this);
|
||
|
C1838aPr c1838aPr2 = this.presenter;
|
||
|
if (c1838aPr2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1838aPr2 = null;
|
||
|
}
|
||
|
Bundle arguments = getArguments();
|
||
|
C1193Xr c1193Xr = arguments != null ? (C1193Xr) arguments.getParcelable("com.scb.phone.EXTRA_BILL_PAYMENT_DISPLAY") : null;
|
||
|
Bundle arguments2 = getArguments();
|
||
|
c1838aPr2.d(c1193Xr, arguments2 != null ? arguments2.getBoolean("EXTRA_IS_FROM_SCAN") : true);
|
||
|
Bundle arguments3 = getArguments();
|
||
|
if (arguments3 != null && arguments3.containsKey("com.scb.phone.EXTRA_ACCOUNT_SELECTED")) {
|
||
|
Bundle arguments4 = getArguments();
|
||
|
WW ww = arguments4 != null ? (WW) arguments4.getParcelable("com.scb.phone.EXTRA_ACCOUNT_SELECTED") : null;
|
||
|
if (ww != null) {
|
||
|
this.h = ww.s;
|
||
|
this.d = ww.x;
|
||
|
}
|
||
|
}
|
||
|
InputFilter[] inputFilterArr = {new C12919fLP("^[a-zA-Z0-9]+$")};
|
||
|
ScbEditText scbEditText = this.mReferenceEditText1;
|
||
|
if (scbEditText == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText = null;
|
||
|
}
|
||
|
scbEditText.setFilters(inputFilterArr);
|
||
|
ScbEditText scbEditText2 = this.mReferenceEditText2;
|
||
|
if (scbEditText2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText2 = null;
|
||
|
}
|
||
|
scbEditText2.setFilters(inputFilterArr);
|
||
|
ScbEditText scbEditText3 = this.mReferenceEditText1;
|
||
|
if (scbEditText3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText3 = null;
|
||
|
}
|
||
|
scbEditText3.setOnPasteListener(new BillPaymentBillerSelectedFragment.HBt());
|
||
|
ScbEditText scbEditText4 = this.mReferenceEditText2;
|
||
|
if (scbEditText4 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText4 = null;
|
||
|
}
|
||
|
scbEditText4.setOnPasteListener(new BillPaymentBillerSelectedFragment.HBt());
|
||
|
AbstractC13163fSk<Long> observeOn = AbstractC13163fSk.interval(1L, TimeUnit.SECONDS).subscribeOn(C13417fZt.c()).observeOn(fRR.e());
|
||
|
final LWm lWm = new LWm(this);
|
||
|
fSQ<? super Long> fsq = new fSQ(lWm) { // from class: o.eSc
|
||
|
private InterfaceC14894gbR d;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
DirectDebitInputSelectedFragment.a(this.d, obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = lWm;
|
||
|
}
|
||
|
};
|
||
|
final HBt hBt = HBt.e;
|
||
|
fSJ subscribe = observeOn.subscribe(fsq, new fSQ(hBt) { // from class: o.eSd
|
||
|
private InterfaceC14894gbR d;
|
||
|
|
||
|
@Override // o.fSQ
|
||
|
public final void c(Object obj) {
|
||
|
DirectDebitInputSelectedFragment.c(this.d, obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = hBt;
|
||
|
}
|
||
|
});
|
||
|
C14957gcv.c(subscribe, "");
|
||
|
this.j = subscribe;
|
||
|
Button button2 = this.mButton;
|
||
|
if (button2 != null) {
|
||
|
button = button2;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
button.setEnabled(false);
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
|
||
|
public static final HBt e = new HBt();
|
||
|
|
||
|
@Override // o.InterfaceC14894gbR
|
||
|
public final /* synthetic */ C14866gag invoke(Throwable th) {
|
||
|
guQ.a(th);
|
||
|
return C14866gag.c;
|
||
|
}
|
||
|
|
||
|
HBt() {
|
||
|
super(1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR<Long, C14866gag> {
|
||
|
private DirectDebitInputSelectedFragment e;
|
||
|
|
||
|
@Override // o.InterfaceC14894gbR
|
||
|
public final /* synthetic */ C14866gag invoke(Long l) {
|
||
|
DirectDebitInputSelectedFragment.a(this.e);
|
||
|
return C14866gag.c;
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
LWm(DirectDebitInputSelectedFragment directDebitInputSelectedFragment) {
|
||
|
super(1);
|
||
|
this.e = directDebitInputSelectedFragment;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public final void onDestroy() {
|
||
|
C1838aPr c1838aPr = this.presenter;
|
||
|
fSJ fsj = null;
|
||
|
if (c1838aPr == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1838aPr = null;
|
||
|
}
|
||
|
c1838aPr.w_();
|
||
|
fSJ fsj2 = this.j;
|
||
|
if (fsj2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
fsj2 = null;
|
||
|
}
|
||
|
if (!fsj2.isDisposed()) {
|
||
|
fSJ fsj3 = this.j;
|
||
|
if (fsj3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
fsj = fsj3;
|
||
|
}
|
||
|
fsj.dispose();
|
||
|
}
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9235dfr.IeS
|
||
|
public final void c(C1193Xr c1193Xr) {
|
||
|
if (c1193Xr != null) {
|
||
|
CustomTransferAndPayBiller customTransferAndPayBiller = this.mCustomTransferAndPayBiller;
|
||
|
if (customTransferAndPayBiller == null) {
|
||
|
C14957gcv.a("");
|
||
|
customTransferAndPayBiller = null;
|
||
|
}
|
||
|
String str = c1193Xr.h;
|
||
|
if (str == null) {
|
||
|
str = "";
|
||
|
}
|
||
|
customTransferAndPayBiller.setDescription(str);
|
||
|
String e = c1193Xr.e();
|
||
|
if (e == null) {
|
||
|
e = "";
|
||
|
}
|
||
|
customTransferAndPayBiller.setTitle(e);
|
||
|
String c2 = c1193Xr.c();
|
||
|
customTransferAndPayBiller.setAvatar(c2 != null ? c2 : "");
|
||
|
customTransferAndPayBiller.setOnCustomTransferAndPayItemListener(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9235dfr.IeS
|
||
|
public final void e(JE je) {
|
||
|
C14957gcv.e(je, "");
|
||
|
TextView textView = this.mReferenceTextView1;
|
||
|
ScbEditText scbEditText = null;
|
||
|
if (textView == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView = null;
|
||
|
}
|
||
|
textView.setText(je.e);
|
||
|
TextView textView2 = this.mReferenceTextView1;
|
||
|
if (textView2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView2 = null;
|
||
|
}
|
||
|
TextView textView3 = textView2;
|
||
|
boolean z = je.a;
|
||
|
C14957gcv.e(textView3, "");
|
||
|
textView3.setVisibility(z ? 0 : 8);
|
||
|
ScbEditText scbEditText2 = this.mReferenceEditText1;
|
||
|
if (scbEditText2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText2 = null;
|
||
|
}
|
||
|
ScbEditText scbEditText3 = scbEditText2;
|
||
|
boolean z2 = je.a;
|
||
|
C14957gcv.e(scbEditText3, "");
|
||
|
scbEditText3.setVisibility(z2 ? 0 : 8);
|
||
|
ScbEditText scbEditText4 = this.mReferenceEditText1;
|
||
|
if (scbEditText4 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText4 = null;
|
||
|
}
|
||
|
scbEditText4.setEnabled(je.c);
|
||
|
ScbEditText scbEditText5 = this.mReferenceEditText1;
|
||
|
if (scbEditText5 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText5 = null;
|
||
|
}
|
||
|
scbEditText5.setHint(je.b);
|
||
|
ScbEditText scbEditText6 = this.mReferenceEditText1;
|
||
|
if (scbEditText6 != null) {
|
||
|
scbEditText = scbEditText6;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
scbEditText.setText(je.d);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9235dfr.IeS
|
||
|
public final void c(JE je) {
|
||
|
C14957gcv.e(je, "");
|
||
|
TextView textView = this.mReferenceTextView2;
|
||
|
ScbEditText scbEditText = null;
|
||
|
if (textView == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView = null;
|
||
|
}
|
||
|
textView.setText(je.e);
|
||
|
TextView textView2 = this.mReferenceTextView2;
|
||
|
if (textView2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView2 = null;
|
||
|
}
|
||
|
TextView textView3 = textView2;
|
||
|
boolean z = je.a;
|
||
|
C14957gcv.e(textView3, "");
|
||
|
textView3.setVisibility(z ? 0 : 8);
|
||
|
ScbEditText scbEditText2 = this.mReferenceEditText2;
|
||
|
if (scbEditText2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText2 = null;
|
||
|
}
|
||
|
ScbEditText scbEditText3 = scbEditText2;
|
||
|
boolean z2 = je.a;
|
||
|
C14957gcv.e(scbEditText3, "");
|
||
|
scbEditText3.setVisibility(z2 ? 0 : 8);
|
||
|
ScbEditText scbEditText4 = this.mReferenceEditText2;
|
||
|
if (scbEditText4 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText4 = null;
|
||
|
}
|
||
|
scbEditText4.setEnabled(je.c);
|
||
|
ScbEditText scbEditText5 = this.mReferenceEditText2;
|
||
|
if (scbEditText5 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText5 = null;
|
||
|
}
|
||
|
scbEditText5.setHint(je.b);
|
||
|
ScbEditText scbEditText6 = this.mReferenceEditText2;
|
||
|
if (scbEditText6 != null) {
|
||
|
scbEditText = scbEditText6;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
scbEditText.setText(je.d);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9235dfr.IeS
|
||
|
public final void a(JD jd) {
|
||
|
C14957gcv.e(jd, "");
|
||
|
DirectDebitReviewActivity.HBt hBt = DirectDebitReviewActivity.b;
|
||
|
Context requireContext = requireContext();
|
||
|
C14957gcv.c(requireContext, "");
|
||
|
C14957gcv.e(requireContext, "");
|
||
|
C14957gcv.e(jd, "");
|
||
|
Intent intent = new Intent(requireContext, (Class<?>) DirectDebitReviewActivity.class);
|
||
|
intent.putExtra("EXTRA_DIRECT_DEBIT_INPUT_DISPLAY", jd);
|
||
|
startActivity(intent);
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public final void onContinueButtonClicked() {
|
||
|
C1838aPr c1838aPr = this.presenter;
|
||
|
ScbEditText scbEditText = null;
|
||
|
if (c1838aPr == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1838aPr = null;
|
||
|
}
|
||
|
String str = this.h;
|
||
|
ScbEditText scbEditText2 = this.mReferenceEditText1;
|
||
|
if (scbEditText2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText2 = null;
|
||
|
}
|
||
|
String valueOf = String.valueOf(scbEditText2.getText());
|
||
|
ScbEditText scbEditText3 = this.mReferenceEditText2;
|
||
|
if (scbEditText3 != null) {
|
||
|
scbEditText = scbEditText3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
c1838aPr.d(str, valueOf, String.valueOf(scbEditText.getText()));
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.directdebit.Hilt_DirectDebitInputSelectedFragment, com.scb.phone.view.fragment.transferandpay.Hilt_BaseDuplicatedTransferFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
|
||
|
public final void onAttach(Context context) {
|
||
|
C14957gcv.e(context, "");
|
||
|
super.onAttach(context);
|
||
|
InterfaceC16541pFg parentFragment = getParentFragment();
|
||
|
if (parentFragment == null || !(parentFragment instanceof InterfaceC9663dnz.RVV)) {
|
||
|
return;
|
||
|
}
|
||
|
this.f = (InterfaceC9663dnz.RVV) parentFragment;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC12846fIu
|
||
|
public final void aT_() {
|
||
|
InterfaceC9663dnz.RVV rvv = this.f;
|
||
|
if (rvv != null) {
|
||
|
if (rvv == null) {
|
||
|
C14957gcv.a("");
|
||
|
rvv = null;
|
||
|
}
|
||
|
rvv.c();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9235dfr.IeS
|
||
|
public final void b(boolean z) {
|
||
|
CustomTransferAndPayBiller customTransferAndPayBiller = null;
|
||
|
if (z) {
|
||
|
CustomTransferAndPayBiller customTransferAndPayBiller2 = this.mCustomTransferAndPayBiller;
|
||
|
if (customTransferAndPayBiller2 != null) {
|
||
|
customTransferAndPayBiller = customTransferAndPayBiller2;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
customTransferAndPayBiller.mBackButton.setVisibility(0);
|
||
|
return;
|
||
|
}
|
||
|
CustomTransferAndPayBiller customTransferAndPayBiller3 = this.mCustomTransferAndPayBiller;
|
||
|
if (customTransferAndPayBiller3 != null) {
|
||
|
customTransferAndPayBiller = customTransferAndPayBiller3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
customTransferAndPayBiller.mBackButton.setVisibility(8);
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void c(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
|
||
|
C14957gcv.e(interfaceC14894gbR, "");
|
||
|
interfaceC14894gbR.invoke(obj);
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void a(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
|
||
|
C14957gcv.e(interfaceC14894gbR, "");
|
||
|
interfaceC14894gbR.invoke(obj);
|
||
|
}
|
||
|
|
||
|
public static final /* synthetic */ void a(DirectDebitInputSelectedFragment directDebitInputSelectedFragment) {
|
||
|
C1838aPr c1838aPr = directDebitInputSelectedFragment.presenter;
|
||
|
Button button = null;
|
||
|
if (c1838aPr == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1838aPr = null;
|
||
|
}
|
||
|
String str = directDebitInputSelectedFragment.h;
|
||
|
ScbEditText scbEditText = directDebitInputSelectedFragment.mReferenceEditText1;
|
||
|
if (scbEditText == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText = null;
|
||
|
}
|
||
|
String valueOf = String.valueOf(scbEditText.getText());
|
||
|
ScbEditText scbEditText2 = directDebitInputSelectedFragment.mReferenceEditText2;
|
||
|
if (scbEditText2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
scbEditText2 = null;
|
||
|
}
|
||
|
boolean e = c1838aPr.e(str, valueOf, String.valueOf(scbEditText2.getText()));
|
||
|
Button button2 = directDebitInputSelectedFragment.mButton;
|
||
|
if (button2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
button2 = null;
|
||
|
}
|
||
|
if (button2.isEnabled() != e) {
|
||
|
Button button3 = directDebitInputSelectedFragment.mButton;
|
||
|
if (button3 != null) {
|
||
|
button = button3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
button.setEnabled(e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
|
||
|
public final void a(WW ww) {
|
||
|
if (ww != null) {
|
||
|
this.h = ww.s;
|
||
|
this.d = ww.x;
|
||
|
}
|
||
|
}
|
||
|
}
|