what-the-bank/sources/com/scb/phone/view/fragment/directdebit/DirectDebitSuccessFragment....

284 lines
10 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.directdebit;
import android.net.Uri;
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 butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.components.ItemCustom;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.HomeActivity;
import com.scb.phone.view.fragment.PurchaseSuccessFragment;
import com.scb.phone.view.fragment.directdebit.DirectDebitSuccessFragment;
import java.util.Calendar;
import java.util.List;
import o.AbstractC13163fSk;
import o.AbstractC14961gcz;
import o.C13417fZt;
import o.C14823gO;
import o.C14866gag;
import o.C14957gcv;
import o.C2252abB;
import o.C6204cLu;
import o.EW;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC14894gbR;
import o.QI;
import o.QQ;
import o.cYH;
import o.fKR;
import o.fKY;
import o.fRR;
import o.fSQ;
import o.fZZ;
import o.hSd;
/* loaded from: classes5.dex */
public final class DirectDebitSuccessFragment extends Hilt_DirectDebitSuccessFragment implements cYH {
public static final Sts d = new Sts(0);
private hSd f;
private final InterfaceC13393fZL g;
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, o.cYH
public final void d(EW ew) {
}
public DirectDebitSuccessFragment() {
IeS ieS = new IeS(this);
C14957gcv.e(ieS, "");
this.g = new fZZ(ieS);
}
/* loaded from: classes5.dex */
static final class IeS extends AbstractC14961gcz implements InterfaceC14890gbN<EW> {
private DirectDebitSuccessFragment a;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ EW invoke() {
Parcelable parcelable;
Bundle arguments = this.a.getArguments();
if (arguments == null) {
return null;
}
if (Build.VERSION.SDK_INT >= 33) {
parcelable = (Parcelable) arguments.getParcelable("EXTRA_DIRECT_DEBIT_SUCCESS_DISPLAY", EW.class);
} else {
Parcelable parcelable2 = arguments.getParcelable("EXTRA_DIRECT_DEBIT_SUCCESS_DISPLAY");
parcelable = (EW) (parcelable2 instanceof EW ? parcelable2 : null);
}
return (EW) parcelable;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
IeS(DirectDebitSuccessFragment directDebitSuccessFragment) {
super(0);
this.a = directDebitSuccessFragment;
}
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View onCreateView = super.onCreateView(layoutInflater, viewGroup, bundle);
LayoutInflater.from(getContext()).inflate(R.layout.2131560128, (ViewGroup) this.extraContainer, true);
return onCreateView;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
this.presenter.e((C2252abB<cYH>) this);
this.presenter.e((EW) this.g.e(), (List<QI>) null);
this.buttonReturn.setText(getString(R.string.auto_direct_debit_return));
hSd hsd = new hSd();
this.f = hsd;
hSd hsd2 = hsd;
if (getActivity() != null) {
hsd2.c(((BaseActivity) getActivity()).scbAnalytics, "direct_debit_success");
}
}
/* JADX INFO: Access modifiers changed from: private */
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, com.scb.phone.view.fragment.ScreenShotFragment
public void d(EW ew, boolean z, boolean z2) {
if (ew != null) {
C6204cLu c6204cLu = this.themesSlipPresenter;
C14957gcv.c(c6204cLu, "");
LWm lWm = new LWm(c6204cLu);
PurchaseSuccessFragment.PurchaseScreenshotDisplay e = e(ew, z, z2);
e.c = true;
C14866gag c14866gag = C14866gag.c;
AbstractC13163fSk subscribeOn = AbstractC13163fSk.fromCallable(new fKY(lWm, e, getContext())).observeOn(fRR.e()).subscribeOn(C13417fZt.b());
final HBt hBt = new HBt(this, z);
fSQ fsq = new fSQ(hBt) { // from class: o.eSk
private InterfaceC14894gbR a;
@Override // o.fSQ
public final void c(Object obj) {
DirectDebitSuccessFragment.a(this.a, obj);
}
{
this.a = hBt;
}
};
final ZqN zqN = new ZqN(this);
((PurchaseSuccessFragment) this).c = subscribeOn.subscribe(fsq, new fSQ(zqN) { // from class: o.eSl
private InterfaceC14894gbR d;
@Override // o.fSQ
public final void c(Object obj) {
DirectDebitSuccessFragment.c(this.d, obj);
}
{
this.d = zqN;
}
});
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes5.dex */
public static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR<Uri, C14866gag> {
private boolean b;
private DirectDebitSuccessFragment c;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Uri uri) {
this.c.b(uri.toString(), this.b);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
HBt(DirectDebitSuccessFragment directDebitSuccessFragment, boolean z) {
super(1);
this.c = directDebitSuccessFragment;
this.b = z;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes5.dex */
public static final class ZqN extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private DirectDebitSuccessFragment d;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
this.d.o();
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
ZqN(DirectDebitSuccessFragment directDebitSuccessFragment) {
super(1);
this.d = directDebitSuccessFragment;
}
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, o.cYH
public final void d(EW ew, boolean z, boolean z2) {
a(ew, z, z2);
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, o.cYH
public final void e() {
super.e();
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
this.presenter.w_();
super.onDestroyView();
}
@OnClick
public final void onClickReturnButton() {
startActivity(HomeActivity.XO_(requireContext()));
}
/* loaded from: classes5.dex */
public static final class RVV extends PurchaseSuccessFragment.PurchaseScreenshotDisplay {
private final EW d;
private final C14823gO f;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RVV(String str, EW ew, boolean z, C14823gO c14823gO, boolean z2) {
super(R.layout.2131560122, str, ew, z, c14823gO, z2);
C14957gcv.e(str, "");
C14957gcv.e(c14823gO, "");
this.d = ew;
this.f = c14823gO;
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment.PurchaseScreenshotDisplay
public final void a(View view) {
EW ew = this.d;
b(ew != null ? ew.i : null, view != null ? view.getContext() : null);
QQ qq = new QQ(true);
ItemCustom e = this.f.e(view != null ? view.getContext() : null, qq);
e.setUpWithDisplay(qq);
this.container.addView(e);
this.container.addView(LayoutInflater.from(view != null ? view.getContext() : null).inflate(R.layout.2131560128, (ViewGroup) null));
EW ew2 = this.d;
b(ew2 != null ? ew2.a : null);
}
}
/* loaded from: classes5.dex */
public static final class LWm extends fKR<PurchaseSuccessFragment.PurchaseScreenshotDisplay> {
@Override // o.fKR
public final /* synthetic */ void b(PurchaseSuccessFragment.PurchaseScreenshotDisplay purchaseScreenshotDisplay, View view) {
PurchaseSuccessFragment.PurchaseScreenshotDisplay purchaseScreenshotDisplay2 = purchaseScreenshotDisplay;
C14957gcv.e(purchaseScreenshotDisplay2, "");
C14957gcv.e(view, "");
ButterKnife.c(purchaseScreenshotDisplay2, view);
ButterKnife.c(this, view);
purchaseScreenshotDisplay2.a(view);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LWm(C6204cLu c6204cLu) {
super(c6204cLu);
C14957gcv.e(c6204cLu, "");
}
}
public static /* synthetic */ void a(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void c(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
private final PurchaseSuccessFragment.PurchaseScreenshotDisplay e(EW ew, boolean z, boolean z2) {
String d2 = ew.d(String.valueOf(Calendar.getInstance().getTimeInMillis()));
C14957gcv.c((Object) d2, "");
C14823gO c14823gO = this.componentFactory;
C14957gcv.c(c14823gO, "");
RVV rvv = new RVV(d2, ew, z, c14823gO, z2);
((PurchaseSuccessFragment.PurchaseScreenshotDisplay) rvv).c = true;
return rvv;
}
}