what-the-bank/sources/com/scb/phone/view/fragment/cardmanagement/ActivationSuccessfulFragmen...

321 lines
12 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.cardmanagement;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.activity.HomeActivity;
import com.scb.phone.view.fragment.cardmanagement.ActivationSuccessfulFragment;
import com.squareup.picasso.Picasso;
import o.AIb;
import o.C0414Gb;
import o.C0417Gc;
import o.C0418Gd;
import o.C0690Mh;
import o.C0693Mj;
import o.C13020fOa;
import o.C14957gcv;
import o.C2861amb;
import o.InterfaceC13391fZD;
import o.InterfaceC8991dbL;
import o.MOV;
import o.ZI;
import o.guQ;
import o.qeC;
/* loaded from: classes5.dex */
public final class ActivationSuccessfulFragment extends Hilt_ActivationSuccessfulFragment implements InterfaceC8991dbL {
private MOV c;
@InterfaceC13391fZD
public C2861amb presenter;
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
Parcelable parcelable;
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
C2861amb c2861amb = this.presenter;
C2861amb c2861amb2 = null;
if (c2861amb == null) {
C14957gcv.a("");
c2861amb = null;
}
c2861amb.e((C2861amb) this);
FragmentActivity activity = getActivity();
Intent intent = activity != null ? activity.getIntent() : null;
if (intent != null) {
if (Build.VERSION.SDK_INT >= 33) {
Bundle extras = intent.getExtras();
parcelable = extras != null ? (Parcelable) extras.getParcelable("ActivationSuccessfulActivity.KEY_ACTIVATION_DTO", C0414Gb.class) : null;
} else {
Bundle extras2 = intent.getExtras();
Parcelable parcelable2 = extras2 != null ? extras2.getParcelable("ActivationSuccessfulActivity.KEY_ACTIVATION_DTO") : null;
if (!(parcelable2 instanceof C0414Gb)) {
parcelable2 = null;
}
parcelable = (C0414Gb) parcelable2;
}
C0414Gb c0414Gb = (C0414Gb) parcelable;
final boolean booleanExtra = intent.getBooleanExtra("EXTRA_IS_FROM_DEEPLINK_CARD_ACTIVATE", false);
if (c0414Gb != null) {
C2861amb c2861amb3 = this.presenter;
if (c2861amb3 != null) {
c2861amb2 = c2861amb3;
} else {
C14957gcv.a("");
}
C14957gcv.e(c0414Gb, "");
final C0418Gd c = c2861amb2.c.c(c0414Gb);
ZI.IeS ieS = new ZI.IeS(c, c, booleanExtra) { // from class: o.ama
private boolean c;
private C0418Gd d;
private C0418Gd e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C2861amb.d(this.e, this.d, this.c, (InterfaceC8991dbL) obj);
}
{
this.e = c;
this.d = c;
this.c = booleanExtra;
}
};
if (c2861amb2.f != 0) {
ieS.e(c2861amb2.f);
}
}
MOV mov = this.c;
C14957gcv.e(mov);
mov.e.setOnClickListener(new View.OnClickListener(this) { // from class: o.eIK
private ActivationSuccessfulFragment d;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
ActivationSuccessfulFragment.c(this.d);
}
{
this.d = this;
}
});
mov.a.setOnClickListener(new View.OnClickListener(this) { // from class: o.eIJ
private ActivationSuccessfulFragment e;
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
ActivationSuccessfulFragment.e(this.e);
}
{
this.e = this;
}
});
}
}
@Override // o.InterfaceC8991dbL
public final void a(C0418Gd c0418Gd) {
C14957gcv.e(c0418Gd, "");
MOV mov = this.c;
C14957gcv.e(mov);
C13020fOa b = Picasso.d().e(c0418Gd.c).e(R.drawable.default_card_without_logo).b(R.drawable.default_card);
b.e = true;
b.aBu_(mov.d.c, null);
mov.c.setText(c0418Gd.b);
mov.g.setText(c0418Gd.d.e);
mov.j.setText(c0418Gd.e);
mov.d.e.setText(c0418Gd.d.a);
mov.d.d.setText(c0418Gd.d.c);
mov.d.a.setText(c0418Gd.d.d);
}
@Override // o.InterfaceC8991dbL
public final void a() {
MOV mov = this.c;
C14957gcv.e(mov);
mov.f.setVisibility(8);
}
@Override // o.InterfaceC8991dbL
public final void c(C0417Gc c0417Gc) {
C14957gcv.e(c0417Gc, "");
C0693Mj c0693Mj = new C0693Mj();
c0693Mj.d = c0417Gc.e;
c0693Mj.c = c0417Gc.c;
C0690Mh c0690Mh = new C0690Mh();
c0690Mh.e = C0690Mh.IeS.JUST_DISMISS;
c0690Mh.b = getString(R.string.ok);
c0693Mj.e = c0690Mh;
e(c0693Mj);
}
@Override // o.InterfaceC8991dbL
public final void b() {
HomeActivity.c(getContext(), true);
}
@Override // o.InterfaceC8991dbL
public final void e() {
MOV mov = this.c;
C14957gcv.e(mov);
mov.e.setVisibility(0);
mov.a.setVisibility(8);
}
@Override // o.InterfaceC8991dbL
public final void d(String str) {
C14957gcv.e(str, "");
MOV mov = this.c;
C14957gcv.e(mov);
mov.f.setText(str);
}
@Override // o.InterfaceC8991dbL
public final void d() {
MOV mov = this.c;
C14957gcv.e(mov);
mov.e.setVisibility(8);
mov.a.setVisibility(0);
}
@Override // o.InterfaceC8991dbL
public final void c() {
if (getContext() != null) {
try {
startActivity(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, Uri.parse("scbeasy://addaccount")));
} catch (Exception e) {
guQ.e(e);
}
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C2861amb c2861amb = this.presenter;
if (c2861amb == null) {
C14957gcv.a("");
c2861amb = null;
}
c2861amb.w_();
this.c = null;
super.onDestroyView();
}
public static /* synthetic */ void e(ActivationSuccessfulFragment activationSuccessfulFragment) {
C14957gcv.e(activationSuccessfulFragment, "");
final C2861amb c2861amb = activationSuccessfulFragment.presenter;
if (c2861amb == null) {
C14957gcv.a("");
c2861amb = null;
}
ZI.IeS ieS = new ZI.IeS(c2861amb) { // from class: o.alZ
private C2861amb c;
@Override // o.ZI.IeS
public final void e(Object obj) {
C2861amb.c(this.c, (InterfaceC8991dbL) obj);
}
{
this.c = c2861amb;
}
};
if (c2861amb.f != 0) {
ieS.e(c2861amb.f);
}
}
public static /* synthetic */ void c(ActivationSuccessfulFragment activationSuccessfulFragment) {
C14957gcv.e(activationSuccessfulFragment, "");
C2861amb c2861amb = activationSuccessfulFragment.presenter;
if (c2861amb == null) {
C14957gcv.a("");
c2861amb = null;
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.amc
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC8991dbL) obj).c();
}
};
if (c2861amb.f != 0) {
ieS.e(c2861amb.f);
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559445, viewGroup, false);
int i = R.id.btn_accounts;
Button button = (Button) qeC.e(inflate, R.id.btn_accounts);
if (button != null) {
i = R.id.btn_add_account;
Button button2 = (Button) qeC.e(inflate, R.id.btn_add_account);
if (button2 != null) {
i = R.id.divider1;
View e = qeC.e(inflate, R.id.divider1);
if (e != null) {
i = R.id.divider2;
View e2 = qeC.e(inflate, R.id.divider2);
if (e2 != null) {
i = R.id.layout_card;
View e3 = qeC.e(inflate, R.id.layout_card);
if (e3 != null) {
AIb c = AIb.c(e3);
i = R.id.txv_activation_date_time;
TextView textView = (TextView) qeC.e(inflate, R.id.txv_activation_date_time);
if (textView != null) {
i = R.id.txv_card_added_msg;
TextView textView2 = (TextView) qeC.e(inflate, R.id.txv_card_added_msg);
if (textView2 != null) {
i = R.id.txv_card_limit;
TextView textView3 = (TextView) qeC.e(inflate, R.id.txv_card_limit);
if (textView3 != null) {
i = R.id.txv_card_limit_label;
TextView textView4 = (TextView) qeC.e(inflate, R.id.txv_card_limit_label);
if (textView4 != null) {
i = R.id.txv_card_no_label;
TextView textView5 = (TextView) qeC.e(inflate, R.id.txv_card_no_label);
if (textView5 != null) {
i = R.id.txv_masked_card_no;
TextView textView6 = (TextView) qeC.e(inflate, R.id.txv_masked_card_no);
if (textView6 != null) {
i = R.id.txv_success_activation;
TextView textView7 = (TextView) qeC.e(inflate, R.id.txv_success_activation);
if (textView7 != null) {
MOV mov = new MOV((ScrollView) inflate, button, button2, e, e2, c, textView, textView2, textView3, textView4, textView5, textView6, textView7);
this.c = mov;
C14957gcv.e(mov);
ScrollView scrollView = mov.b;
C14957gcv.c(scrollView, "");
return scrollView;
}
}
}
}
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
}