what-the-bank/sources/com/scb/phone/view/fragment/creditcard/InformationTabFragment.java

339 lines
12 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.creditcard;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.google.android.material.tabs.TabLayout;
import com.scb.phone.R;
import com.scb.phone.view.activity.cardmanagement.SelectPurchasesActivity;
import com.scb.phone.view.activity.emailverification.ManageEmailLandingActivity;
import com.scb.phone.view.activity.transferandpay.CardPaySelectedActivity;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.custom.common.CustomHorizontalProgressBar;
import com.scb.phone.view.custom.common.CustomInstallmentBillsToPay;
import com.scb.phone.view.custom.common.FragmentWrapContentViewPager;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.creditcard.InformationTabFragment;
import o.C0367Fb;
import o.C10457eEr;
import o.C12154esp;
import o.C1324aAq;
import o.C1326aAs;
import o.C1328aAu;
import o.C1329aAv;
import o.C17515xRi;
import o.InterfaceC12821fIL;
import o.InterfaceC13391fZD;
import o.InterfaceC6618cYI;
import o.InterfaceC9070dcl;
import o.ZI;
import o.nMh;
import o.pug;
/* loaded from: classes5.dex */
public class InformationTabFragment extends Hilt_InformationTabFragment implements InterfaceC6618cYI.Sts, InterfaceC12821fIL {
C0367Fb c;
@InterfaceC13391fZD
public C1326aAs creditCardDetailTabPresenter;
String d;
private C12154esp g;
@BindView
ImageView ivErrorIcon;
@BindView
LinearLayout llContentViewLayout;
@BindView
LinearLayout llErrorLayout;
@BindView
CustomInstallmentBillsToPay mCustomBillsToPay;
@BindView
CustomHorizontalProgressBar mCustomHorizontalProgressBar;
@BindView
TabLayout mTabLayout;
@BindView
FragmentWrapContentViewPager mTabPager;
@BindView
TextView tvDisclaimerText;
@BindView
TextView tvErrorDesc;
@BindView
TextView tvErrorTitle;
public static InformationTabFragment a(C0367Fb c0367Fb, String str) {
Bundle bundle = new Bundle();
bundle.putParcelable("CREDIT_CARD_DISPLAY", c0367Fb);
bundle.putString("CREDIT_CARD_DISCLAIMER", str);
InformationTabFragment informationTabFragment = new InformationTabFragment();
informationTabFragment.setArguments(bundle);
return informationTabFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559522, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
this.c = (C0367Fb) getArguments().getParcelable("CREDIT_CARD_DISPLAY");
this.d = getArguments().getString("CREDIT_CARD_DISCLAIMER");
this.creditCardDetailTabPresenter.e((C1326aAs) this);
C1326aAs c1326aAs = this.creditCardDetailTabPresenter;
C0367Fb c0367Fb = this.c;
C1324aAq c1324aAq = new C1324aAq(c0367Fb);
if (c1326aAs.f != 0) {
c1324aAq.e(c1326aAs.f);
}
C1328aAu c1328aAu = new C1328aAu(c0367Fb);
if (c1326aAs.f != 0) {
c1328aAu.e(c1326aAs.f);
}
C1326aAs c1326aAs2 = this.creditCardDetailTabPresenter;
C1329aAv c1329aAv = new C1329aAv(c1326aAs2, this.c);
if (c1326aAs2.f != 0) {
c1329aAv.e(c1326aAs2.f);
}
super.aa();
u(getString(R.string.credit_card_detail_title));
setHasOptionsMenu(true);
Y();
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment
public final void aa() {
super.aa();
u(getString(R.string.credit_card_detail_title));
setHasOptionsMenu(true);
Y();
}
@Override // o.InterfaceC6618cYI.Sts
public final void d() {
this.ivErrorIcon.setImageResource(R.drawable.box_empty);
this.tvErrorTitle.setText(R.string.auto_cc_detail_no_result_title);
this.tvErrorDesc.setText(R.string.auto_cc_detail_no_result_desc);
this.llErrorLayout.setVisibility(0);
this.llContentViewLayout.setVisibility(8);
}
@Override // o.InterfaceC6618cYI.Sts
public final void a() {
this.llErrorLayout.setVisibility(8);
this.llContentViewLayout.setVisibility(0);
}
@Override // o.InterfaceC6618cYI.Sts
public final void c(String str, String str2) {
if (this.g != null) {
Intent intent = new Intent();
intent.setAction("com.scb.phone/BROADCAST_UPDATE_LIST");
intent.putExtra("CREDIT_CARD_NUMBER", str);
intent.putExtra("CREDIT_CARD_STML_CLOSE_DATE", str2);
C10457eEr.aqd_(this, intent);
return;
}
C12154esp c12154esp = new C12154esp(getFragmentManager(), getContext(), str, str2);
this.g = c12154esp;
this.mTabPager.setAdapter(c12154esp);
this.mTabLayout.setupWithViewPager(this.mTabPager);
}
@Override // o.InterfaceC6618cYI.Sts
public final void b() {
startActivity(new Intent(getContext(), (Class<?>) CardPaySelectedActivity.class));
}
@Override // o.InterfaceC6618cYI.Sts
public final void j() {
startActivityForResult(SelectPurchasesActivity.Zk_(getActivity(), this.c), 112);
}
@Override // o.InterfaceC6618cYI.Sts
public final void c(final InterfaceC9070dcl.HBt hBt) {
FragmentActivity activity;
BaseFragment.HBt hBt2 = new BaseFragment.HBt(hBt) { // from class: o.eOh
private InterfaceC9070dcl.HBt a;
@Override // com.scb.phone.view.fragment.BaseFragment.HBt
public final void c(Context context) {
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(context).c(com.scb.phone.R.string.ccr_email_verification_title).d(com.scb.phone.R.string.ccr_email_verification_body), Integer.valueOf(com.scb.phone.R.string.ccr_email_verification_cancel_btn), new DialogInterface.OnClickListener(r0) { // from class: o.eOi
private InterfaceC9070dcl.HBt b;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
this.b.b();
}
{
this.b = r1;
}
}})).aoT_(com.scb.phone.R.string.ccr_email_verification_ok_btn, new DialogInterface.OnClickListener(this.a) { // from class: o.eOg
private InterfaceC9070dcl.HBt b;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
this.b.a();
}
{
this.b = r1;
}
}).show();
}
{
this.a = hBt;
}
};
if (!isAdded() || (activity = getActivity()) == null) {
return;
}
hBt2.c(activity);
}
@Override // o.InterfaceC6618cYI.Sts
public final void c() {
FragmentActivity activity;
BaseFragment.HBt hBt = new BaseFragment.HBt(this) { // from class: o.eOf
private InformationTabFragment e;
@Override // com.scb.phone.view.fragment.BaseFragment.HBt
public final void c(Context context) {
this.e.startActivityForResult(ManageEmailLandingActivity.aeX_(context), 10001);
}
{
this.e = this;
}
};
if (!isAdded() || (activity = getActivity()) == null) {
return;
}
hBt.c(activity);
}
@Override // o.InterfaceC12836fIk
public final void h() {
C1326aAs c1326aAs = this.creditCardDetailTabPresenter;
C0367Fb c0367Fb = this.c;
C17515xRi c17515xRi = c1326aAs.a;
c17515xRi.e.a(c0367Fb.g);
ZI.IeS ieS = new ZI.IeS() { // from class: o.aAp
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6618cYI.Sts) obj).b();
}
};
if (c1326aAs.f != 0) {
ieS.e(c1326aAs.f);
}
}
@Override // o.InterfaceC12821fIL
public final void f() {
final C1326aAs c1326aAs = this.creditCardDetailTabPresenter;
if (c1326aAs.c.d()) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.aAr
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6618cYI.Sts) obj).j();
}
};
if (c1326aAs.f != 0) {
ieS.e(c1326aAs.f);
return;
}
return;
}
ZI.IeS ieS2 = new ZI.IeS(c1326aAs) { // from class: o.aAt
private C1326aAs e;
@Override // o.ZI.IeS
public final void e(Object obj) {
r2.c(new InterfaceC9070dcl.HBt(this.e, (InterfaceC6618cYI.Sts) obj) { // from class: o.aAs.3
private C1326aAs a;
private InterfaceC6618cYI.Sts d;
AnonymousClass3(C1326aAs c1326aAs2, InterfaceC6618cYI.Sts sts) {
this.a = c1326aAs2;
this.d = sts;
}
@Override // o.InterfaceC9070dcl.HBt
public final void b() {
this.d.j();
this.d.e();
}
@Override // o.InterfaceC9070dcl.HBt
public final void a() {
this.d.c();
this.d.i();
}
});
}
{
this.e = c1326aAs;
}
};
if (c1326aAs.f != 0) {
ieS2.e(c1326aAs.f);
}
}
@Override // o.InterfaceC6618cYI.Sts
public final void i() {
c("deejung_installment_popup_verify", new pug[0]);
}
@Override // o.InterfaceC6618cYI.Sts
public final void e() {
c("deejung_installment_popup_notnow", new pug[0]);
}
@Override // o.InterfaceC6618cYI.Sts
public final void d(C0367Fb c0367Fb) {
this.mCustomHorizontalProgressBar.setUsedValue(c0367Fb.w);
this.mCustomHorizontalProgressBar.setAvailableValue(c0367Fb.d);
this.mCustomHorizontalProgressBar.setTotalValue(c0367Fb.v);
this.mCustomHorizontalProgressBar.setProgressBar(c0367Fb.y);
this.mCustomBillsToPay.setDueDateValue(String.format(c0367Fb.al, new Object[0]));
this.mCustomBillsToPay.setAmountValue(c0367Fb.B);
this.mCustomBillsToPay.setOnBillClickListener(this);
this.mCustomBillsToPay.setAmountTitle(c0367Fb.N);
this.mCustomBillsToPay.setMinimumPaymentValue(c0367Fb.ai);
this.mCustomBillsToPay.setStatementDateValue(c0367Fb.aj);
String str = this.d;
if (str != null && !str.isEmpty()) {
this.tvDisclaimerText.setVisibility(0);
this.tvDisclaimerText.setText(this.d);
}
if (c0367Fb.L) {
this.mCustomBillsToPay.setIconDrawable(nMh.getDrawable(getContext(), c0367Fb.E), nMh.getColor(getContext(), R.color.f3432131099851));
} else {
this.mCustomBillsToPay.setIconDrawable(nMh.getDrawable(getContext(), c0367Fb.E));
}
this.mCustomBillsToPay.setInstallmentVisibility(c0367Fb.aa);
this.mCustomBillsToPay.setInstallmentEnability(!c0367Fb.F);
}
}