what-the-bank/sources/com/scb/phone/view/fragment/transferandpay/cardlessatm/CardlessWithdrawAmountFragm...

1096 lines
42 KiB
Java

package com.scb.phone.view.fragment.transferandpay.cardlessatm;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatButton;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.tabs.TabLayout;
import com.scb.phone.R;
import com.scb.phone.view.activity.investment.scbs.AddAccountConsentActivity;
import com.scb.phone.view.activity.transferandpay.CardlessATMTermsConditionsActivity;
import com.scb.phone.view.activity.transferandpay.cardlessatm.CardlessATMActivity;
import com.scb.phone.view.activity.transferandpay.cardlessatm.CardlessATMReviewActivity;
import com.scb.phone.view.custom.ScbTextInputLayout;
import com.scb.phone.view.custom.common.AmountEditText;
import com.scb.phone.view.custom.common.FragmentWrapContentViewPager;
import com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment;
import com.scb.phone.view.fragment.transferandpay.cardlessatm.CardlessCreditCardSelectorFragment;
import com.scb.phone.view.fragment.transferandpay.cardlessatm.CardlessWithdrawAmountFragment;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import o.C0367Fb;
import o.C0602KjX;
import o.C11560ehe;
import o.C1171Xc;
import o.C1208Ya;
import o.C1210Yb;
import o.C12485ezB;
import o.C12817fI;
import o.C12915fL;
import o.C14957gcv;
import o.C15602gz;
import o.C6412cSB;
import o.C6414cSG;
import o.C6415cSI;
import o.C6583cXR;
import o.EnumC6470cTu;
import o.Heg;
import o.HsO;
import o.InterfaceC0834Plv;
import o.InterfaceC13391fZD;
import o.InterfaceC6648cYz;
import o.KlN;
import o.MoT;
import o.NJs;
import o.WW;
import o.YE;
import o.ZI;
import o.cSM;
import o.fFO;
import o.gcH;
import o.gdZ;
import o.guQ;
import o.huo;
import o.mro;
import o.pug;
import o.qeC;
import o.yRS;
/* loaded from: classes5.dex */
public final class CardlessWithdrawAmountFragment extends Hilt_CardlessWithdrawAmountFragment implements InterfaceC6648cYz, AccountSourceSelectFragment.Sts, fFO {
public static final LWm c = new LWm(0);
@InterfaceC13391fZD
public C6412cSB cardlessWithdrawPresenter;
private NJs d;
private C0602KjX f;
private CardlessATMActivity.RVV g = CardlessATMActivity.RVV.DEPOSITS;
private double h;
private boolean i;
private KlN j;
private huo<Intent> l;
private C12485ezB m;
public static final /* synthetic */ KlN b(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment) {
KlN klN = cardlessWithdrawAmountFragment.j;
C14957gcv.e(klN);
return klN;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
Intent intent;
CardlessATMActivity.RVV rvv;
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
c("cardless_atm_input", new pug("source", Q()));
FragmentActivity activity = getActivity();
if (activity != null && (intent = activity.getIntent()) != null && intent.hasExtra("CARDLESS_DEFAULT_TAB")) {
if (gdZ.a("CARDS", intent.getStringExtra("CARDLESS_DEFAULT_TAB"), true)) {
rvv = CardlessATMActivity.RVV.CARDS;
} else {
rvv = CardlessATMActivity.RVV.DEPOSITS;
}
this.g = rvv;
}
Bundle arguments = getArguments();
if (arguments != null) {
this.i = arguments.getBoolean("com.scb.phone.EXTRA_CARDLESS_ATM_HAS_SPEEDY_CASH", false);
}
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
c6412cSB.e((C6412cSB) this);
c6412cSB.b = this.i;
if (c6412cSB.f != 0) {
c6412cSB.f.y();
}
c6412cSB.e.d();
mro mroVar = c6412cSB.e;
mroVar.d(mroVar.i, new C6412cSB.Sts(c6412cSB));
NJs nJs = this.d;
C14957gcv.e(nJs);
nJs.e.setOnClickListener(new View.OnClickListener(this) { // from class: o.fGd
private CardlessWithdrawAmountFragment b;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
CardlessWithdrawAmountFragment.a(this.b);
}
{
this.b = this;
}
});
NJs nJs2 = this.d;
C14957gcv.e(nJs2);
nJs2.b.setOnClickListener(new View.OnClickListener(this) { // from class: o.fGb
private CardlessWithdrawAmountFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
CardlessWithdrawAmountFragment.e(this.a);
}
{
this.a = this;
}
});
huo<Intent> registerForActivityResult = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.fGl
private CardlessWithdrawAmountFragment b;
@Override // o.InterfaceC0834Plv
public final void d(Object obj) {
CardlessWithdrawAmountFragment.a(this.b, (Heg) obj);
}
{
this.b = this;
}
});
C14957gcv.c(registerForActivityResult, "");
this.l = registerForActivityResult;
}
@Override // o.InterfaceC6648cYz
public final void br_() {
NJs nJs = this.d;
C14957gcv.e(nJs);
nJs.e.setEnabled(false);
i();
h();
y();
}
private final void i() {
yRS childFragmentManager = getChildFragmentManager();
C14957gcv.c(childFragmentManager, "");
HBt hBt = new HBt(this, childFragmentManager);
KlN klN = this.j;
C14957gcv.e(klN);
FragmentWrapContentViewPager fragmentWrapContentViewPager = klN.i;
fragmentWrapContentViewPager.setAdapter(hBt);
fragmentWrapContentViewPager.setOffscreenPageLimit(2);
NJs nJs = this.d;
C14957gcv.e(nJs);
TabLayout tabLayout = nJs.d;
KlN klN2 = this.j;
C14957gcv.e(klN2);
tabLayout.setupWithViewPager(klN2.i);
IeS ieS = new IeS(this);
if (!tabLayout.d.contains(ieS)) {
tabLayout.d.add(ieS);
}
KlN klN3 = this.j;
C14957gcv.e(klN3);
klN3.i.setDisableSwiping(true);
}
/* loaded from: classes5.dex */
public static final class IeS implements TabLayout.IeS {
private CardlessWithdrawAmountFragment c;
IeS(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment) {
this.c = cardlessWithdrawAmountFragment;
}
@Override // com.google.android.material.tabs.TabLayout.Sts
public final void e(TabLayout.RVV rvv) {
C14957gcv.e(rvv, "");
C6412cSB c6412cSB = null;
if (rvv.i == 0) {
C6412cSB c6412cSB2 = this.c.cardlessWithdrawPresenter;
if (c6412cSB2 != null) {
c6412cSB = c6412cSB2;
} else {
C14957gcv.a("");
}
c6412cSB.d = true;
WW ww = c6412cSB.g;
if (ww != null) {
c6412cSB.g = ww;
if (c6412cSB.d) {
cSM csm = new cSM(c6412cSB);
if (c6412cSB.f != 0) {
csm.e(c6412cSB.f);
}
}
}
C6415cSI c6415cSI = new C6415cSI(c6412cSB);
if (c6412cSB.f != 0) {
c6415cSI.e(c6412cSB.f);
return;
}
return;
}
if (rvv.i == 1) {
C6412cSB c6412cSB3 = this.c.cardlessWithdrawPresenter;
if (c6412cSB3 != null) {
c6412cSB = c6412cSB3;
} else {
C14957gcv.a("");
}
c6412cSB.d = false;
C0367Fb c0367Fb = c6412cSB.m;
if (c0367Fb != null) {
c6412cSB.m = c0367Fb;
if (!c6412cSB.d) {
c6412cSB.c();
}
}
C6414cSG c6414cSG = new C6414cSG(c6412cSB);
if (c6412cSB.f != 0) {
c6414cSG.e(c6412cSB.f);
}
}
}
@Override // com.google.android.material.tabs.TabLayout.Sts
public final void a(TabLayout.RVV rvv) {
C14957gcv.e(rvv, "");
}
@Override // com.google.android.material.tabs.TabLayout.Sts
public final void d(TabLayout.RVV rvv) {
C14957gcv.e(rvv, "");
}
}
private final void h() {
if (this.g == CardlessATMActivity.RVV.CARDS) {
KlN klN = this.j;
C14957gcv.e(klN);
klN.i.setCurrentItem(1);
} else {
KlN klN2 = this.j;
C14957gcv.e(klN2);
klN2.i.setCurrentItem(0);
}
}
@Override // o.InterfaceC6648cYz
public final void c(C1210Yb c1210Yb) {
List<Integer> list;
if (c1210Yb == null) {
return;
}
KlN klN = this.j;
C14957gcv.e(klN);
LinearLayout linearLayout = klN.b;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(0);
NJs nJs = this.d;
C14957gcv.e(nJs);
AppCompatButton appCompatButton = nJs.e;
C14957gcv.c(appCompatButton, "");
AppCompatButton appCompatButton2 = appCompatButton;
C14957gcv.e(appCompatButton2, "");
appCompatButton2.setVisibility(0);
AppCompatButton appCompatButton3 = nJs.b;
C14957gcv.c(appCompatButton3, "");
AppCompatButton appCompatButton4 = appCompatButton3;
C14957gcv.e(appCompatButton4, "");
appCompatButton4.setVisibility(8);
C0602KjX c0602KjX = this.f;
C14957gcv.e(c0602KjX);
TextView textView = c0602KjX.d;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(8);
RelativeLayout relativeLayout = c0602KjX.e;
C14957gcv.c(relativeLayout, "");
RelativeLayout relativeLayout2 = relativeLayout;
C14957gcv.e(relativeLayout2, "");
relativeLayout2.setVisibility(8);
getContext();
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(0, false);
KlN klN2 = this.j;
C14957gcv.e(klN2);
klN2.d.setLayoutManager(linearLayoutManager);
ArrayList arrayList = new ArrayList();
List<Integer> list2 = c1210Yb.a;
if (list2 != null && !list2.isEmpty() && (list = c1210Yb.a) != null) {
arrayList.addAll(list);
}
Boolean bool = c1210Yb.e;
if (bool != null) {
boolean booleanValue = bool.booleanValue();
ArrayList arrayList2 = arrayList;
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
this.m = new C12485ezB(booleanValue, arrayList2, c6412cSB.d());
}
C12485ezB c12485ezB = this.m;
if (c12485ezB != null) {
RVV rvv = new RVV(this, c1210Yb);
C14957gcv.e(rvv, "");
c12485ezB.d = rvv;
}
KlN klN3 = this.j;
C14957gcv.e(klN3);
klN3.d.setAdapter(this.m);
klN3.h.setText(c1210Yb.b);
Double d = c1210Yb.h;
if (d != null) {
final double doubleValue = d.doubleValue();
Double d2 = c1210Yb.j;
if (d2 != null) {
final double doubleValue2 = d2.doubleValue();
KlN klN4 = this.j;
C14957gcv.e(klN4);
AmountEditText amountEditText = klN4.e;
amountEditText.setOnAmountChangeListener(null);
amountEditText.setText("");
gcH gch = gcH.d;
String format = String.format("%s - %s", Arrays.copyOf(new Object[]{(String) C6583cXR.c(new Object[]{Double.valueOf(doubleValue)}, -150997759, 150997764, (int) System.currentTimeMillis()), (String) C6583cXR.c(new Object[]{Double.valueOf(doubleValue2)}, -150997759, 150997764, (int) System.currentTimeMillis())}, 2));
C14957gcv.c((Object) format, "");
amountEditText.setCustomHint(format);
amountEditText.setOnAmountChangeListener(new Sts(this, doubleValue, doubleValue2));
amountEditText.setHandleDismissKeyboard(new AmountEditText.LWm(this, doubleValue, doubleValue2) { // from class: o.fGg
private double b;
private CardlessWithdrawAmountFragment c;
private double d;
@Override // com.scb.phone.view.custom.common.AmountEditText.LWm
public final void d() {
CardlessWithdrawAmountFragment.b(this.c, this.d, this.b);
}
{
this.c = this;
this.d = doubleValue;
this.b = doubleValue2;
}
});
}
}
KlN klN5 = this.j;
C14957gcv.e(klN5);
ScbTextInputLayout scbTextInputLayout = klN5.c;
scbTextInputLayout.setError("");
scbTextInputLayout.setErrorEnabled(false);
NJs nJs2 = this.d;
C14957gcv.e(nJs2);
nJs2.e.setEnabled(false);
}
/* loaded from: classes5.dex */
public static final class RVV implements C12485ezB.LWm {
private CardlessWithdrawAmountFragment a;
private C1210Yb d;
RVV(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment, C1210Yb c1210Yb) {
this.a = cardlessWithdrawAmountFragment;
this.d = c1210Yb;
}
@Override // o.C12485ezB.LWm
public final void b() {
final AmountEditText amountEditText = CardlessWithdrawAmountFragment.b(this.a).e;
amountEditText.post(new Runnable(amountEditText) { // from class: o.fGk
private AmountEditText d;
@Override // java.lang.Runnable
public final void run() {
AmountEditText amountEditText2 = this.d;
C14957gcv.e(amountEditText2, "");
amountEditText2.requestFocus();
amountEditText2.onKeyUp(23, new KeyEvent(1, 23));
}
{
this.d = amountEditText;
}
});
}
@Override // o.C12485ezB.LWm
public final void d(double d) {
CardlessWithdrawAmountFragment.b(this.a).e.setText((String) C6583cXR.c(new Object[]{Double.valueOf(d)}, -150997759, 150997764, (int) System.currentTimeMillis()));
Double d2 = this.d.h;
if (d2 != null) {
C1210Yb c1210Yb = this.d;
CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment = this.a;
double doubleValue = d2.doubleValue();
Double d3 = c1210Yb.j;
if (d3 != null) {
cardlessWithdrawAmountFragment.e(doubleValue, d3.doubleValue());
}
}
}
}
@Override // o.InterfaceC6648cYz
public final void b(String str) {
KlN klN = this.j;
C14957gcv.e(klN);
klN.a.setText(str);
}
/* loaded from: classes5.dex */
public static final class Sts implements AmountEditText.RVV {
private double a;
private CardlessWithdrawAmountFragment c;
private double e;
Sts(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment, double d, double d2) {
this.c = cardlessWithdrawAmountFragment;
this.a = d;
this.e = d2;
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void b(double d) {
this.c.e(this.a, this.e);
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void a() {
guQ.c("onDonePress", new Object[0]);
this.c.aN_();
}
}
@Override // o.InterfaceC6648cYz
public final void c(int i) {
KlN klN = this.j;
C14957gcv.e(klN);
ScbTextInputLayout scbTextInputLayout = klN.c;
scbTextInputLayout.setErrorEnabled(true);
scbTextInputLayout.setError(getString(i));
}
/* JADX INFO: Access modifiers changed from: private */
public final void e(double d, double d2) {
KlN klN = this.j;
C14957gcv.e(klN);
double d3 = klN.e.e;
C12485ezB c12485ezB = this.m;
if (c12485ezB != null) {
c12485ezB.a(d3);
}
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
boolean c2 = c6412cSB.c(d3, d, d2);
NJs nJs = this.d;
C14957gcv.e(nJs);
nJs.e.setEnabled(c2);
}
@Override // o.InterfaceC6648cYz
public final void b(C1208Ya c1208Ya, String str) {
C14957gcv.e(c1208Ya, "");
Context context = getContext();
if (context != null) {
CardlessATMReviewActivity.IeS ieS = CardlessATMReviewActivity.b;
String Q = Q();
C14957gcv.c((Object) Q, "");
C14957gcv.e(context, "");
C14957gcv.e(Q, "");
Intent intent = new Intent(context, (Class<?>) CardlessATMReviewActivity.class);
intent.putExtra("source", Q);
intent.putExtra("com.scb.phone.EXTRA_CARDLESS_REVIEW", c1208Ya);
intent.putExtra("CONDITION", str);
context.startActivity(intent);
}
}
@Override // o.InterfaceC6648cYz
public final void c() {
Context context = getContext();
if (context != null) {
huo<Intent> huoVar = this.l;
if (huoVar == null) {
C14957gcv.a("");
huoVar = null;
}
CardlessATMTermsConditionsActivity.HBt hBt = CardlessATMTermsConditionsActivity.b;
C14957gcv.e(context, "");
huoVar.d(new Intent(context, (Class<?>) CardlessATMTermsConditionsActivity.class), null);
}
}
@Override // o.InterfaceC6648cYz
public final void e(String str) {
if (str != null) {
a(str);
}
}
@Override // o.InterfaceC6648cYz
public final void d(String str) {
if (str != null) {
a(str);
}
}
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
public final void a(final WW ww) {
if (ww != null) {
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
final C6412cSB c6412cSB2 = null;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
if (ww != null) {
c6412cSB.g = ww;
if (c6412cSB.d) {
cSM csm = new cSM(c6412cSB);
if (c6412cSB.f != 0) {
csm.e(c6412cSB.f);
}
}
}
if (this.m != null) {
NJs nJs = this.d;
C14957gcv.e(nJs);
TabLayout.RVV rvv = nJs.d.f;
if (rvv == null || rvv.i != 0) {
return;
}
C6412cSB c6412cSB3 = this.cardlessWithdrawPresenter;
if (c6412cSB3 != null) {
c6412cSB2 = c6412cSB3;
} else {
C14957gcv.a("");
}
if (ww != null) {
ZI.IeS ieS = new ZI.IeS(c6412cSB2, ww) { // from class: o.cSH
private WW c;
private C6412cSB e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6412cSB.d(this.e, this.c, (InterfaceC6648cYz) obj);
}
{
this.e = c6412cSB2;
this.c = ww;
}
};
if (c6412cSB2.f != 0) {
ieS.e(c6412cSB2.f);
}
}
}
}
}
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
public final void e_(boolean z) {
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
c6412cSB.i = Boolean.valueOf(z);
C6415cSI c6415cSI = new C6415cSI(c6412cSB);
if (c6412cSB.f != 0) {
c6415cSI.e(c6412cSB.f);
}
}
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
public final void H_() {
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
c6412cSB.c = Boolean.TRUE;
if (c6412cSB.d) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.cSO
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6648cYz) obj).a();
}
};
if (c6412cSB.f != 0) {
ieS.e(c6412cSB.f);
}
}
}
@Override // o.fFO
public final void e(C0367Fb c0367Fb) {
C12485ezB c12485ezB;
C14957gcv.e(c0367Fb, "");
guQ.c("onCreditCardSelected", new Object[0]);
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
if (c0367Fb != null) {
c6412cSB.m = c0367Fb;
if (!c6412cSB.d) {
c6412cSB.c();
}
}
if (this.m != null) {
NJs nJs = this.d;
C14957gcv.e(nJs);
TabLayout.RVV rvv = nJs.d.f;
if (rvv == null || rvv.i != 1 || (c12485ezB = this.m) == null) {
return;
}
Double c2 = C6583cXR.c(c0367Fb.d);
C14957gcv.c(c2, "");
c12485ezB.c = c2.doubleValue();
c12485ezB.a = false;
c12485ezB.notifyDataSetChanged();
}
}
@Override // o.fFO
public final void c(boolean z) {
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
c6412cSB.h = Boolean.valueOf(z);
C6414cSG c6414cSG = new C6414cSG(c6412cSB);
if (c6412cSB.f != 0) {
c6414cSG.e(c6412cSB.f);
}
}
@Override // o.fFO
public final void d() {
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
c6412cSB.a = Boolean.TRUE;
if (c6412cSB.d) {
return;
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.cSF
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6648cYz) obj).a();
}
};
if (c6412cSB.f != 0) {
ieS.e(c6412cSB.f);
}
}
@Override // o.InterfaceC6648cYz
public final void a() {
KlN klN = this.j;
C14957gcv.e(klN);
LinearLayout linearLayout = klN.b;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(8);
C0602KjX c0602KjX = this.f;
C14957gcv.e(c0602KjX);
TextView textView = c0602KjX.d;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(8);
NJs nJs = this.d;
C14957gcv.e(nJs);
AppCompatButton appCompatButton = nJs.e;
C14957gcv.c(appCompatButton, "");
AppCompatButton appCompatButton2 = appCompatButton;
C14957gcv.e(appCompatButton2, "");
appCompatButton2.setVisibility(8);
NJs nJs2 = this.d;
C14957gcv.e(nJs2);
AppCompatButton appCompatButton3 = nJs2.b;
C14957gcv.c(appCompatButton3, "");
AppCompatButton appCompatButton4 = appCompatButton3;
C14957gcv.e(appCompatButton4, "");
appCompatButton4.setVisibility(8);
C0602KjX c0602KjX2 = this.f;
C14957gcv.e(c0602KjX2);
RelativeLayout relativeLayout = c0602KjX2.e;
C14957gcv.c(relativeLayout, "");
RelativeLayout relativeLayout2 = relativeLayout;
C14957gcv.e(relativeLayout2, "");
relativeLayout2.setVisibility(0);
ar_();
}
@Override // o.InterfaceC6648cYz
public final void e(Double d) {
C12485ezB c12485ezB;
if (d == null || (c12485ezB = this.m) == null) {
return;
}
c12485ezB.c = d.doubleValue();
c12485ezB.a = false;
c12485ezB.notifyDataSetChanged();
}
private final void a(String str) {
KlN klN = this.j;
C14957gcv.e(klN);
LinearLayout linearLayout = klN.b;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(8);
NJs nJs = this.d;
C14957gcv.e(nJs);
AppCompatButton appCompatButton = nJs.e;
C14957gcv.c(appCompatButton, "");
AppCompatButton appCompatButton2 = appCompatButton;
C14957gcv.e(appCompatButton2, "");
appCompatButton2.setVisibility(8);
AppCompatButton appCompatButton3 = nJs.b;
C14957gcv.c(appCompatButton3, "");
AppCompatButton appCompatButton4 = appCompatButton3;
C14957gcv.e(appCompatButton4, "");
appCompatButton4.setVisibility(0);
C0602KjX c0602KjX = this.f;
C14957gcv.e(c0602KjX);
RelativeLayout relativeLayout = c0602KjX.e;
C14957gcv.c(relativeLayout, "");
RelativeLayout relativeLayout2 = relativeLayout;
C14957gcv.e(relativeLayout2, "");
relativeLayout2.setVisibility(8);
TextView textView = c0602KjX.d;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(0);
c0602KjX.d.setText(str);
ar_();
}
/* loaded from: classes5.dex */
public final class HBt extends MoT {
private CardlessWithdrawAmountFragment e;
@Override // o.WYJ
public final int getCount() {
return 2;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public HBt(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment, yRS yrs) {
super(yrs);
C14957gcv.e(yrs, "");
this.e = cardlessWithdrawAmountFragment;
}
@Override // o.MoT
public final Fragment b(int i) {
if (i == 1) {
ArrayList arrayList = new ArrayList();
arrayList.add("CARDLESS_ATM_SOURCE");
CardlessCreditCardSelectorFragment.LWm lWm = CardlessCreditCardSelectorFragment.c;
return CardlessCreditCardSelectorFragment.LWm.d(arrayList, false);
}
C1171Xc.IeS ieS = new C1171Xc.IeS(YE.CARDLESS_ATM_FUNCTION);
C1171Xc c1171Xc = ieS.c;
c1171Xc.a = false;
c1171Xc.b = true;
c1171Xc.j = true;
c1171Xc.g = true;
ieS.c.j = false;
ieS.c.g = false;
AccountSourceSelectFragment d = AccountSourceSelectFragment.d(ieS.c, this.e.i);
C14957gcv.c(d, "");
return d;
}
@Override // o.WYJ
public final CharSequence getPageTitle(int i) {
String string;
String str;
if (i == 0) {
string = this.e.getString(R.string.cardless_atm_tab_deposit);
str = "getString(PresentationR.…cardless_atm_tab_deposit)";
} else {
string = this.e.getString(R.string.cardless_atm_tab_cards);
str = "getString(\n …m_tab_cards\n )";
}
C14957gcv.c((Object) string, str);
return string;
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C6412cSB c6412cSB = this.cardlessWithdrawPresenter;
huo<Intent> huoVar = null;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
c6412cSB.w_();
this.d = null;
this.j = null;
this.f = null;
huo<Intent> huoVar2 = this.l;
if (huoVar2 == null) {
C14957gcv.a("");
} else {
huoVar = huoVar2;
}
huoVar.e();
super.onDestroyView();
}
/* loaded from: classes5.dex */
public static final class LWm {
private LWm() {
}
public /* synthetic */ LWm(byte b) {
this();
}
}
public static /* synthetic */ void a(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment) {
C0367Fb c0367Fb;
String str;
EnumC6470cTu enumC6470cTu;
WW ww;
C14957gcv.e(cardlessWithdrawAmountFragment, "");
KlN klN = cardlessWithdrawAmountFragment.j;
C14957gcv.e(klN);
cardlessWithdrawAmountFragment.h = klN.e.e;
C6412cSB c6412cSB = cardlessWithdrawAmountFragment.cardlessWithdrawPresenter;
if (c6412cSB == null) {
C14957gcv.a("");
c6412cSB = null;
}
double d = cardlessWithdrawAmountFragment.h;
boolean z = c6412cSB.d;
if (!z || (ww = c6412cSB.g) == null) {
if (!z && (c0367Fb = c6412cSB.m) != null && c0367Fb != null) {
str = c0367Fb.g;
}
str = null;
} else {
if (ww != null) {
str = ww.s;
}
str = null;
}
if (str == null || d <= 0.0d) {
return;
}
if (c6412cSB.f != 0) {
c6412cSB.f.y();
}
C12817fI c2 = C12817fI.c();
if (c6412cSB.d) {
enumC6470cTu = EnumC6470cTu.DEPOSIT;
} else {
C0367Fb c0367Fb2 = c6412cSB.m;
if (c0367Fb2 != null && C6412cSB.d(c0367Fb2)) {
if (gdZ.a("CDX", c6412cSB.n, true)) {
enumC6470cTu = EnumC6470cTu.CARD_X_SPEEDY_CASH;
} else {
enumC6470cTu = EnumC6470cTu.SPEEDY_CASH;
}
} else if (gdZ.a("CDX", c6412cSB.n, true)) {
enumC6470cTu = EnumC6470cTu.CARD_X_CREDIT;
} else {
enumC6470cTu = EnumC6470cTu.CREDIT;
}
}
c2.c = enumC6470cTu.typeCode;
c2.b = str;
c2.a = C15602gz.e(d);
C14957gcv.c(c2, "");
WW ww2 = c6412cSB.g;
if (ww2 != null && c6412cSB.b && c6412cSB.d && ww2.q != null) {
C14957gcv.c(ww2.q, "");
if (!r3.isEmpty()) {
c2.e = String.valueOf(ww2.d);
ArrayList arrayList = new ArrayList();
List<HsO> list = ww2.q;
C14957gcv.c(list, "");
Iterator<T> it = list.iterator();
while (it.hasNext()) {
arrayList.add(new C12915fL(((HsO) it.next()).b, ww2.f.a));
}
c2.d = arrayList;
}
}
c6412cSB.e.a(c2);
mro mroVar = c6412cSB.e;
C0367Fb c0367Fb3 = c6412cSB.m;
mroVar.d(mroVar.i, new C6412cSB.HBt(c6412cSB, c2, c0367Fb3 != null ? c0367Fb3.q : null));
}
public static /* synthetic */ void e(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment) {
C14957gcv.e(cardlessWithdrawAmountFragment, "");
AddAccountConsentActivity.a(cardlessWithdrawAmountFragment.getContext());
}
public static /* synthetic */ void b(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment, double d, double d2) {
C14957gcv.e(cardlessWithdrawAmountFragment, "");
cardlessWithdrawAmountFragment.e(d, d2);
cardlessWithdrawAmountFragment.aN_();
}
public static /* synthetic */ void a(CardlessWithdrawAmountFragment cardlessWithdrawAmountFragment, Heg heg) {
C14957gcv.e(cardlessWithdrawAmountFragment, "");
C14957gcv.e(heg, "");
if (heg.e == 0) {
FragmentActivity activity = cardlessWithdrawAmountFragment.getActivity();
if (activity != null) {
activity.finish();
return;
}
return;
}
if (heg.e == -1) {
NJs nJs = cardlessWithdrawAmountFragment.d;
C14957gcv.e(nJs);
nJs.e.setEnabled(false);
cardlessWithdrawAmountFragment.i();
cardlessWithdrawAmountFragment.h();
cardlessWithdrawAmountFragment.y();
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559486, viewGroup, false);
int i = R.id.button_add_account;
AppCompatButton appCompatButton = (AppCompatButton) qeC.e(inflate, R.id.button_add_account);
if (appCompatButton != null) {
i = R.id.button_continue;
AppCompatButton appCompatButton2 = (AppCompatButton) qeC.e(inflate, R.id.button_continue);
if (appCompatButton2 != null) {
i = R.id.root_view;
LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, R.id.root_view);
if (linearLayout != null) {
i = R.id.source_label;
TextView textView = (TextView) qeC.e(inflate, R.id.source_label);
if (textView != null) {
i = R.id.tab_source_of_fund;
TabLayout tabLayout = (TabLayout) qeC.e(inflate, R.id.tab_source_of_fund);
if (tabLayout != null) {
NJs nJs = new NJs((LinearLayout) inflate, appCompatButton, appCompatButton2, linearLayout, textView, tabLayout);
this.d = nJs;
C14957gcv.e(nJs);
LinearLayout linearLayout2 = nJs.c;
int i2 = R.id.amount_divisible_text_view;
TextView textView2 = (TextView) qeC.e(linearLayout2, R.id.amount_divisible_text_view);
if (textView2 != null) {
i2 = R.id.amount_input_layout;
ScbTextInputLayout scbTextInputLayout = (ScbTextInputLayout) qeC.e(linearLayout2, R.id.amount_input_layout);
if (scbTextInputLayout != null) {
i2 = R.id.amount_recycler_view;
RecyclerView recyclerView = (RecyclerView) qeC.e(linearLayout2, R.id.amount_recycler_view);
if (recyclerView != null) {
i2 = R.id.cardless_withdraw_note;
TextView textView3 = (TextView) qeC.e(linearLayout2, R.id.cardless_withdraw_note);
if (textView3 != null) {
i2 = R.id.et_amount;
AmountEditText amountEditText = (AmountEditText) qeC.e(linearLayout2, R.id.et_amount);
if (amountEditText != null) {
i2 = R.id.footnote_text_view;
TextView textView4 = (TextView) qeC.e(linearLayout2, R.id.footnote_text_view);
if (textView4 != null) {
i2 = R.id.layout_amount;
LinearLayout linearLayout3 = (LinearLayout) qeC.e(linearLayout2, R.id.layout_amount);
if (linearLayout3 != null) {
i2 = R.id.layout_withdraw_amount;
LinearLayout linearLayout4 = (LinearLayout) qeC.e(linearLayout2, R.id.layout_withdraw_amount);
if (linearLayout4 != null) {
i2 = R.id.remaining_limit_text_view;
TextView textView5 = (TextView) qeC.e(linearLayout2, R.id.remaining_limit_text_view);
if (textView5 != null) {
i2 = R.id.to_text_view;
TextView textView6 = (TextView) qeC.e(linearLayout2, R.id.to_text_view);
if (textView6 != null) {
i2 = R.id.view_pager_source_of_fund;
FragmentWrapContentViewPager fragmentWrapContentViewPager = (FragmentWrapContentViewPager) qeC.e(linearLayout2, R.id.view_pager_source_of_fund);
if (fragmentWrapContentViewPager != null) {
this.j = new KlN(linearLayout2, textView2, scbTextInputLayout, recyclerView, textView3, amountEditText, textView4, linearLayout3, linearLayout4, textView5, textView6, fragmentWrapContentViewPager);
LinearLayout linearLayout5 = nJs.c;
int i3 = R.id.layout_error;
RelativeLayout relativeLayout = (RelativeLayout) qeC.e(linearLayout5, R.id.layout_error);
if (relativeLayout != null) {
i3 = R.id.tv_empty_state;
TextView textView7 = (TextView) qeC.e(linearLayout5, R.id.tv_empty_state);
if (textView7 != null) {
i3 = R.id.tv_error_description;
TextView textView8 = (TextView) qeC.e(linearLayout5, R.id.tv_error_description);
if (textView8 != null) {
i3 = R.id.tv_error_title;
TextView textView9 = (TextView) qeC.e(linearLayout5, R.id.tv_error_title);
if (textView9 != null) {
this.f = new C0602KjX(linearLayout5, relativeLayout, textView7, textView8, textView9);
NJs nJs2 = this.d;
C14957gcv.e(nJs2);
LinearLayout linearLayout6 = nJs2.c;
C14957gcv.c(linearLayout6, "");
return linearLayout6;
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(linearLayout5.getResources().getResourceName(i3)));
}
}
}
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(linearLayout2.getResources().getResourceName(i2)));
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
@Override // o.InterfaceC6648cYz
public final void e() {
KlN klN = this.j;
C14957gcv.e(klN);
ScbTextInputLayout scbTextInputLayout = klN.c;
scbTextInputLayout.setError("");
scbTextInputLayout.setErrorEnabled(false);
}
}