458 lines
17 KiB
Java
458 lines
17 KiB
Java
package com.scb.phone.view.fragment.transferandpay;
|
|
|
|
import android.content.Intent;
|
|
import android.os.Build;
|
|
import android.os.Bundle;
|
|
import android.os.Parcelable;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.FrameLayout;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.transferandpay.BNPLTermsAndConditionsActivity;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.BNPLAccountSourceSelectFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.BNPLErrorPageFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.BNPLNoLoanFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.BNPLTabFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.billpaymenttab.BillPaymentBillerBNPLSelectedFragment;
|
|
import com.scb.phone.view.fragment.transferandpay.billpaymenttab.BillpaymentSecondaryBNPLTabFragment;
|
|
import java.io.Serializable;
|
|
import o.AbstractC13482fbE;
|
|
import o.C11560ehe;
|
|
import o.C1173Xd;
|
|
import o.C1193Xr;
|
|
import o.C1203Xy;
|
|
import o.C14957gcv;
|
|
import o.C6292cOf;
|
|
import o.Heg;
|
|
import o.InterfaceC0834Plv;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC17396wQp;
|
|
import o.InterfaceC9010dbe;
|
|
import o.InterfaceC9656dns;
|
|
import o.InterfaceC9663dnz;
|
|
import o.MBB;
|
|
import o.WW;
|
|
import o.YY;
|
|
import o.fCC;
|
|
import o.huo;
|
|
import o.pug;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class BNPLTabFragment extends Hilt_BNPLTabFragment implements BNPLAccountSourceSelectFragment.Sts, InterfaceC9663dnz.HBt, InterfaceC9663dnz.RVV, InterfaceC9010dbe.Sts, InterfaceC9656dns {
|
|
public static final IeS d = new IeS(0);
|
|
private WW c;
|
|
private huo<Intent> f;
|
|
private BillPaymentBillerBNPLSelectedFragment g;
|
|
private String h = "";
|
|
private boolean i;
|
|
|
|
@InterfaceC13391fZD
|
|
public C6292cOf presenter;
|
|
|
|
@BindView
|
|
public FrameLayout vpAccountSource;
|
|
|
|
@Override // o.InterfaceC9010dbe.saX
|
|
public final void b(String str) {
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.saX
|
|
public final void d() {
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class IeS {
|
|
private IeS() {
|
|
}
|
|
|
|
public static BNPLTabFragment b(String str, C1203Xy c1203Xy) {
|
|
C14957gcv.e(str, "");
|
|
Bundle bundle = new Bundle();
|
|
bundle.putString("source", str);
|
|
bundle.putString("com.scb.phone.EXTRA_BILL_PAYMENT_SERVICE_TYPE", "BNPL");
|
|
bundle.putParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN", c1203Xy);
|
|
BNPLTabFragment bNPLTabFragment = new BNPLTabFragment();
|
|
bNPLTabFragment.setArguments(bundle);
|
|
return bNPLTabFragment;
|
|
}
|
|
|
|
public /* synthetic */ IeS(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
return layoutInflater.inflate(R.layout.2131559469, viewGroup, false);
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onViewCreated(View view, Bundle bundle) {
|
|
C14957gcv.e(view, "");
|
|
super.onViewCreated(view, bundle);
|
|
C6292cOf c6292cOf = this.presenter;
|
|
if (c6292cOf == null) {
|
|
C14957gcv.a("");
|
|
c6292cOf = null;
|
|
}
|
|
c6292cOf.e((C6292cOf) this);
|
|
((BaseFragment) this).a = ButterKnife.c(this, view);
|
|
huo<Intent> registerForActivityResult = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.fCB
|
|
private BNPLTabFragment e;
|
|
|
|
@Override // o.InterfaceC0834Plv
|
|
public final void d(Object obj) {
|
|
BNPLTabFragment.c(this.e, (Heg) obj);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
});
|
|
C14957gcv.c(registerForActivityResult, "");
|
|
this.f = registerForActivityResult;
|
|
String Q = Q();
|
|
C14957gcv.c((Object) Q, "");
|
|
this.h = Q;
|
|
if (this.i) {
|
|
f();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void setUserVisibleHint(boolean z) {
|
|
if (z && this.presenter != null) {
|
|
f();
|
|
}
|
|
this.i = z;
|
|
}
|
|
|
|
private void f() {
|
|
Parcelable parcelable;
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
C6292cOf c6292cOf = this.presenter;
|
|
if (c6292cOf == null) {
|
|
C14957gcv.a("");
|
|
c6292cOf = null;
|
|
}
|
|
String string = arguments.getString("com.scb.phone.EXTRA_BILL_PAYMENT_SERVICE_TYPE");
|
|
if (string == null) {
|
|
string = "";
|
|
}
|
|
C14957gcv.c((Object) string, "");
|
|
if (Build.VERSION.SDK_INT >= 33) {
|
|
parcelable = (Parcelable) arguments.getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN", C1203Xy.class);
|
|
} else {
|
|
Parcelable parcelable2 = arguments.getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN");
|
|
parcelable = (C1203Xy) (parcelable2 instanceof C1203Xy ? parcelable2 : null);
|
|
}
|
|
c6292cOf.a(string, (C1203Xy) parcelable);
|
|
}
|
|
}
|
|
|
|
private final void a(C1193Xr c1193Xr) {
|
|
BNPLAccountSourceSelectFragment.RVV rvv = BNPLAccountSourceSelectFragment.d;
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable("EXTRA_BILL_DATA", c1193Xr);
|
|
BNPLAccountSourceSelectFragment bNPLAccountSourceSelectFragment = new BNPLAccountSourceSelectFragment();
|
|
bNPLAccountSourceSelectFragment.setArguments(bundle);
|
|
AbstractC13482fbE a = getChildFragmentManager().a();
|
|
C14957gcv.c(a, "");
|
|
a.b(R.id.fragment_account_source_select, bNPLAccountSourceSelectFragment, null, 2);
|
|
a.b();
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.saX
|
|
public final void d(C1193Xr c1193Xr) {
|
|
C1193Xr c1193Xr2 = c1193Xr == null ? new C1193Xr() : c1193Xr;
|
|
Bundle arguments = getArguments();
|
|
Serializable serializable = arguments != null ? arguments.getSerializable("com.scb.phone.EXTRA_BILL_PAY_METHOD") : null;
|
|
MBB mbb = serializable instanceof MBB ? (MBB) serializable : null;
|
|
if (mbb == null) {
|
|
mbb = MBB.PROFILE;
|
|
}
|
|
super.aO_();
|
|
this.g = null;
|
|
FrameLayout frameLayout = this.vpAccountSource;
|
|
if (frameLayout == null) {
|
|
C14957gcv.a("");
|
|
frameLayout = null;
|
|
}
|
|
FrameLayout frameLayout2 = frameLayout;
|
|
C14957gcv.e(frameLayout2, "");
|
|
frameLayout2.setVisibility(0);
|
|
a(c1193Xr);
|
|
Bundle arguments2 = getArguments();
|
|
if (arguments2 != null) {
|
|
BillPaymentBillerBNPLSelectedFragment.HBt hBt = BillPaymentBillerBNPLSelectedFragment.d;
|
|
String str = this.h;
|
|
WW ww = this.c;
|
|
String str2 = c1193Xr2.x;
|
|
if (str2 == null) {
|
|
str2 = O();
|
|
}
|
|
Bundle arguments3 = getArguments();
|
|
String string = arguments3 != null ? arguments3.getString("EXTRA_BILL_PAYMENT_PARTNER_CALLBACK") : null;
|
|
Bundle arguments4 = getArguments();
|
|
Serializable serializable2 = arguments4 != null ? arguments4.getSerializable("com.scb.phone.EXTRA_PAYMENT_FLOW_TYPE") : null;
|
|
YY yy = serializable2 != null ? (YY) serializable2 : YY.NORMAL;
|
|
String string2 = arguments2.getString("com.scb.phone.EXTRA_BILL_PAYMENT_SERVICE_TYPE");
|
|
if (string2 == null) {
|
|
string2 = "";
|
|
}
|
|
C14957gcv.c((Object) string2, "");
|
|
C14957gcv.e(c1193Xr2, "");
|
|
C14957gcv.e(string2, "");
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable("com.scb.phone.EXTRA_BILL_PAYMENT_DISPLAY", c1193Xr2);
|
|
bundle.putSerializable("com.scb.phone.EXTRA_BILL_PAY_METHOD", mbb);
|
|
bundle.putString("source", str);
|
|
bundle.putBoolean("com.scb.phone.EXTRA_BILL_PAYMENT_ENABLE_SCHEDULE", false);
|
|
bundle.putParcelable("com.scb.phone.EXTRA_ACCOUNT_SELECTED", ww);
|
|
bundle.putString("EXTRA_BILL_PAYMENT_PARTNER_CALLBACK", string);
|
|
bundle.putString("EXTRA_BILL_PAYMENT_PARTNER_SUBTYPE", str2);
|
|
bundle.putString("subtype", str2);
|
|
bundle.putSerializable("com.scb.phone.EXTRA_PAYMENT_FLOW_TYPE", yy);
|
|
bundle.putString("com.scb.phone.EXTRA_BILL_PAYMENT_SERVICE_TYPE", string2);
|
|
BillPaymentBillerBNPLSelectedFragment billPaymentBillerBNPLSelectedFragment = new BillPaymentBillerBNPLSelectedFragment();
|
|
billPaymentBillerBNPLSelectedFragment.setArguments(bundle);
|
|
this.g = billPaymentBillerBNPLSelectedFragment;
|
|
e(billPaymentBillerBNPLSelectedFragment, R.id.fragment_container_bill_payment_tabs, "BILLER_PAYMENT_SELECTED_FRAGMENT_TAG", true, true);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.saX
|
|
public final void d(String str, String str2, String str3) {
|
|
String str4 = str;
|
|
if (str4 == null || str4.length() == 0) {
|
|
return;
|
|
}
|
|
pug[] pugVarArr = new pug[2];
|
|
if (str2 == null) {
|
|
str2 = "";
|
|
}
|
|
pugVarArr[0] = new pug("source", str2);
|
|
if (str3 == null) {
|
|
str3 = "";
|
|
}
|
|
pugVarArr[1] = new pug("subtype", str3);
|
|
c(str, pugVarArr);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.Sts
|
|
public final void b(String str, String str2, String str3) {
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(str2, "");
|
|
C14957gcv.e(str3, "");
|
|
FragmentActivity activity = getActivity();
|
|
if (activity != null) {
|
|
huo<Intent> huoVar = this.f;
|
|
if (huoVar == null) {
|
|
C14957gcv.a("");
|
|
huoVar = null;
|
|
}
|
|
BNPLTermsAndConditionsActivity.LWm lWm = BNPLTermsAndConditionsActivity.b;
|
|
FragmentActivity fragmentActivity = activity;
|
|
C14957gcv.e(fragmentActivity, "");
|
|
C14957gcv.e(str2, "");
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(str3, "");
|
|
Intent intent = new Intent(fragmentActivity, (Class<?>) BNPLTermsAndConditionsActivity.class);
|
|
intent.putExtra("EXTRA_PATH", str2);
|
|
intent.putExtra("EXTRA_PAYMENT_SERVICE_TYPE", str);
|
|
intent.putExtra("EXTRA_TC_VERSION", str3);
|
|
huoVar.d(intent, null);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.Sts
|
|
public final void e(String str) {
|
|
C1203Xy c1203Xy;
|
|
BNPLNoLoanFragment.IeS ieS = BNPLNoLoanFragment.d;
|
|
if (str == null) {
|
|
str = "";
|
|
}
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
if (Build.VERSION.SDK_INT >= 33) {
|
|
c1203Xy = (Parcelable) arguments.getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN", C1203Xy.class);
|
|
} else {
|
|
Parcelable parcelable = arguments.getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN");
|
|
c1203Xy = (C1203Xy) (parcelable instanceof C1203Xy ? parcelable : null);
|
|
}
|
|
r2 = (C1203Xy) c1203Xy;
|
|
}
|
|
C14957gcv.e(str, "");
|
|
BNPLNoLoanFragment bNPLNoLoanFragment = new BNPLNoLoanFragment();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putString("DEEPLINK_INTRO", str);
|
|
bundle.putParcelable("BILL_PAYMENT_SCAN", r2);
|
|
bNPLNoLoanFragment.setArguments(bundle);
|
|
b(bNPLNoLoanFragment, R.id.fragment_container_bill_payment_tabs, "BILLPAYMENT_BNPL_NO_LOAN_AVAILABLE", true);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.Sts
|
|
public final void e(boolean z) {
|
|
BNPLErrorPageFragment.Sts sts = BNPLErrorPageFragment.c;
|
|
BNPLErrorPageFragment bNPLErrorPageFragment = new BNPLErrorPageFragment();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putBoolean("ERROR_RELOAD", z);
|
|
bNPLErrorPageFragment.setArguments(bundle);
|
|
e(bNPLErrorPageFragment, R.id.fragment_container_bill_payment_tabs, "BILLPAYMENT_BNPL_ERROR_RELOAD_PAGE", true, true);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.Sts
|
|
public final void b() {
|
|
FrameLayout frameLayout = this.vpAccountSource;
|
|
if (frameLayout == null) {
|
|
C14957gcv.a("");
|
|
frameLayout = null;
|
|
}
|
|
FrameLayout frameLayout2 = frameLayout;
|
|
C14957gcv.e(frameLayout2, "");
|
|
frameLayout2.setVisibility(8);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onDestroy() {
|
|
super.onDestroy();
|
|
huo<Intent> huoVar = this.f;
|
|
C6292cOf c6292cOf = null;
|
|
if (huoVar == null) {
|
|
C14957gcv.a("");
|
|
huoVar = null;
|
|
}
|
|
huoVar.e();
|
|
C6292cOf c6292cOf2 = this.presenter;
|
|
if (c6292cOf2 != null) {
|
|
c6292cOf = c6292cOf2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
c6292cOf.w_();
|
|
}
|
|
|
|
@Override // o.InterfaceC9656dns
|
|
public final void e() {
|
|
Parcelable parcelable;
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
C6292cOf c6292cOf = this.presenter;
|
|
if (c6292cOf == null) {
|
|
C14957gcv.a("");
|
|
c6292cOf = null;
|
|
}
|
|
String string = arguments.getString("com.scb.phone.EXTRA_BILL_PAYMENT_SERVICE_TYPE");
|
|
if (string == null) {
|
|
string = "";
|
|
}
|
|
C14957gcv.c((Object) string, "");
|
|
if (Build.VERSION.SDK_INT >= 33) {
|
|
parcelable = (Parcelable) arguments.getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN", C1203Xy.class);
|
|
} else {
|
|
Parcelable parcelable2 = arguments.getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN");
|
|
parcelable = (C1203Xy) (parcelable2 instanceof C1203Xy ? parcelable2 : null);
|
|
}
|
|
c6292cOf.a(string, (C1203Xy) parcelable);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9663dnz.HBt
|
|
public final void b(C1193Xr c1193Xr) {
|
|
C14957gcv.e(c1193Xr, "");
|
|
d(c1193Xr);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // com.scb.phone.view.fragment.transferandpay.BaseReplaceableFragment
|
|
public final void aO_() {
|
|
super.aO_();
|
|
this.g = null;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.transferandpay.BNPLAccountSourceSelectFragment.Sts
|
|
public final void d(C1173Xd c1173Xd) {
|
|
String str;
|
|
if (c1173Xd != null) {
|
|
if (C14957gcv.b((Object) W(), (Object) "en")) {
|
|
str = c1173Xd.i;
|
|
} else {
|
|
str = c1173Xd.h;
|
|
}
|
|
boolean z = false;
|
|
if (!C14957gcv.b(c1173Xd.m, Boolean.FALSE) && !C14957gcv.b((Object) c1173Xd.b, (Object) "4")) {
|
|
z = true;
|
|
}
|
|
WW ww = new WW();
|
|
ww.s = c1173Xd.c;
|
|
String str2 = c1173Xd.e;
|
|
if (str2 == null) {
|
|
str2 = c1173Xd.d;
|
|
}
|
|
ww.x = str2;
|
|
ww.d = c1173Xd.a;
|
|
ww.f8431o = c1173Xd.g;
|
|
ww.m = str;
|
|
ww.n = c1173Xd.j;
|
|
ww.k = c1173Xd.e;
|
|
ww.b = z;
|
|
ww.l = c1173Xd.f;
|
|
this.c = ww;
|
|
BillPaymentBillerBNPLSelectedFragment billPaymentBillerBNPLSelectedFragment = this.g;
|
|
if (billPaymentBillerBNPLSelectedFragment != null) {
|
|
billPaymentBillerBNPLSelectedFragment.a(ww);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(BNPLTabFragment bNPLTabFragment, Heg heg) {
|
|
C14957gcv.e(bNPLTabFragment, "");
|
|
C14957gcv.e(heg, "");
|
|
InterfaceC17396wQp activity = bNPLTabFragment.getActivity();
|
|
if (activity != null) {
|
|
if (-1 != heg.e && (activity instanceof fCC)) {
|
|
((fCC) activity).g();
|
|
return;
|
|
}
|
|
if (-1 == heg.e) {
|
|
C6292cOf c6292cOf = bNPLTabFragment.presenter;
|
|
if (c6292cOf == null) {
|
|
C14957gcv.a("");
|
|
c6292cOf = null;
|
|
}
|
|
c6292cOf.d();
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9663dnz.RVV
|
|
public final void c() {
|
|
super.aO_();
|
|
this.g = null;
|
|
b(new BillpaymentSecondaryBNPLTabFragment(), R.id.fragment_container_bill_payment_tabs, "BILLER_PAYMENT_SECONDARY_TABS_TAG", true);
|
|
}
|
|
|
|
@Override // o.InterfaceC9010dbe.Sts
|
|
public final void a() {
|
|
FrameLayout frameLayout = this.vpAccountSource;
|
|
if (frameLayout == null) {
|
|
C14957gcv.a("");
|
|
frameLayout = null;
|
|
}
|
|
FrameLayout frameLayout2 = frameLayout;
|
|
C14957gcv.e(frameLayout2, "");
|
|
frameLayout2.setVisibility(0);
|
|
a(null);
|
|
d("bnpl_billpay_manual", "", "");
|
|
this.h = "input";
|
|
b(new BillpaymentSecondaryBNPLTabFragment(), R.id.fragment_container_bill_payment_tabs, "BILLER_PAYMENT_SECONDARY_TABS_TAG", true);
|
|
}
|
|
}
|