what-the-bank/sources/com/scb/phone/view/fragment/ccrredemption/pointtopay/PointToPaySaveSlipFragment....

229 lines
7.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.ccrredemption.pointtopay;
import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
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.TextView;
import androidx.fragment.app.FragmentActivity;
import butterknife.OnClick;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.fragment.ccrredemption.pointtopay.PointToPaySaveSlipFragment;
import java.util.List;
import o.C0693Mj;
import o.C14957gcv;
import o.C3286auf;
import o.EW;
import o.EnumC1255Za;
import o.InterfaceC13391fZD;
import o.InterfaceC9046dcN;
import o.QI;
import o.ZI;
import o.gjJ;
import o.guQ;
/* loaded from: classes5.dex */
public final class PointToPaySaveSlipFragment extends Hilt_PointToPaySaveSlipFragment implements InterfaceC9046dcN.IeS {
public static final Sts d = new Sts(0);
private String f;
private String g;
private String h;
@InterfaceC13391fZD
public C3286auf saveSlipPresenter;
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
v("point2pay_successful");
Bundle arguments = getArguments();
if (arguments != null) {
String string = arguments.getString("EXTRA_CREDIT_CARD_REF_KEY");
if (string == null) {
string = "";
}
this.h = string;
String string2 = arguments.getString("EXTRA_SLIP_REF_ID_KEY");
this.f = string2 != null ? string2 : "";
this.g = arguments.getString("EXTRA_DEEP_LINK_CHANNEL_KEY");
}
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
C3286auf c3286auf = this.saveSlipPresenter;
if (c3286auf == null) {
C14957gcv.a("");
c3286auf = null;
}
c3286auf.e((C3286auf) this);
l();
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);
String string = getString(R.string.empty);
C14957gcv.c((Object) string, "");
C14957gcv.e(string, "");
TextView textView = this.buttonReturn;
textView.setText(string);
textView.setGravity(17);
final C3286auf c3286auf = this.saveSlipPresenter;
final String str = null;
if (c3286auf == null) {
C14957gcv.a("");
c3286auf = null;
}
String str2 = this.f;
if (str2 == null) {
C14957gcv.a("");
} else {
str = str2;
}
C14957gcv.e(str, "");
ZI.IeS ieS = new ZI.IeS(c3286auf, str) { // from class: o.auc
private String c;
private C3286auf e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C3286auf.e(this.e, this.c, (InterfaceC9046dcN.IeS) obj);
}
{
this.e = c3286auf;
this.c = str;
}
};
if (c3286auf.f != 0) {
ieS.e(c3286auf.f);
}
}
@Override // com.scb.phone.view.fragment.PurchaseSuccessFragment, o.cYH
public final void d(EW ew) {
this.presenter.e(ew, (List<QI>) null);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C3286auf c3286auf = this.saveSlipPresenter;
if (c3286auf == null) {
C14957gcv.a("");
c3286auf = null;
}
c3286auf.w_();
this.presenter.w_();
super.onDestroyView();
}
@Override // o.InterfaceC9046dcN.IeS
public final void i() {
String string = getString(R.string.return_to_credit_card);
C14957gcv.c((Object) string, "");
C14957gcv.e(string, "");
TextView textView = this.buttonReturn;
textView.setText(string);
textView.setGravity(17);
}
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC6638cYp
public final void e(C0693Mj c0693Mj) {
C14957gcv.e(c0693Mj, "");
CustomDialog b = CustomDialog.b(getActivity());
String str = c0693Mj.d;
if (gjJ.a(str)) {
b.mTitleTextView.setVisibility(0);
b.mTitleTextView.setText(str);
}
String str2 = c0693Mj.c;
if (gjJ.a(str2)) {
b.mTextTextView.setVisibility(0);
b.mTextTextView.setText(str2);
}
b.setCancelable(false);
b.aoT_(R.string.ok, new DialogInterface.OnClickListener(this) { // from class: o.eLj
private PointToPaySaveSlipFragment b;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
PointToPaySaveSlipFragment.b(this.b);
}
{
this.b = this;
}
}).show();
}
@Override // o.InterfaceC9046dcN.IeS
public final void f() {
try {
startActivity(arh_());
FragmentActivity activity = getActivity();
if (activity != null) {
activity.finish();
}
} catch (ActivityNotFoundException e) {
guQ.e(e);
} catch (NullPointerException e2) {
guQ.e(e2);
}
}
private final Intent arh_() {
Intent intent = new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, Uri.parse("scbeasy://creditcards/point"));
intent.putExtra("NOTIFICATION_INBOX_TAG", C14957gcv.b((Object) this.g, (Object) EnumC1255Za.INBOX_NOTIFICATION.name()));
String str = this.h;
if (str == null) {
C14957gcv.a("");
str = null;
}
intent.putExtra("EXTRA_CREDIT_CARD_REF_KEY", str);
return intent;
}
@OnClick
public final void onClickNext() {
C3286auf c3286auf = this.saveSlipPresenter;
if (c3286auf == null) {
C14957gcv.a("");
c3286auf = null;
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.aud
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9046dcN.IeS) obj).f();
}
};
if (c3286auf.f != 0) {
ieS.e(c3286auf.f);
}
}
public static /* synthetic */ void b(PointToPaySaveSlipFragment pointToPaySaveSlipFragment) {
C14957gcv.e(pointToPaySaveSlipFragment, "");
pointToPaySaveSlipFragment.f();
}
}