what-the-bank/sources/com/scb/phone/view/fragment/debitcard/DebitCardLandingFragment.java

230 lines
7.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.debitcard;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.scb.phone.R;
import com.scb.phone.view.activity.debitcard.DebitCardActivationActivity;
import com.scb.phone.view.activity.debitcard.DebitCardMarketConductActivity;
import com.scb.phone.view.fragment.debitcard.DebitCardLandingFragment;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import o.C10383eCj;
import o.C12124esL;
import o.C1465aEw;
import o.C14957gcv;
import o.C15715hv;
import o.C16623pm;
import o.C16636pr;
import o.InterfaceC12824fIT;
import o.InterfaceC13391fZD;
import o.InterfaceC9095ddJ;
import o.LPt;
import o.TDT;
import o.ZI;
import o.qeC;
/* loaded from: classes5.dex */
public final class DebitCardLandingFragment extends Hilt_DebitCardLandingFragment implements InterfaceC9095ddJ {
public static final IeS c = new IeS(0);
private LPt d;
@InterfaceC13391fZD
public C1465aEw presenter;
@InterfaceC13391fZD
public TDT toggleCache;
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C16636pr c16636pr;
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
C1465aEw c1465aEw = this.presenter;
TDT tdt = null;
if (c1465aEw == null) {
C14957gcv.a("");
c1465aEw = null;
}
c1465aEw.e((C1465aEw) this);
C1465aEw c1465aEw2 = this.presenter;
if (c1465aEw2 == null) {
C14957gcv.a("");
c1465aEw2 = null;
}
TDT tdt2 = this.toggleCache;
if (tdt2 == null) {
C14957gcv.a("");
tdt2 = null;
}
boolean z = tdt2.f8370o;
TDT tdt3 = this.toggleCache;
if (tdt3 != null) {
tdt = tdt3;
} else {
C14957gcv.a("");
}
boolean z2 = tdt.d;
List<Integer> list = c1465aEw2.b;
C14957gcv.e(list, "");
ArrayList arrayList = new ArrayList(list instanceof Collection ? list.size() : 10);
Iterator<T> it = list.iterator();
while (it.hasNext()) {
int intValue = ((Number) it.next()).intValue();
C16623pm c16623pm = c1465aEw2.a;
if (intValue == 0) {
c16636pr = new C16636pr(C15715hv.IeS.ic_request_debit_card, C15715hv.tOB.debit_card_request_function, z);
} else {
if (intValue != 1) {
throw new IllegalArgumentException("Function not valid");
}
c16636pr = new C16636pr(C15715hv.IeS.ic_activate_debit_card, C15715hv.tOB.debit_card_activate_function, z2);
}
arrayList.add(c16636pr);
}
final ArrayList arrayList2 = arrayList;
ZI.IeS ieS = new ZI.IeS(arrayList2) { // from class: o.aEy
private List e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C1465aEw.b(this.e, (InterfaceC9095ddJ) obj);
}
{
this.e = arrayList2;
}
};
if (c1465aEw2.f != 0) {
ieS.e(c1465aEw2.f);
}
LPt lPt = this.d;
C14957gcv.e(lPt);
RecyclerView recyclerView = lPt.a;
recyclerView.getContext();
recyclerView.setLayoutManager(new LinearLayoutManager(1, false));
recyclerView.d(new C10383eCj(), -1);
recyclerView.setNestedScrollingEnabled(false);
}
@Override // o.InterfaceC9095ddJ
public final void a(List<C16636pr> list) {
C14957gcv.e(list, "");
LPt lPt = this.d;
C14957gcv.e(lPt);
lPt.a.setAdapter(new C12124esL(list, new InterfaceC12824fIT(this) { // from class: o.eQd
private DebitCardLandingFragment b;
@Override // o.InterfaceC12824fIT
public final void a(int i) {
DebitCardLandingFragment.d(this.b, i);
}
{
this.b = this;
}
}));
}
@Override // o.InterfaceC9095ddJ
public final void e() {
DebitCardMarketConductActivity.IeS ieS = DebitCardMarketConductActivity.b;
Context requireContext = requireContext();
C14957gcv.c(requireContext, "");
C14957gcv.e(requireContext, "");
requireContext.startActivity(new Intent(requireContext, (Class<?>) DebitCardMarketConductActivity.class));
}
@Override // o.InterfaceC9095ddJ
public final void a() {
DebitCardActivationActivity.Sts sts = DebitCardActivationActivity.b;
Context requireContext = requireContext();
C14957gcv.c(requireContext, "");
C14957gcv.e(requireContext, "");
startActivity(new Intent(requireContext, (Class<?>) DebitCardActivationActivity.class));
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C1465aEw c1465aEw = this.presenter;
if (c1465aEw == null) {
C14957gcv.a("");
c1465aEw = null;
}
c1465aEw.w_();
this.d = null;
super.onDestroyView();
}
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
public static /* synthetic */ void d(DebitCardLandingFragment debitCardLandingFragment, int i) {
C14957gcv.e(debitCardLandingFragment, "");
C1465aEw c1465aEw = debitCardLandingFragment.presenter;
if (c1465aEw == null) {
C14957gcv.a("");
c1465aEw = null;
}
int intValue = c1465aEw.b.get(i).intValue();
if (intValue == 0) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.aEv
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9095ddJ) obj).e();
}
};
if (c1465aEw.f != 0) {
ieS.e(c1465aEw.f);
return;
}
return;
}
if (intValue == 1) {
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.aEz
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9095ddJ) obj).a();
}
};
if (c1465aEw.f != 0) {
ieS2.e(c1465aEw.f);
return;
}
return;
}
throw new UnsupportedOperationException("Function not supported");
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559536, viewGroup, false);
RecyclerView recyclerView = (RecyclerView) qeC.e(inflate, R.id.recycler_view);
if (recyclerView != null) {
LPt lPt = new LPt((ConstraintLayout) inflate, recyclerView);
this.d = lPt;
C14957gcv.e(lPt);
ConstraintLayout constraintLayout = lPt.d;
C14957gcv.c(constraintLayout, "");
return constraintLayout;
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(R.id.recycler_view)));
}
}