what-the-bank/sources/com/scb/phone/view/fragment/prepaid/PrepaidTravelConversionSucc...

265 lines
9.1 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.prepaid;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.FragmentActivity;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.prepaid.PrepaidDetailsActivity;
import com.scb.phone.view.fragment.PurchaseSuccessFragment;
import com.scb.phone.view.fragment.prepaid.PrepaidTravelConversionSuccessFragment;
import java.util.Calendar;
import java.util.List;
import o.AbstractC13163fSk;
import o.AbstractC14961gcz;
import o.C13417fZt;
import o.C14866gag;
import o.C14957gcv;
import o.C7659csW;
import o.Dwh;
import o.EO;
import o.EW;
import o.InterfaceC13391fZD;
import o.InterfaceC14894gbR;
import o.QI;
import o.ZI;
import o.cYH;
import o.fKY;
import o.fRR;
import o.fSQ;
/* loaded from: classes5.dex */
public final class PrepaidTravelConversionSuccessFragment extends Hilt_PrepaidTravelConversionSuccessFragment implements cYH {
public static final IeS d = new IeS(0);
private Dwh f;
private EW g;
private boolean i;
@InterfaceC13391fZD
public C7659csW successPresenter;
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, com.scb.phone.view.fragment.ScreenShotFragment
public final /* bridge */ /* synthetic */ void d(EO eo, boolean z, boolean z2) {
d((EW) eo, z, z2);
}
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(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, "");
C7659csW c7659csW = this.successPresenter;
if (c7659csW == null) {
C14957gcv.a("");
c7659csW = null;
}
c7659csW.e((C7659csW) this);
this.f = new Dwh();
return super.onCreateView(layoutInflater, viewGroup, bundle);
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
Bundle arguments = getArguments();
C7659csW c7659csW = null;
this.g = arguments != null ? (EW) arguments.getParcelable("com.scb.phone.view.fragment.prepaid.request.PrepaidTravelConversionSuccessFragment.KEY_SUCCESS") : null;
Bundle arguments2 = getArguments();
this.i = arguments2 != null ? arguments2.getBoolean("EXTRA_IS_BUY") : false;
final EW ew = this.g;
if (ew != null) {
C7659csW c7659csW2 = this.successPresenter;
if (c7659csW2 != null) {
c7659csW = c7659csW2;
} else {
C14957gcv.a("");
}
C14957gcv.e(ew, "");
ZI.IeS ieS = new ZI.IeS(ew) { // from class: o.csT
private EW e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7659csW.e(this.e, (cYH) obj);
}
{
this.e = ew;
}
};
if (c7659csW.f != 0) {
ieS.e(c7659csW.f);
}
}
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, o.cYH
public final void d(EW ew) {
C14957gcv.e(ew, "");
this.presenter.e(ew, (List<QI>) null);
String string = getString(R.string.prepaid_conversion_return);
C14957gcv.c((Object) string, "");
C14957gcv.e(string, "");
this.buttonReturn.setText(string);
}
@OnClick
public final void onClickReturnButton() {
Context context = getContext();
if (context != null) {
String str = this.i ? "planetscb_buy_return" : "planetscb_sell_return";
Dwh dwh = this.f;
Dwh dwh2 = null;
if (dwh == null) {
C14957gcv.a("");
dwh = null;
}
dwh.d("source", str);
Dwh dwh3 = this.f;
if (dwh3 == null) {
C14957gcv.a("");
} else {
dwh2 = dwh3;
}
Dwh dwh4 = dwh2;
if (getActivity() != null) {
dwh4.c(((BaseActivity) getActivity()).scbAnalytics, "planetscb_conversion_return");
}
context.startActivity(PrepaidDetailsActivity.akG_(context));
}
FragmentActivity activity = getActivity();
if (activity != null) {
activity.finish();
}
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, o.cYH
public final void d(EW ew, boolean z, boolean z2) {
if (ew != null) {
AbstractC13163fSk subscribeOn = AbstractC13163fSk.fromCallable(new fKY(new PurchaseSuccessFragment.HBt(this.themesSlipPresenter), new PurchaseSuccessFragment.PurchaseScreenshotDisplay(R.layout.2131560122, ew.d(String.valueOf(Calendar.getInstance().getTimeInMillis())), ew, z, this.componentFactory, z2), getContext())).observeOn(fRR.e()).subscribeOn(C13417fZt.b());
final HBt hBt = new HBt(this, z);
fSQ fsq = new fSQ(hBt) { // from class: o.ftz
private InterfaceC14894gbR a;
@Override // o.fSQ
public final void c(Object obj) {
PrepaidTravelConversionSuccessFragment.e(this.a, obj);
}
{
this.a = hBt;
}
};
final Sts sts = new Sts(this);
((PurchaseSuccessFragment) this).c = subscribeOn.subscribe(fsq, new fSQ(sts) { // from class: o.fty
private InterfaceC14894gbR b;
@Override // o.fSQ
public final void c(Object obj) {
PrepaidTravelConversionSuccessFragment.b(this.b, obj);
}
{
this.b = sts;
}
});
Dwh dwh = null;
if (!this.i) {
Dwh dwh2 = this.f;
if (dwh2 == null) {
C14957gcv.a("");
} else {
dwh = dwh2;
}
Dwh dwh3 = dwh;
if (getActivity() != null) {
dwh3.c(((BaseActivity) getActivity()).scbAnalytics, "planetscb_conversion_sell_slip_screen");
return;
}
return;
}
Dwh dwh4 = this.f;
if (dwh4 == null) {
C14957gcv.a("");
} else {
dwh = dwh4;
}
Dwh dwh5 = dwh;
if (getActivity() != null) {
dwh5.c(((BaseActivity) getActivity()).scbAnalytics, "planetscb_conversion_buy_slip_screen");
}
}
}
/* loaded from: classes5.dex */
static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR<Uri, C14866gag> {
private boolean a;
private PrepaidTravelConversionSuccessFragment b;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Uri uri) {
this.b.b(uri.toString(), this.a);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
HBt(PrepaidTravelConversionSuccessFragment prepaidTravelConversionSuccessFragment, boolean z) {
super(1);
this.b = prepaidTravelConversionSuccessFragment;
this.a = z;
}
}
/* loaded from: classes5.dex */
static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private PrepaidTravelConversionSuccessFragment c;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
this.c.o();
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
Sts(PrepaidTravelConversionSuccessFragment prepaidTravelConversionSuccessFragment) {
super(1);
this.c = prepaidTravelConversionSuccessFragment;
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C7659csW c7659csW = this.successPresenter;
if (c7659csW == null) {
C14957gcv.a("");
c7659csW = null;
}
c7659csW.w_();
super.onDestroyView();
}
public static /* synthetic */ void e(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void b(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
}