470 lines
16 KiB
Java
470 lines
16 KiB
Java
package com.scb.phone.view.fragment.hml;
|
|
|
|
import android.content.Intent;
|
|
import android.net.Uri;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.Button;
|
|
import android.widget.TextView;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.BaseActivity;
|
|
import com.scb.phone.view.custom.hml.CustomLoanSuccessInformation;
|
|
import com.scb.phone.view.custom.tierpricing.TierPricingSimplePromotionView;
|
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource;
|
|
import com.scb.phone.view.fragment.PurchaseSuccessFragment;
|
|
import com.scb.phone.view.fragment.ScreenShotFragment;
|
|
import com.scb.phone.view.fragment.hml.HmlBaseOnlineSuccessFragment;
|
|
import java.util.Calendar;
|
|
import java.util.List;
|
|
import o.AbstractC13163fSk;
|
|
import o.AbstractC14961gcz;
|
|
import o.AbstractC5117bmw;
|
|
import o.C13417fZt;
|
|
import o.C14823gO;
|
|
import o.C14866gag;
|
|
import o.C14957gcv;
|
|
import o.C2253abC;
|
|
import o.C2254abD;
|
|
import o.C2258abH;
|
|
import o.C2301aby;
|
|
import o.C6204cLu;
|
|
import o.C6583cXR;
|
|
import o.EW;
|
|
import o.EnumC8951daY;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC13393fZL;
|
|
import o.InterfaceC14890gbN;
|
|
import o.InterfaceC14894gbR;
|
|
import o.InterfaceC9298dhB;
|
|
import o.NS;
|
|
import o.QI;
|
|
import o.ZI;
|
|
import o.fKR;
|
|
import o.fKY;
|
|
import o.fRR;
|
|
import o.fSJ;
|
|
import o.fSQ;
|
|
import o.fZZ;
|
|
import o.kVs;
|
|
import org.jmrtd.lds.ImageInfo;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class HmlBaseOnlineSuccessFragment<T extends AbstractC5117bmw> extends ScreenShotFragment<EW> implements InterfaceC9298dhB {
|
|
private fSJ c;
|
|
|
|
@InterfaceC13391fZD
|
|
public C14823gO componentFactory;
|
|
final InterfaceC13393fZL d;
|
|
|
|
@BindView
|
|
public CustomLoanSuccessInformation loanInfo;
|
|
|
|
@BindView
|
|
public CustomTransferAndPaySource receivingAccount;
|
|
|
|
@BindView
|
|
public TextView referenceId;
|
|
|
|
@BindView
|
|
public Button registerButton;
|
|
|
|
@BindView
|
|
public TextView remarkTextView;
|
|
|
|
@BindView
|
|
public Button returnToHome;
|
|
|
|
@BindView
|
|
public Button saveSlip;
|
|
|
|
@InterfaceC13391fZD
|
|
public C6204cLu themesSlipPresenter;
|
|
|
|
@BindView
|
|
public TextView transactionDate;
|
|
|
|
public abstract T g();
|
|
|
|
@Override // o.cYH
|
|
public final /* bridge */ /* synthetic */ void c(EW ew, boolean z) {
|
|
c((HmlBaseOnlineSuccessFragment<T>) ew, z);
|
|
}
|
|
|
|
public HmlBaseOnlineSuccessFragment() {
|
|
Sts sts = new Sts(this);
|
|
C14957gcv.e(sts, "");
|
|
this.d = new fZZ(sts);
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
static final class Sts extends AbstractC14961gcz implements InterfaceC14890gbN<T> {
|
|
private HmlBaseOnlineSuccessFragment<T> c;
|
|
|
|
@Override // o.InterfaceC14890gbN
|
|
public final /* synthetic */ Object invoke() {
|
|
return this.c.g();
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
Sts(HmlBaseOnlineSuccessFragment<T> hmlBaseOnlineSuccessFragment) {
|
|
super(0);
|
|
this.c = hmlBaseOnlineSuccessFragment;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View inflate = layoutInflater.inflate(R.layout.2131559720, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
((AbstractC5117bmw) this.d.e()).e((AbstractC5117bmw) this);
|
|
((AbstractC5117bmw) this.d.e()).b();
|
|
Button button = this.saveSlip;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setOnClickListener(new View.OnClickListener(this) { // from class: o.eZU
|
|
private HmlBaseOnlineSuccessFragment b;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
HmlBaseOnlineSuccessFragment.c(this.b);
|
|
}
|
|
|
|
{
|
|
this.b = this;
|
|
}
|
|
});
|
|
C14957gcv.c(inflate, "");
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC9298dhB
|
|
public void d(NS ns) {
|
|
C14957gcv.e(ns, "");
|
|
TextView textView = this.transactionDate;
|
|
CustomTransferAndPaySource customTransferAndPaySource = null;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(ns.b);
|
|
TextView textView2 = this.referenceId;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
textView2.setText(ns.a);
|
|
CustomLoanSuccessInformation customLoanSuccessInformation = this.loanInfo;
|
|
if (customLoanSuccessInformation == null) {
|
|
C14957gcv.a("");
|
|
customLoanSuccessInformation = null;
|
|
}
|
|
String string = getString(R.string.hml_success_loan_amount_title);
|
|
C14957gcv.c((Object) string, "");
|
|
customLoanSuccessInformation.setAmountTitle(string);
|
|
CustomLoanSuccessInformation customLoanSuccessInformation2 = this.loanInfo;
|
|
if (customLoanSuccessInformation2 == null) {
|
|
C14957gcv.a("");
|
|
customLoanSuccessInformation2 = null;
|
|
}
|
|
String string2 = getString(R.string.hml_success_principal_amount, ns.d.a);
|
|
C14957gcv.c((Object) string2, "");
|
|
customLoanSuccessInformation2.setAmount(string2);
|
|
CustomLoanSuccessInformation customLoanSuccessInformation3 = this.loanInfo;
|
|
if (customLoanSuccessInformation3 == null) {
|
|
C14957gcv.a("");
|
|
customLoanSuccessInformation3 = null;
|
|
}
|
|
customLoanSuccessInformation3.setPromotion(ns.d.e);
|
|
CustomLoanSuccessInformation customLoanSuccessInformation4 = this.loanInfo;
|
|
if (customLoanSuccessInformation4 == null) {
|
|
C14957gcv.a("");
|
|
customLoanSuccessInformation4 = null;
|
|
}
|
|
TierPricingSimplePromotionView tierPricingSimplePromotionView = customLoanSuccessInformation4.promotion;
|
|
if (tierPricingSimplePromotionView == null) {
|
|
C14957gcv.a("");
|
|
tierPricingSimplePromotionView = null;
|
|
}
|
|
tierPricingSimplePromotionView.setDisplay(ns.d.e);
|
|
CustomLoanSuccessInformation customLoanSuccessInformation5 = this.loanInfo;
|
|
if (customLoanSuccessInformation5 == null) {
|
|
C14957gcv.a("");
|
|
customLoanSuccessInformation5 = null;
|
|
}
|
|
String string3 = getString(R.string.hml_success_repayment_amount, ns.d.d, ns.d.c);
|
|
C14957gcv.c((Object) string3, "");
|
|
customLoanSuccessInformation5.setRepayment(string3);
|
|
CustomTransferAndPaySource customTransferAndPaySource2 = this.receivingAccount;
|
|
if (customTransferAndPaySource2 == null) {
|
|
C14957gcv.a("");
|
|
customTransferAndPaySource2 = null;
|
|
}
|
|
customTransferAndPaySource2.setAccountNumber(ns.e);
|
|
CustomTransferAndPaySource customTransferAndPaySource3 = this.receivingAccount;
|
|
if (customTransferAndPaySource3 == null) {
|
|
C14957gcv.a("");
|
|
customTransferAndPaySource3 = null;
|
|
}
|
|
customTransferAndPaySource3.setSourceName(ns.c);
|
|
CustomTransferAndPaySource customTransferAndPaySource4 = this.receivingAccount;
|
|
if (customTransferAndPaySource4 == null) {
|
|
C14957gcv.a("");
|
|
customTransferAndPaySource4 = null;
|
|
}
|
|
customTransferAndPaySource4.setText(getString(R.string.hml_success_to));
|
|
CustomTransferAndPaySource customTransferAndPaySource5 = this.receivingAccount;
|
|
if (customTransferAndPaySource5 != null) {
|
|
customTransferAndPaySource = customTransferAndPaySource5;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
customTransferAndPaySource.setAvatar(C6583cXR.VS_(getContext(), R.drawable.bankicon_scb).toString());
|
|
}
|
|
|
|
@OnClick
|
|
public final void onAccountSummaryClick() {
|
|
AbstractC5117bmw abstractC5117bmw = (AbstractC5117bmw) this.d.e();
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.bmx
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9298dhB) obj).e();
|
|
}
|
|
};
|
|
if (abstractC5117bmw.f != 0) {
|
|
ieS.e(abstractC5117bmw.f);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroyView() {
|
|
fSJ fsj = this.c;
|
|
if (fsj != null) {
|
|
if (!(!fsj.isDisposed())) {
|
|
fsj = null;
|
|
}
|
|
if (fsj != null) {
|
|
fsj.dispose();
|
|
}
|
|
}
|
|
((AbstractC5117bmw) this.d.e()).w_();
|
|
super.onDestroyView();
|
|
}
|
|
|
|
@Override // o.InterfaceC8936daJ
|
|
public final void c(boolean z) {
|
|
Button button = this.saveSlip;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setVisibility(z ? 0 : 8);
|
|
}
|
|
|
|
@Override // o.cYH
|
|
public final void a(String str) {
|
|
C14957gcv.e(str, "");
|
|
v("share_slip_action");
|
|
Intent intent = new Intent("android.intent.action.SEND");
|
|
intent.setType(ImageInfo.JPEG_MIME_TYPE);
|
|
intent.addFlags(1);
|
|
intent.putExtra("android.intent.extra.STREAM", Uri.parse(str));
|
|
startActivity(Intent.createChooser(intent, getString(R.string.share_slip)));
|
|
}
|
|
|
|
@Override // o.cYH
|
|
public final void j() {
|
|
FragmentActivity requireActivity = requireActivity();
|
|
String string = getString(R.string.saved_slip);
|
|
EnumC8951daY enumC8951daY = EnumC8951daY.SUCCESS;
|
|
if (getActivity() != null) {
|
|
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), requireActivity, Integer.valueOf(R.id.root_view), string, enumC8951daY}, 855668825, -855668822, R.id.root_view);
|
|
}
|
|
}
|
|
|
|
@Override // o.cYH
|
|
public final void c() {
|
|
FragmentActivity requireActivity = requireActivity();
|
|
String string = getString(R.string.saved_slip_error);
|
|
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
|
|
if (getActivity() != null) {
|
|
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), requireActivity, Integer.valueOf(R.id.root_view), string, enumC8951daY}, 855668825, -855668822, R.id.root_view);
|
|
}
|
|
}
|
|
|
|
@Override // o.cYH
|
|
public final void e(boolean z) {
|
|
Button button = this.saveSlip;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setBackgroundResource(z ? R.drawable.bg_button : R.drawable.bg_button_transparent);
|
|
Button button2 = this.saveSlip;
|
|
if (button2 == null) {
|
|
C14957gcv.a("");
|
|
button2 = null;
|
|
}
|
|
button2.setTextColor(kVs.nX_(getResources(), z ? R.color.f14042131100912 : R.color.f13682131100876, null));
|
|
}
|
|
|
|
@Override // o.cYH
|
|
public final void d(EW ew) {
|
|
C14957gcv.e(ew, "");
|
|
((AbstractC5117bmw) this.d.e()).e(ew, (List<QI>) null);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.ScreenShotFragment
|
|
public final void d(EW ew, boolean z, boolean z2) {
|
|
C14823gO c14823gO;
|
|
C6204cLu c6204cLu = this.themesSlipPresenter;
|
|
if (c6204cLu == null) {
|
|
C14957gcv.a("");
|
|
c6204cLu = null;
|
|
}
|
|
LWm lWm = new LWm(c6204cLu);
|
|
String e = e(ew);
|
|
C14823gO c14823gO2 = this.componentFactory;
|
|
if (c14823gO2 != null) {
|
|
c14823gO = c14823gO2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
c14823gO = null;
|
|
}
|
|
AbstractC13163fSk subscribeOn = AbstractC13163fSk.fromCallable(new fKY(lWm, new PurchaseSuccessFragment.PurchaseScreenshotDisplay(R.layout.2131560122, e, ew, z, c14823gO, z2), getContext())).observeOn(fRR.e()).subscribeOn(C13417fZt.b());
|
|
final IeS ieS = new IeS(this, z);
|
|
fSQ fsq = new fSQ(ieS) { // from class: o.eZV
|
|
private InterfaceC14894gbR b;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
HmlBaseOnlineSuccessFragment.c(this.b, obj);
|
|
}
|
|
|
|
{
|
|
this.b = ieS;
|
|
}
|
|
};
|
|
final HBt hBt = new HBt(this);
|
|
this.c = subscribeOn.subscribe(fsq, new fSQ(hBt) { // from class: o.eZY
|
|
private InterfaceC14894gbR e;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
HmlBaseOnlineSuccessFragment.e(this.e, obj);
|
|
}
|
|
|
|
{
|
|
this.e = hBt;
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes5.dex */
|
|
public static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
|
|
private HmlBaseOnlineSuccessFragment<T> b;
|
|
|
|
@Override // o.InterfaceC14894gbR
|
|
public final /* synthetic */ C14866gag invoke(Throwable th) {
|
|
AbstractC5117bmw abstractC5117bmw = (AbstractC5117bmw) this.b.d.e();
|
|
C2258abH c2258abH = new C2258abH();
|
|
if (abstractC5117bmw.f != 0) {
|
|
c2258abH.e(abstractC5117bmw.f);
|
|
}
|
|
return C14866gag.c;
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
HBt(HmlBaseOnlineSuccessFragment<T> hmlBaseOnlineSuccessFragment) {
|
|
super(1);
|
|
this.b = hmlBaseOnlineSuccessFragment;
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes5.dex */
|
|
public static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR<Uri, C14866gag> {
|
|
private HmlBaseOnlineSuccessFragment<T> a;
|
|
private boolean d;
|
|
|
|
@Override // o.InterfaceC14894gbR
|
|
public final /* synthetic */ C14866gag invoke(Uri uri) {
|
|
AbstractC5117bmw abstractC5117bmw = (AbstractC5117bmw) this.a.d.e();
|
|
String obj = uri.toString();
|
|
if (this.d) {
|
|
C2253abC c2253abC = new C2253abC(obj);
|
|
if (abstractC5117bmw.f != 0) {
|
|
c2253abC.e(abstractC5117bmw.f);
|
|
}
|
|
} else {
|
|
C2301aby c2301aby = new C2301aby();
|
|
if (abstractC5117bmw.f != 0) {
|
|
c2301aby.e(abstractC5117bmw.f);
|
|
}
|
|
}
|
|
return C14866gag.c;
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
IeS(HmlBaseOnlineSuccessFragment<T> hmlBaseOnlineSuccessFragment, boolean z) {
|
|
super(1);
|
|
this.a = hmlBaseOnlineSuccessFragment;
|
|
this.d = z;
|
|
}
|
|
}
|
|
|
|
private static String e(EW ew) {
|
|
String d = ew != null ? ew.d(String.valueOf(Calendar.getInstance().getTimeInMillis())) : null;
|
|
return d == null ? "" : d;
|
|
}
|
|
|
|
/* 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);
|
|
purchaseScreenshotDisplay2.a(view);
|
|
}
|
|
|
|
public LWm() {
|
|
}
|
|
|
|
/* 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 e(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
|
|
C14957gcv.e(interfaceC14894gbR, "");
|
|
interfaceC14894gbR.invoke(obj);
|
|
}
|
|
|
|
public static /* synthetic */ void c(HmlBaseOnlineSuccessFragment hmlBaseOnlineSuccessFragment) {
|
|
C14957gcv.e(hmlBaseOnlineSuccessFragment, "");
|
|
AbstractC5117bmw abstractC5117bmw = (AbstractC5117bmw) hmlBaseOnlineSuccessFragment.d.e();
|
|
C2254abD c2254abD = new C2254abD(abstractC5117bmw);
|
|
if (abstractC5117bmw.f != 0) {
|
|
c2254abD.e(abstractC5117bmw.f);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
|
|
C14957gcv.e(interfaceC14894gbR, "");
|
|
interfaceC14894gbR.invoke(obj);
|
|
}
|
|
}
|