what-the-bank/sources/com/scb/phone/view/fragment/ndidcommon/NdidCommonSelectIdpSuccessF...

407 lines
14 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.ndidcommon;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
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.ndidcommon.NdidCommonErrorActivity;
import com.scb.phone.view.fragment.BaseFragment;
import java.util.Arrays;
import o.AbstractC14961gcz;
import o.C0979Sw;
import o.C12831fIf;
import o.C12833fIh;
import o.C12834fIi;
import o.C14866gag;
import o.C14957gcv;
import o.C15970jz;
import o.C16045khe;
import o.C4334bX;
import o.C4400bZ;
import o.C6756cbS;
import o.C6790cc;
import o.InterfaceC13391fZD;
import o.InterfaceC14890gbN;
import o.InterfaceC9493dkl;
import o.InterfaceC9498dkq;
import o.SA;
import o.SC;
import o.SG;
import o.ZI;
import o.fKB;
import o.fSC;
import o.gcH;
import o.pYQ;
import o.pug;
/* loaded from: classes5.dex */
public final class NdidCommonSelectIdpSuccessFragment extends Hilt_NdidCommonSelectIdpSuccessFragment implements InterfaceC9498dkq.LWm {
public static final HBt c = new HBt(0);
private CountDownTimer d;
@InterfaceC13391fZD
public C6756cbS presenter;
@BindView
public TextView tvCountdownTimer;
@BindView
public TextView tvHeader;
@BindView
public TextView tvIdpDescription;
@BindView
public TextView tvIdpGeneralDescription;
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559780, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
v("ndid_common_verifying_partner_load");
C6756cbS c6756cbS = this.presenter;
if (c6756cbS == null) {
C14957gcv.a("");
c6756cbS = null;
}
c6756cbS.e((C6756cbS) this);
final C6756cbS c6756cbS2 = this.presenter;
if (c6756cbS2 == null) {
C14957gcv.a("");
c6756cbS2 = null;
}
Bundle arguments = getArguments();
final C0979Sw c0979Sw = arguments != null ? (C0979Sw) arguments.getParcelable("EXTRA_CONFIRMATION_DATA") : null;
ZI.IeS ieS = new ZI.IeS(c0979Sw, c6756cbS2) { // from class: o.cbR
private C0979Sw b;
private C6756cbS e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6756cbS.e(this.b, this.e, (InterfaceC9498dkq.LWm) obj);
}
{
this.b = c0979Sw;
this.e = c6756cbS2;
}
};
if (c6756cbS2.f != 0) {
ieS.e(c6756cbS2.f);
}
c("ndid_rp_verified", new pug("feature", "open_account"));
X();
}
@Override // o.InterfaceC9498dkq.LWm
public final void b(SG sg) {
if (sg != null) {
TextView textView = this.tvHeader;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(sg.e);
TextView textView3 = this.tvIdpDescription;
if (textView3 != null) {
textView2 = textView3;
} else {
C14957gcv.a("");
}
textView2.setText(sg.a);
}
}
/* loaded from: classes5.dex */
static final class LWm extends AbstractC14961gcz implements InterfaceC14890gbN<C14866gag> {
private NdidCommonSelectIdpSuccessFragment c;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
C6756cbS c6756cbS = this.c.presenter;
if (c6756cbS == null) {
C14957gcv.a("");
c6756cbS = null;
}
Bundle arguments = this.c.getArguments();
SA sa = arguments != null ? (SA) arguments.getParcelable("EXTRA_INITIATE_DATA") : null;
if (c6756cbS.f != 0) {
c6756cbS.f.y();
}
C4334bX c4334bX = new C4334bX(sa != null ? sa.u : null);
C15970jz c15970jz = c6756cbS.a;
C6756cbS.LWm lWm = new C6756cbS.LWm(c6756cbS);
C6756cbS.Sts sts = new C6756cbS.Sts(c6756cbS);
C14957gcv.e(c4334bX, "");
C14957gcv.e(lWm, "");
C14957gcv.e(sts, "");
c15970jz.f9186o.d(lWm, sts, new C16045khe.HBt(c4334bX), new fSC());
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
LWm(NdidCommonSelectIdpSuccessFragment ndidCommonSelectIdpSuccessFragment) {
super(0);
this.c = ndidCommonSelectIdpSuccessFragment;
}
}
@Override // o.InterfaceC9498dkq.LWm
public final void d() {
Resources resources = getResources();
C14957gcv.c(resources, "");
String string = getString(R.string.common_ndid_select_idp_success_clickable_description);
C14957gcv.c((Object) string, "");
String string2 = getString(R.string.common_ndid_select_idp_success_description);
C14957gcv.c((Object) string2, "");
String string3 = getString(R.string.common_ndid_select_idp_success_description_end);
C14957gcv.c((Object) string3, "");
CharSequence azW_ = fKB.azW_(resources, string, string2, string3, true, 0, new LWm(this), 96);
TextView textView = this.tvIdpGeneralDescription;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(azW_);
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setHighlightColor(0);
textView.setVisibility(0);
}
/* loaded from: classes5.dex */
public static final class RVV extends CountDownTimer {
private NdidCommonSelectIdpSuccessFragment b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
RVV(long j, NdidCommonSelectIdpSuccessFragment ndidCommonSelectIdpSuccessFragment) {
super(j, 1000L);
this.b = ndidCommonSelectIdpSuccessFragment;
}
@Override // android.os.CountDownTimer
public final void onTick(long j) {
C6756cbS c6756cbS = this.b.presenter;
if (c6756cbS == null) {
C14957gcv.a("");
c6756cbS = null;
}
final int i = (int) ((j / 1000) % 60);
final int i2 = (int) ((j / 60000) % 60);
final int i3 = (int) (j / 3600000);
ZI.IeS ieS = new ZI.IeS(i3, i2, i) { // from class: o.cbP
private int a;
private int c;
private int d;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9498dkq.LWm) obj).a(this.c, this.a, this.d);
}
{
this.c = i3;
this.a = i2;
this.d = i;
}
};
if (c6756cbS.f != 0) {
ieS.e(c6756cbS.f);
}
}
@Override // android.os.CountDownTimer
public final void onFinish() {
CountDownTimer countDownTimer = this.b.d;
if (countDownTimer != null) {
countDownTimer.cancel();
}
}
}
@Override // o.InterfaceC9498dkq.LWm
public final void c(long j) {
this.d = new RVV(j, this).start();
TextView textView = this.tvCountdownTimer;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setVisibility(0);
}
@Override // o.InterfaceC9498dkq.LWm
public final void a(int i, int i2, int i3) {
TextView textView = this.tvCountdownTimer;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
gcH gch = gcH.d;
String format = String.format("%02d : %02d : %02d", Arrays.copyOf(new Object[]{Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3)}, 3));
C14957gcv.c((Object) format, "");
textView.setText(format);
}
@Override // o.InterfaceC9498dkq.LWm
public final void b() {
FragmentActivity activity = getActivity();
if (activity != null) {
activity.setResult(0);
activity.finish();
}
}
@Override // o.InterfaceC9498dkq.LWm
public final void a() {
FragmentActivity activity = getActivity();
if (activity != null) {
activity.setResult(-1);
activity.finish();
}
}
@Override // o.InterfaceC9498dkq.LWm
public final void d(String str) {
Context context = getContext();
if (context != null) {
NdidCommonErrorActivity.RVV rvv = NdidCommonErrorActivity.m;
startActivity(NdidCommonErrorActivity.RVV.ajm_(context, new SC(R.drawable.ic_notice, getString(R.string.common_ndid_eror_page_title), getString(R.string.common_ndid_eror_panding_title), getString(R.string.common_ndid_eror_panding_description), getString(R.string.common_ndid_eror_button_top_title), (String) null, (InterfaceC9493dkl) new C12833fIh(), (InterfaceC9493dkl) null, false, (String) null, 1696), str, null));
}
}
@Override // o.InterfaceC9498dkq.LWm
public final void a(String str, String str2, String str3) {
Context context = getContext();
if (context != null) {
NdidCommonErrorActivity.RVV rvv = NdidCommonErrorActivity.m;
startActivity(NdidCommonErrorActivity.RVV.ajm_(context, new SC(R.drawable.ic_notice, getString(R.string.common_ndid_eror_page_title), getString(R.string.common_ndid_eror_ipd_title), getString(R.string.common_ndid_eror_ipd_error_description), getString(R.string.common_ndid_eror_button_top_title), (String) null, (InterfaceC9493dkl) new C12834fIi(str, str2, str3), (InterfaceC9493dkl) null, false, (String) null, 1696), str, str2));
FragmentActivity activity = getActivity();
if (activity != null) {
activity.finish();
}
}
}
@Override // o.InterfaceC9498dkq.LWm
public final void c(String str, String str2, String str3) {
Context context = getContext();
if (context != null) {
NdidCommonErrorActivity.RVV rvv = NdidCommonErrorActivity.m;
startActivity(NdidCommonErrorActivity.RVV.ajm_(context, new SC(R.drawable.ic_notice, getString(R.string.common_ndid_eror_page_title), str2, str3, getString(R.string.common_ndid_eror_button_top_title), (String) null, (InterfaceC9493dkl) new C12831fIf(), (InterfaceC9493dkl) null, false, (String) null, 1696), str, null));
FragmentActivity activity = getActivity();
if (activity != null) {
activity.finish();
}
}
}
@Override // o.InterfaceC9498dkq.LWm
public final void e(String str) {
C14957gcv.e(str, "");
v(str);
}
@Override // o.InterfaceC9498dkq.LWm
public final void c() {
C6756cbS c6756cbS = this.presenter;
if (c6756cbS == null) {
C14957gcv.a("");
c6756cbS = null;
}
Bundle arguments = getArguments();
SA sa = arguments != null ? (SA) arguments.getParcelable("EXTRA_INITIATE_DATA") : null;
if (c6756cbS.f != 0) {
c6756cbS.f.y();
}
if (sa != null) {
C6790cc c6790cc = new C6790cc(sa.u);
C15970jz c15970jz = c6756cbS.a;
C6756cbS.HBt hBt = new C6756cbS.HBt(c6756cbS);
C6756cbS.RVV rvv = new C6756cbS.RVV(c6756cbS, sa, sa);
C14957gcv.e(c6790cc, "");
C14957gcv.e(hBt, "");
C14957gcv.e(rvv, "");
c15970jz.k.d(hBt, rvv, new pYQ.HBt(c6790cc), new fSC());
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
CountDownTimer countDownTimer = this.d;
if (countDownTimer != null) {
countDownTimer.cancel();
}
C6756cbS c6756cbS = this.presenter;
if (c6756cbS == null) {
C14957gcv.a("");
c6756cbS = null;
}
c6756cbS.w_();
super.onDestroy();
}
@OnClick
public final void onVerifiedButtonClick() {
v("ndid_common_verifying_partner_click");
final C6756cbS c6756cbS = this.presenter;
if (c6756cbS == null) {
C14957gcv.a("");
c6756cbS = null;
}
Bundle arguments = getArguments();
final SA sa = arguments != null ? (SA) arguments.getParcelable("EXTRA_INITIATE_DATA") : null;
if (c6756cbS.f != 0) {
c6756cbS.f.y();
}
final C4400bZ c4400bZ = new C4400bZ(sa != null ? sa.u : null);
ZI.IeS ieS = new ZI.IeS(c6756cbS, c4400bZ, sa) { // from class: o.cbZ
private C4400bZ a;
private C6756cbS c;
private SA e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6756cbS.d(this.c, this.a, this.e, (InterfaceC9498dkq.LWm) obj);
}
{
this.c = c6756cbS;
this.a = c4400bZ;
this.e = sa;
}
};
if (c6756cbS.f != 0) {
ieS.e(c6756cbS.f);
}
}
/* loaded from: classes5.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
}