what-the-bank/sources/com/scb/phone/view/fragment/transferandpay/billpayment/BillPaymentSuccessFragment....

993 lines
36 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.transferandpay.billpayment;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.OnClick;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.donations.SharingMomentsPreviewActivity;
import com.scb.phone.view.custom.accountsummary.ImageAdBannerView;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.custom.common.CustomInputDialog;
import com.scb.phone.view.custom.common.DefaultButton;
import com.scb.phone.view.custom.transferandpay.CustomMovieTicket;
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayTarget;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.transferandpay.billpayment.BillPaymentSuccessFragment;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
import o.C0375Fe;
import o.C0693Mj;
import o.C10456eEq;
import o.C1189Xo;
import o.C1191Xp;
import o.C12944fLv;
import o.C14957gcv;
import o.C6583cXR;
import o.EnumC8951daY;
import o.FVz;
import o.InterfaceC13391fZD;
import o.InterfaceC15577gud;
import o.InterfaceC9010dbe;
import o.InterfaceC9014dbi;
import o.JF;
import o.XF;
import o.ZI;
import o.cNJ;
import o.eBM;
import o.fEF;
import o.fEG;
import o.fEH;
import o.fHN;
import o.fJM;
import o.fSJ;
import o.fSQ;
import o.gdZ;
import o.guQ;
import o.nMh;
import o.pug;
import org.jmrtd.lds.ImageInfo;
/* loaded from: classes5.dex */
public class BillPaymentSuccessFragment extends Hilt_BillPaymentSuccessFragment implements InterfaceC9014dbi, ViewTreeObserver.OnGlobalLayoutListener, fHN {
@BindView
RecyclerView additionalRecyclerView;
@BindView
DefaultButton autoSaveOffDonationsSaveButton;
@BindView
DefaultButton autoSaveOffSaveButton;
@BindView
DefaultButton autoSaveOffShareButton;
@BindView
LinearLayout billLinearLayout;
@BindView
RelativeLayout billPaymentRelativeLayout;
@BindView
ViewGroup bnplDivider;
@BindView
TextView coachmarkQRCodeSectionDescription;
@BindView
TextView coachmarkQRCodeSectionHeader;
private Uri d;
@BindView
ImageView endSlipImage;
@BindView
ImageView expandIcon;
private Uri f;
private boolean h;
private boolean i;
@BindView
ImageAdBannerView imageAdBannerView;
@BindView
ImageView ivVoidRemark;
private fSJ l;
@BindView
View lineBlackView;
@BindView
View lineView;
@BindView
LinearLayout llBNPLLoanDetail;
@BindView
LinearLayout llBNPLPaymentMethod;
@BindView
LinearLayout llVoidRemarkContainer;
private fSJ m;
@BindView
ImageView mOverlayQRCodeSectionCoachmarkImageView;
@BindView
RelativeLayout mQRCodeSectionCoachmarkContainer;
@BindView
TextView mRemainingBalanceTextView;
@BindView
RelativeLayout mRootView;
@BindView
CustomMovieTicket movieTicket;
private C1191Xp n;
/* renamed from: o */
private CustomInputDialog f8075o;
@BindView
public TextView qrCodeDescriptionTextView;
@BindView
public ImageView qrCodeImageView;
@BindView
LinearLayout qrCodeLayout;
@BindView
public TextView qrCodeSectionHeaderTextView;
@BindView
LinearLayout qrCodeSectionView;
@BindView
TextView refIdTextView;
@BindView
TextView returnTextView;
@BindView
TextView scheduleNote;
@BindView
DefaultButton shareButton;
@BindView
DefaultButton shareMomentButton;
@BindView
RelativeLayout slipRelativeLayout;
@InterfaceC13391fZD
public cNJ successPresenter;
@InterfaceC13391fZD
public C12944fLv successScreenshotHelper;
@BindView
ViewGroup ticketDivider;
@BindView
TextView tvAmountWithFeeDiscount;
@BindView
TextView tvAmountWithInterest;
@BindView
TextView tvAmountWithInterestValue;
@BindView
TextView tvAmountWithMonthInterestRateValue;
@BindView
TextView tvAmountWithoutInterest;
@BindView
TextView tvAmountWithoutInterestValue;
@BindView
TextView tvBNPLShareSlipNote;
@BindView
TextView tvDueDate;
@BindView
TextView tvInstallmentValue;
@BindView
TextView tvInterestRatePerMonth;
@BindView
TextView tvPeriods;
@BindView
TextView tvProductName;
@BindView
TextView tvProductValue;
@BindView
TextView tvRepaymentValue;
@BindView
TextView tvTotalInterestFee;
@BindView
TextView tvTotalInterestValue;
@BindView
TextView tvVoidRemarkDescription;
@BindView
TextView tvVoidRemarkTitle;
private boolean c = false;
private boolean k = false;
private boolean j = false;
@Override // o.InterfaceC9010dbe.SWS
public final void c(List<C0375Fe> list) {
}
public static BillPaymentSuccessFragment c(C1191Xp c1191Xp) {
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.EXTRA_SUCCESS", c1191Xp);
BillPaymentSuccessFragment billPaymentSuccessFragment = new BillPaymentSuccessFragment();
billPaymentSuccessFragment.setArguments(bundle);
return billPaymentSuccessFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
return layoutInflater.inflate(R.layout.2131559467, viewGroup, false);
}
@Override // androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
super.onViewCreated(view, bundle);
Optional.ofNullable(getArguments()).map(new Function() { // from class: o.fEI
@Override // java.util.function.Function
public final Object apply(Object obj) {
Object parcelable;
parcelable = ((Bundle) obj).getParcelable("com.scb.phone.EXTRA_SUCCESS");
return parcelable;
}
}).map(new Function(C1191Xp.class) { // from class: o.fEv
private Class d;
@Override // java.util.function.Function
public final Object apply(Object obj) {
Object cast;
cast = this.d.cast(obj);
return (C1191Xp) cast;
}
{
this.d = r1;
}
}).ifPresent(new Consumer(this, view) { // from class: o.fEu
private BillPaymentSuccessFragment c;
private View d;
@Override // java.util.function.Consumer
public final void accept(Object obj) {
BillPaymentSuccessFragment.b(this.c, this.d, (C1191Xp) obj);
}
{
this.c = this;
this.d = view;
}
});
}
@Override // o.InterfaceC9010dbe.SWS
public final void e() {
this.tvBNPLShareSlipNote.setVisibility(0);
this.tvBNPLShareSlipNote.setText(R.string.billpayment_bnpl_share_slip_description);
this.bnplDivider.setVisibility(0);
this.llBNPLLoanDetail.setVisibility(0);
this.llBNPLPaymentMethod.setVisibility(0);
this.tvAmountWithFeeDiscount.setVisibility(0);
if (this.g != null) {
String string = getString(R.string.percentage);
String string2 = getString(R.string.billpayment_bnpl_total_interest_fee_1, this.g.I, string);
String string3 = getString(R.string.billpayment_bnpl_total_interest_fee_2, this.g.R, string);
this.tvProductName.setText(getString(R.string.billpayment_bnpl_from_up_service_title, this.g.ae));
this.tvProductValue.setText(this.g.M);
this.tvTotalInterestFee.setText(String.format("%s%s", string2, string3));
this.tvTotalInterestValue.setText(this.g.az);
this.tvPeriods.setText(getString(R.string.billpayment_bnpl_number_of_month_value, this.g.aC));
this.tvRepaymentValue.setText(getString(R.string.billpayment_bnpl_period_value, this.g.aw));
this.tvInstallmentValue.setText(this.g.aG);
this.tvInterestRatePerMonth.setText(getString(R.string.billpayment_bnpl_monthly_interest_rate_slip_title));
this.tvAmountWithMonthInterestRateValue.setText(this.g.R.concat(getString(R.string.percentage)));
this.tvAmountWithFeeDiscount.setText(getString(R.string.billpayment_bnpl_monthly_interest_rate_remark, this.g.I, getString(R.string.percentage)));
this.mRemainingBalanceTextView.setText(String.format(getString(R.string.billpayment_bnpl_balance_share_slip), this.n.t));
}
}
@Override // o.InterfaceC9010dbe.SWS
public final void b() {
this.tvDueDate.setVisibility(0);
this.tvDueDate.setText(this.g.u);
}
@Override // o.InterfaceC9010dbe.SWS
public final void a() {
this.tvDueDate.setVisibility(8);
}
@Override // o.InterfaceC9010dbe.SWS
public final void d() {
this.tvAmountWithoutInterest.setVisibility(0);
this.tvAmountWithoutInterestValue.setVisibility(0);
this.tvAmountWithInterest.setVisibility(0);
this.tvAmountWithInterestValue.setVisibility(0);
this.tvAmountWithoutInterestValue.setText(this.g.J);
this.tvAmountWithInterestValue.setText(this.g.L);
}
@Override // o.InterfaceC9010dbe.SWS
public final void c() {
CustomTransferAndPayTarget customTransferAndPayTarget = this.customTarget;
customTransferAndPayTarget.mFavouriteIcon.setVisibility(8);
customTransferAndPayTarget.mFavouriteName.setVisibility(8);
this.customTarget.setAddFavoriteButtonVisible(false);
}
@Override // o.InterfaceC9010dbe.SWS
public final void r() {
this.customTarget.setAddFavoriteButtonVisible(true);
}
@Override // o.InterfaceC9010dbe.SWS
public final void a(String str) {
this.customTarget.setFavoriteName(str);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
cNJ cnj = this.successPresenter;
if (cnj != null) {
cnj.w_();
}
fSJ fsj = this.m;
if (fsj != null) {
fsj.dispose();
}
fSJ fsj2 = this.l;
if (fsj2 != null) {
fsj2.dispose();
}
super.onDestroy();
}
@Override // androidx.fragment.app.Fragment
public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i, strArr, iArr);
fEF.b(this, i, iArr);
}
public final void b(boolean z) {
Context context = getContext();
if (isDetached() || context == null || this.h || this.n.p.at != null) {
return;
}
this.h = !z;
this.m = this.successScreenshotHelper.d(this.n, context, true, z, false).subscribe(new fEH(this), new fEG(this));
}
public final void b(InterfaceC15577gud interfaceC15577gud) {
guQ.b("onShowRationale", new Object[0]);
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.permission_storage_title).d(R.string.permission_storage).aoT_(R.string.permission_allow, new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.fEw
private InterfaceC15577gud a;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
this.a.c();
}
{
this.a = interfaceC15577gud;
}
}), Integer.valueOf(R.string.permission_deny), new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.fEy
private InterfaceC15577gud b;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
this.b.e();
}
{
this.b = interfaceC15577gud;
}
}})).show();
}
public static void A() {
guQ.b("onPermissionDenied", new Object[0]);
}
public static void w() {
guQ.b("onNeverAskAgain", new Object[0]);
}
@Override // o.InterfaceC9010dbe.SWS
public final void n() {
c("share_slip_action", new pug("source", "movie"));
}
@Override // o.InterfaceC9010dbe.SWS
public final void o() {
c("billpay_slip", new pug("source", "lvl"), new pug("subtype", O()), new pug("button", "share_slip"));
}
@Override // o.InterfaceC9010dbe.SWS
public final void h() {
c("bnpl_billpay_slip_share", new pug("source", Q()), new pug("subtype", O()));
}
@Override // o.InterfaceC9010dbe.SWS
public final void i() {
c("billpay_slip", new pug("source", Q()), new pug("subtype", O()), new pug("button", "share_slip"));
}
@Override // o.InterfaceC9010dbe.SWS
public final void j() {
v("share_slip_action");
}
public static void B() {
guQ.b("onPermissionDeniedAndroid13", new Object[0]);
}
public static void z() {
guQ.b("onNeverAskAgainAndroid13", new Object[0]);
}
@OnClick
@butterknife.Optional
public void onShareButtonClick() {
Uri uri;
Uri uri2;
if (("BNPL_PAYMENT".equals(this.g.j()) && ((uri2 = this.d) == null || uri2.toString().isEmpty())) || (uri = this.f) == null || uri.toString().isEmpty()) {
c(R.string.share_error, EnumC8951daY.ERROR);
return;
}
cNJ cnj = this.successPresenter;
C1191Xp c1191Xp = this.n;
boolean a = a(c1191Xp);
boolean D = D();
if (c1191Xp != null) {
ZI.IeS ieS = new ZI.IeS(a, D, c1191Xp) { // from class: o.cNP
private boolean b;
private C1191Xp c;
private boolean d;
@Override // o.ZI.IeS
public final void e(Object obj) {
cNJ.d(this.b, this.d, this.c, (InterfaceC9010dbe.SWS) obj);
}
{
this.b = a;
this.d = D;
this.c = c1191Xp;
}
};
if (cnj.f != 0) {
ieS.e(cnj.f);
}
}
Intent intent = new Intent("android.intent.action.SEND");
intent.setType(ImageInfo.JPEG_MIME_TYPE);
intent.addFlags(1);
intent.putExtra("android.intent.extra.STREAM", "BNPL_PAYMENT".equals(this.g.j()) ? this.d : this.f);
startActivity(Intent.createChooser(intent, getString(R.string.share_slip)));
}
@Override // o.InterfaceC9010dbe.SWS
public final void f() {
c("bnpl_billpay_slip_accountsummary", new pug("source", Q()), new pug("subtype", O()));
}
@OnClick
@butterknife.Optional
public void onAddFavoriteClick() {
CustomInputDialog b = CustomInputDialog.b(getContext());
this.f8075o = b;
String string = getString(R.string.favourite_name);
if (string != null) {
b.mTitleTextView.setVisibility(0);
b.mTitleTextView.setText(string);
}
this.f8075o.mEditTextView.addTextChangedListener(new TextWatcher(this) { // from class: com.scb.phone.view.fragment.transferandpay.billpayment.BillPaymentSuccessFragment.3
private BillPaymentSuccessFragment c;
@Override // android.text.TextWatcher
public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override // android.text.TextWatcher
public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
AnonymousClass3(BillPaymentSuccessFragment this) {
this.c = this;
}
@Override // android.text.TextWatcher
public final void afterTextChanged(Editable editable) {
this.c.f8075o.mErrorTextView.setVisibility(8);
}
});
this.f8075o.mEditTextView.setFilters(new InputFilter[]{new InputFilter.LengthFilter(20)});
this.f8075o.setCanceledOnTouchOutside(false);
this.f8075o.mEditTextView.setVisibility(0);
this.f8075o.apc_(R.string.cancel, new DialogInterface.OnClickListener() { // from class: o.fEC
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
});
CustomInputDialog customInputDialog = this.f8075o;
String string2 = getString(R.string.add_favourite);
DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener(this) { // from class: o.fEB
private BillPaymentSuccessFragment b;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
BillPaymentSuccessFragment.b(this.b);
}
{
this.b = this;
}
};
if (string2 != null) {
customInputDialog.mPositiveButton.setText(string2);
customInputDialog.mPositiveButton.setOnClickListener(new eBM(customInputDialog, onClickListener, false));
}
if (!isAdded() || getContext() == null) {
return;
}
this.f8075o.show();
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: com.scb.phone.view.fragment.transferandpay.billpayment.BillPaymentSuccessFragment$3 */
/* loaded from: classes5.dex */
public final class AnonymousClass3 implements TextWatcher {
private BillPaymentSuccessFragment c;
@Override // android.text.TextWatcher
public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override // android.text.TextWatcher
public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
AnonymousClass3(BillPaymentSuccessFragment this) {
this.c = this;
}
@Override // android.text.TextWatcher
public final void afterTextChanged(Editable editable) {
this.c.f8075o.mErrorTextView.setVisibility(8);
}
}
@Override // o.InterfaceC9010dbe.SWS
public final void c(String str) {
c(R.string.favourite_added_successfully, EnumC8951daY.SUCCESS);
CustomInputDialog customInputDialog = this.f8075o;
if (customInputDialog != null) {
customInputDialog.dismiss();
}
this.customTarget.setFavoriteName(str);
this.customTarget.setAddFavoriteButtonVisible(false);
}
@Override // o.InterfaceC9010dbe.SWS
public final void c(C0693Mj c0693Mj) {
e(c0693Mj);
}
@Override // o.InterfaceC9010dbe.SWS
public final void e(JF jf) {
SharingMomentsPreviewActivity.e(getContext(), jf);
}
@OnClick
public void saveSlipButton() {
this.k = true;
e(true);
}
@OnClick
public void saveSlipDonationsButton() {
this.k = true;
e(true);
}
@OnClick
public void setShareMomentButton() {
this.successPresenter.b(this.n);
}
@Override // o.InterfaceC9010dbe.SWS
public final void k() {
c("billpay_slip", new pug("source", Q()), new pug("subtype", O()), new pug("button", "share_moment"));
}
@OnClick
public void shareSlipButton() {
onShareButtonClick();
}
private void c(int i, EnumC8951daY enumC8951daY) {
FragmentActivity activity = getActivity();
if (activity != null) {
String string = getString(i);
if (getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), activity, Integer.valueOf(R.id.success_view_container), string, enumC8951daY}, 855668825, -855668822, R.id.success_view_container);
}
}
}
@OnClick
public void onClickQRCodeLayout() {
if (this.qrCodeSectionView.getVisibility() == 8) {
fJM.e(this.qrCodeSectionView);
} else {
fJM.d(this.qrCodeSectionView);
}
fJM.b(this.expandIcon);
}
@Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
public void onGlobalLayout() {
this.mRootView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
@OnClick
public void closeTutorial() {
this.mRootView.removeView(this.mQRCodeSectionCoachmarkContainer);
this.mRootView.removeView(this.mOverlayQRCodeSectionCoachmarkImageView);
}
@Override // o.fHN
public final void s() {
if (getContext() != null) {
this.successPresenter.a();
}
}
@Override // o.InterfaceC9010dbe.SWS
public final void e(String str, String str2, String str3) {
this.llVoidRemarkContainer.setVisibility(0);
if (str != null) {
C10456eEq.aqe_(this.ivVoidRemark, str, null);
}
this.tvVoidRemarkTitle.setText(str2);
this.tvVoidRemarkDescription.setText(str3);
}
@Override // o.InterfaceC9010dbe.SWS
public final void g() {
c("bnpl_billpay_slip", new pug("source", Q()), new pug("subtype", O()));
}
public static /* synthetic */ void b(BillPaymentSuccessFragment billPaymentSuccessFragment) {
if (String.valueOf(billPaymentSuccessFragment.f8075o.mEditTextView.getText()) != null) {
if (((Boolean) C6583cXR.c(new Object[]{String.valueOf(billPaymentSuccessFragment.f8075o.mEditTextView.getText())}, -1032102340, 1032102340, (int) System.currentTimeMillis())).booleanValue()) {
billPaymentSuccessFragment.successPresenter.e(billPaymentSuccessFragment.n, String.valueOf(billPaymentSuccessFragment.f8075o.mEditTextView.getText()));
return;
}
CustomInputDialog customInputDialog = billPaymentSuccessFragment.f8075o;
String string = billPaymentSuccessFragment.getString(R.string.favorite_invalid_character);
customInputDialog.mErrorTextView.setVisibility(0);
customInputDialog.mErrorTextView.setText(string);
}
}
public static /* synthetic */ void a(BillPaymentSuccessFragment billPaymentSuccessFragment, Throwable th) {
guQ.a(th, "onSaveScreenshotError", new Object[0]);
FragmentActivity activity = billPaymentSuccessFragment.getActivity();
if (billPaymentSuccessFragment.isDetached() || activity == null) {
return;
}
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
FragmentActivity activity2 = billPaymentSuccessFragment.getActivity();
if (activity2 != null) {
String string = billPaymentSuccessFragment.getString(R.string.saved_slip_error);
if (billPaymentSuccessFragment.getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) billPaymentSuccessFragment.getActivity(), activity2, Integer.valueOf(R.id.success_view_container), string, enumC8951daY}, 855668825, -855668822, R.id.success_view_container);
}
}
}
public static /* synthetic */ void axZ_(BillPaymentSuccessFragment billPaymentSuccessFragment, Uri uri) {
billPaymentSuccessFragment.f = uri;
FragmentActivity activity = billPaymentSuccessFragment.getActivity();
if ("BNPL_PAYMENT".equals(billPaymentSuccessFragment.g.j())) {
Context context = billPaymentSuccessFragment.getContext();
if (!billPaymentSuccessFragment.isDetached() && context != null) {
billPaymentSuccessFragment.m = billPaymentSuccessFragment.successScreenshotHelper.d(billPaymentSuccessFragment.n, context, false, false, true).subscribe(new fSQ(billPaymentSuccessFragment) { // from class: o.fEz
private BillPaymentSuccessFragment e;
@Override // o.fSQ
public final void c(Object obj) {
this.e.d = (Uri) obj;
}
{
this.e = billPaymentSuccessFragment;
}
}, new fSQ(billPaymentSuccessFragment) { // from class: o.fED
private BillPaymentSuccessFragment d;
@Override // o.fSQ
public final void c(Object obj) {
BillPaymentSuccessFragment.b(this.d, (Throwable) obj);
}
{
this.d = billPaymentSuccessFragment;
}
});
}
}
if (uri.toString().isEmpty() || !billPaymentSuccessFragment.getUserVisibleHint() || activity == null || !billPaymentSuccessFragment.k) {
return;
}
EnumC8951daY enumC8951daY = EnumC8951daY.SUCCESS;
FragmentActivity activity2 = billPaymentSuccessFragment.getActivity();
if (activity2 != null) {
String string = billPaymentSuccessFragment.getString(R.string.saved_slip);
if (billPaymentSuccessFragment.getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) billPaymentSuccessFragment.getActivity(), activity2, Integer.valueOf(R.id.success_view_container), string, enumC8951daY}, 855668825, -855668822, R.id.success_view_container);
}
}
billPaymentSuccessFragment.k = false;
}
public static /* synthetic */ void b(BillPaymentSuccessFragment billPaymentSuccessFragment, Throwable th) {
guQ.a(th, "onBNPLSaveShareSlipError", new Object[0]);
FragmentActivity activity = billPaymentSuccessFragment.getActivity();
if (billPaymentSuccessFragment.isDetached() || activity == null) {
return;
}
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
FragmentActivity activity2 = billPaymentSuccessFragment.getActivity();
if (activity2 != null) {
String string = billPaymentSuccessFragment.getString(R.string.saved_slip_error);
if (billPaymentSuccessFragment.getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) billPaymentSuccessFragment.getActivity(), activity2, Integer.valueOf(R.id.success_view_container), string, enumC8951daY}, 855668825, -855668822, R.id.success_view_container);
}
}
}
public static /* synthetic */ void b(BillPaymentSuccessFragment billPaymentSuccessFragment, View view, C1191Xp c1191Xp) {
billPaymentSuccessFragment.n = c1191Xp;
billPaymentSuccessFragment.g = c1191Xp.p;
billPaymentSuccessFragment.a(billPaymentSuccessFragment.n, view, billPaymentSuccessFragment.getContext());
billPaymentSuccessFragment.successPresenter.e((cNJ) billPaymentSuccessFragment);
billPaymentSuccessFragment.i = TextUtils.isEmpty(billPaymentSuccessFragment.n.n) && !billPaymentSuccessFragment.n.j.b.isEmpty();
billPaymentSuccessFragment.j = d(billPaymentSuccessFragment.n);
billPaymentSuccessFragment.mRemainingBalanceTextView.setText(String.format(billPaymentSuccessFragment.getString(R.string.remaining_balance), "BILLPAYMENT".equals(billPaymentSuccessFragment.n.p.j()) ? billPaymentSuccessFragment.getString(R.string.bill_payment_remaining_limit).toLowerCase() : "", billPaymentSuccessFragment.n.t));
if (billPaymentSuccessFragment.n.p.P != null) {
billPaymentSuccessFragment.userNote.divider.setVisibility(8);
billPaymentSuccessFragment.userNote.bottomSpace.setVisibility(8);
billPaymentSuccessFragment.movieTicket.setVisibility(0);
billPaymentSuccessFragment.ticketDivider.setVisibility(0);
XF xf = billPaymentSuccessFragment.n.p.P;
billPaymentSuccessFragment.movieTicket.setQrCode(billPaymentSuccessFragment.n.n);
billPaymentSuccessFragment.movieTicket.setPoster(xf.j);
billPaymentSuccessFragment.movieTicket.setTitle(xf.m);
billPaymentSuccessFragment.movieTicket.setCinemaLocation(xf.e);
billPaymentSuccessFragment.movieTicket.setShowtime(xf.a);
billPaymentSuccessFragment.movieTicket.setCinemaNumber(xf.b);
billPaymentSuccessFragment.movieTicket.setSeat(xf.l);
billPaymentSuccessFragment.movieTicket.setBookingId(billPaymentSuccessFragment.n.i);
} else if (billPaymentSuccessFragment.n.n != null && !billPaymentSuccessFragment.n.n.isEmpty()) {
billPaymentSuccessFragment.mRootView.getViewTreeObserver().addOnGlobalLayoutListener(billPaymentSuccessFragment);
billPaymentSuccessFragment.qrCodeLayout.setVisibility(0);
billPaymentSuccessFragment.refIdTextView.setText(billPaymentSuccessFragment.n.l);
billPaymentSuccessFragment.y();
billPaymentSuccessFragment.l = C6583cXR.d(billPaymentSuccessFragment.n.n, 500, 500, FVz.M).subscribe(new fSQ(billPaymentSuccessFragment) { // from class: o.fEt
private BillPaymentSuccessFragment a;
@Override // o.fSQ
public final void c(Object obj) {
BillPaymentSuccessFragment billPaymentSuccessFragment2 = this.a;
billPaymentSuccessFragment2.qrCodeSectionHeaderTextView.setText(billPaymentSuccessFragment2.getString(com.scb.phone.R.string.successful_qr_code_bill_payment_header));
billPaymentSuccessFragment2.qrCodeDescriptionTextView.setText(billPaymentSuccessFragment2.getString(com.scb.phone.R.string.successful_qr_code_bill_payment_description));
billPaymentSuccessFragment2.qrCodeImageView.setImageBitmap((Bitmap) obj);
Dialog dialog = ((BaseFragment) billPaymentSuccessFragment2).e;
if (dialog == null || !dialog.isShowing()) {
return;
}
((BaseFragment) billPaymentSuccessFragment2).e.dismiss();
((BaseFragment) billPaymentSuccessFragment2).e = null;
}
{
this.a = billPaymentSuccessFragment;
}
}, new fSQ(billPaymentSuccessFragment) { // from class: o.fEx
private BillPaymentSuccessFragment a;
@Override // o.fSQ
public final void c(Object obj) {
BillPaymentSuccessFragment.c(this.a);
}
{
this.a = billPaymentSuccessFragment;
}
});
}
if (billPaymentSuccessFragment.i) {
billPaymentSuccessFragment.userNote.divider.setVisibility(true ^ billPaymentSuccessFragment.j ? 0 : 8);
billPaymentSuccessFragment.e(billPaymentSuccessFragment.getContext(), billPaymentSuccessFragment.additionalRecyclerView, billPaymentSuccessFragment.n.j.b, billPaymentSuccessFragment, true);
}
if (c1191Xp.p.at == null) {
if (!billPaymentSuccessFragment.i) {
billPaymentSuccessFragment.successPresenter.a();
}
} else {
billPaymentSuccessFragment.mRemainingBalanceTextView.setVisibility(8);
billPaymentSuccessFragment.scheduleNote.setVisibility(0);
}
if ("BSCANC_SUCCESS_FUNCTION".equalsIgnoreCase(c1191Xp.p.j())) {
billPaymentSuccessFragment.mRemainingBalanceTextView.setVisibility(8);
billPaymentSuccessFragment.scheduleNote.setVisibility(8);
}
if (billPaymentSuccessFragment.j && billPaymentSuccessFragment.getActivity() != null) {
billPaymentSuccessFragment.endSlipImage.setBackgroundColor(nMh.getColor(billPaymentSuccessFragment.getActivity(), R.color.f14042131100912));
}
billPaymentSuccessFragment.successPresenter.c(c1191Xp);
cNJ cnj = billPaymentSuccessFragment.successPresenter;
C1189Xo c1189Xo = billPaymentSuccessFragment.g;
C14957gcv.e(c1189Xo, "");
if (C14957gcv.b((Object) c1189Xo.j(), (Object) "BNPL_PAYMENT")) {
ZI.IeS ieS = new ZI.IeS(c1189Xo) { // from class: o.cNG
private C1189Xo e;
@Override // o.ZI.IeS
public final void e(Object obj) {
cNJ.c(this.e, (InterfaceC9010dbe.SWS) obj);
}
{
this.e = c1189Xo;
}
};
if (cnj.f != 0) {
ieS.e(cnj.f);
}
}
billPaymentSuccessFragment.successPresenter.c(c1191Xp.x);
}
@OnClick
@butterknife.Optional
public void onReturnHomeClick() {
C1189Xo c1189Xo;
String j;
cNJ cnj = this.successPresenter;
C1191Xp c1191Xp = this.n;
if (c1191Xp != null && (c1189Xo = c1191Xp.p) != null && (j = c1189Xo.j()) != null) {
if (!gdZ.a(j, "BNPL_PAYMENT", true)) {
j = null;
}
if (j != null) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.cNK
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9010dbe.SWS) obj).f();
}
};
if (cnj.f != 0) {
ieS.e(cnj.f);
}
}
}
try {
startActivity(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, Uri.parse("scbeasy://accountsummary")).addFlags(603979776));
if (getActivity() != null) {
getActivity().finish();
}
} catch (ActivityNotFoundException e) {
guQ.e(e);
}
}
@Override // o.InterfaceC9010dbe.SWS
public final void l() {
this.c = true;
this.k = true;
if (!this.n.m) {
this.shareButton.setVisibility(0);
this.autoSaveOffSaveButton.setVisibility(8);
this.autoSaveOffShareButton.setVisibility(8);
} else {
this.shareButton.setVisibility(8);
this.shareMomentButton.setVisibility(0);
this.autoSaveOffShareButton.setVisibility(0);
}
e(false);
}
public static /* synthetic */ void c(BillPaymentSuccessFragment billPaymentSuccessFragment) {
billPaymentSuccessFragment.qrCodeImageView.setVisibility(8);
TextView textView = billPaymentSuccessFragment.refIdTextView;
billPaymentSuccessFragment.getResources();
textView.setTextColor(-9031231);
billPaymentSuccessFragment.refIdTextView.setTextSize(2, billPaymentSuccessFragment.getResources().getDimensionPixelSize(R.dimen.f28282131166594) / billPaymentSuccessFragment.getResources().getDisplayMetrics().density);
billPaymentSuccessFragment.qrCodeDescriptionTextView.setText(billPaymentSuccessFragment.getString(R.string.successful_qr_code_no_qr_code_bill_payment_header));
billPaymentSuccessFragment.ar_();
}
@Override // o.InterfaceC9010dbe.SWS
public final void m() {
Context context = getContext();
if (!isDetached() && context != null) {
this.m = this.successScreenshotHelper.d(this.n, context, this.c, false, false).subscribe(new fEH(this), new fEG(this));
}
this.c = false;
this.k = false;
if (!this.n.m) {
this.autoSaveOffSaveButton.setVisibility(0);
this.autoSaveOffShareButton.setVisibility(0);
this.shareButton.setVisibility(8);
} else {
this.shareButton.setVisibility(8);
this.shareMomentButton.setVisibility(0);
this.autoSaveOffShareButton.setVisibility(0);
this.autoSaveOffDonationsSaveButton.setVisibility(0);
}
}
private void e(boolean z) {
if (getActivity() != null) {
if (BaseActivity.P()) {
fEF.d(this, z);
return;
}
}
fEF.c(this, z);
}
}