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

186 lines
7.4 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.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.FragmentActivity;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.CustomHorizontalProgressBar;
import o.AIb;
import o.AbstractC14961gcz;
import o.C0367Fb;
import o.C0435Gm;
import o.C12891fKc;
import o.C14957gcv;
import o.C2992apA;
import o.C8746dUl;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC9067dci;
import o.ZI;
import o.fZZ;
import o.nMh;
import o.qeC;
/* loaded from: classes5.dex */
public final class TempLimitHomeFragment extends Hilt_TempLimitHomeFragment implements InterfaceC9067dci.RVV {
private final InterfaceC13393fZL c;
@InterfaceC13391fZD
public C2992apA presenter;
public TempLimitHomeFragment() {
IeS ieS = new IeS(this);
C14957gcv.e(ieS, "");
this.c = new fZZ(ieS);
}
/* loaded from: classes5.dex */
static final class IeS extends AbstractC14961gcz implements InterfaceC14890gbN<C8746dUl> {
private TempLimitHomeFragment c;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C8746dUl invoke() {
View inflate = this.c.getLayoutInflater().inflate(R.layout.2131559950, (ViewGroup) null, false);
int i = R.id.custom_horizontal_progress;
CustomHorizontalProgressBar customHorizontalProgressBar = (CustomHorizontalProgressBar) qeC.e(inflate, R.id.custom_horizontal_progress);
if (customHorizontalProgressBar != null) {
i = R.id.divider2;
View e = qeC.e(inflate, R.id.divider2);
if (e != null) {
i = R.id.layout_cc;
View e2 = qeC.e(inflate, R.id.layout_cc);
if (e2 != null) {
return new C8746dUl((ConstraintLayout) inflate, customHorizontalProgressBar, e, AIb.c(e2));
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
IeS(TempLimitHomeFragment tempLimitHomeFragment) {
super(0);
this.c = tempLimitHomeFragment;
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
ConstraintLayout constraintLayout = ((C8746dUl) this.c.e()).d;
C14957gcv.c(constraintLayout, "");
return constraintLayout;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
final C0435Gm c0435Gm;
Intent intent;
Intent intent2;
Object obj;
Intent intent3;
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
C2992apA c2992apA = this.presenter;
final C0367Fb c0367Fb = null;
Object obj2 = null;
c0367Fb = null;
if (c2992apA == null) {
C14957gcv.a("");
c2992apA = null;
}
c2992apA.e((C2992apA) this);
C2992apA c2992apA2 = this.presenter;
if (c2992apA2 == null) {
C14957gcv.a("");
c2992apA2 = null;
}
FragmentActivity activity = getActivity();
final Boolean valueOf = (activity == null || (intent3 = activity.getIntent()) == null) ? null : Boolean.valueOf(intent3.getBooleanExtra("com.scb.phone.view.activity.card_management.TempLimitHomeActivity.KEY_TEMP_LIMIT_IS_CDX_FLOW", false));
FragmentActivity activity2 = getActivity();
if (activity2 == null || (intent2 = activity2.getIntent()) == null) {
c0435Gm = null;
} else {
if (Build.VERSION.SDK_INT >= 33) {
Bundle extras = intent2.getExtras();
obj = extras != null ? (Parcelable) extras.getParcelable("com.scb.phone.view.activity.card_management.TempLimitHomeActivity.KEY_TEMP_LIMIT_CDX_CRITERIA", C0435Gm.class) : null;
} else {
Bundle extras2 = intent2.getExtras();
Object parcelable = extras2 != null ? extras2.getParcelable("com.scb.phone.view.activity.card_management.TempLimitHomeActivity.KEY_TEMP_LIMIT_CDX_CRITERIA") : null;
if (!(parcelable instanceof C0435Gm)) {
parcelable = null;
}
obj = (Parcelable) ((C0435Gm) parcelable);
}
c0435Gm = (C0435Gm) obj;
}
FragmentActivity activity3 = getActivity();
if (activity3 != null && (intent = activity3.getIntent()) != null) {
if (Build.VERSION.SDK_INT >= 33) {
Bundle extras3 = intent.getExtras();
if (extras3 != null) {
obj2 = (Parcelable) extras3.getParcelable("com.scb.phone.view.activity.card_management.TempLimitHomeActivity.KEY_CREDIT_CARD_DISPLAY", C0367Fb.class);
}
} else {
Bundle extras4 = intent.getExtras();
Object parcelable2 = extras4 != null ? extras4.getParcelable("com.scb.phone.view.activity.card_management.TempLimitHomeActivity.KEY_CREDIT_CARD_DISPLAY") : null;
obj2 = (Parcelable) ((C0367Fb) (parcelable2 instanceof C0367Fb ? parcelable2 : null));
}
c0367Fb = (C0367Fb) obj2;
}
ZI.IeS ieS = new ZI.IeS(c0367Fb, valueOf, c0435Gm) { // from class: o.apx
private Boolean c;
private C0435Gm d;
private C0367Fb e;
@Override // o.ZI.IeS
public final void e(Object obj3) {
C2992apA.d(this.e, this.c, this.d, (InterfaceC9067dci.RVV) obj3);
}
{
this.e = c0367Fb;
this.c = valueOf;
this.d = c0435Gm;
}
};
if (c2992apA2.f != 0) {
ieS.e(c2992apA2.f);
}
}
@Override // o.InterfaceC9067dci.RVV
public final void b(C0367Fb c0367Fb) {
C14957gcv.e(c0367Fb, "");
AIb aIb = ((C8746dUl) this.c.e()).a;
aIb.b.setText(c0367Fb.O);
aIb.e.setText(c0367Fb.s);
aIb.d.setText(c0367Fb.t);
aIb.a.setText(c0367Fb.r);
FragmentActivity activity = getActivity();
if (activity != null) {
FragmentActivity fragmentActivity = activity;
C12891fKc.azp_(nMh.getDrawable(fragmentActivity, R.drawable.default_card), nMh.getDrawable(fragmentActivity, R.drawable.default_card_without_logo), ((C8746dUl) this.c.e()).a.c, c0367Fb.p);
}
}
@Override // o.InterfaceC9067dci.RVV
public final void a(String str, String str2, int i, String str3) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
C14957gcv.e(str3, "");
CustomHorizontalProgressBar customHorizontalProgressBar = ((C8746dUl) this.c.e()).b;
customHorizontalProgressBar.setAvailableValue(str);
customHorizontalProgressBar.setTotalValue(str2);
customHorizontalProgressBar.setProgressBar(i);
customHorizontalProgressBar.setUsedValue(str3);
}
}