what-the-bank/sources/com/scb/phone/view/fragment/debitbenefit/DebitCardBenefitLandingFrag...

171 lines
5.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.debitbenefit;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.activity.debitbenefit.DebitCardBenefitDetailActivity;
import com.scb.phone.view.adapter.debitcardbenefit.DebitCardBenefitLandingAdapter;
import com.scb.phone.view.fragment.BaseFragment;
import java.util.List;
import o.C0559Jj;
import o.C0562Jl;
import o.C14957gcv;
import o.InterfaceC13391fZD;
import o.InterfaceC9169dee;
import o.ZI;
import o.aGF;
/* loaded from: classes5.dex */
public final class DebitCardBenefitLandingFragment extends Hilt_DebitCardBenefitLandingFragment implements InterfaceC9169dee.RVV, DebitCardBenefitLandingAdapter.IeS {
public static final HBt d = new HBt(0);
private DebitCardBenefitLandingAdapter c;
private String g;
@InterfaceC13391fZD
public aGF presenter;
@BindView
public RecyclerView rvDebitBenefit;
/* loaded from: classes5.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
return layoutInflater.inflate(R.layout.2131559535, viewGroup, false);
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
Bundle arguments = getArguments();
aGF agf = null;
C0559Jj c0559Jj = arguments != null ? (C0559Jj) arguments.getParcelable("benefitInfo") : null;
((BaseFragment) this).a = ButterKnife.c(this, view);
if (c0559Jj != null) {
this.g = c0559Jj.e;
aGF agf2 = this.presenter;
if (agf2 == null) {
C14957gcv.a("");
agf2 = null;
}
agf2.e((aGF) this);
aGF agf3 = this.presenter;
if (agf3 != null) {
agf = agf3;
} else {
C14957gcv.a("");
}
final List<C0562Jl> list = c0559Jj.b;
C14957gcv.e(list, "");
ZI.IeS ieS = new ZI.IeS(list) { // from class: o.aGB
private List e;
@Override // o.ZI.IeS
public final void e(Object obj) {
aGF.a(this.e, (InterfaceC9169dee.RVV) obj);
}
{
this.e = list;
}
};
if (agf.f != 0) {
ieS.e(agf.f);
}
}
super.aa();
u(this.g);
Y();
v("debit_card_select_benefit");
}
@Override // com.scb.phone.view.adapter.debitcardbenefit.DebitCardBenefitLandingAdapter.IeS
public final void e(C0562Jl c0562Jl) {
C14957gcv.e(c0562Jl, "");
aGF agf = this.presenter;
if (agf == null) {
C14957gcv.a("");
agf = null;
}
final String str = c0562Jl.i;
C14957gcv.e(str, "");
ZI.IeS ieS = new ZI.IeS(str) { // from class: o.aGE
private String b;
@Override // o.ZI.IeS
public final void e(Object obj) {
aGF.a(this.b, (InterfaceC9169dee.RVV) obj);
}
{
this.b = str;
}
};
if (agf.f != 0) {
ieS.e(agf.f);
}
Context context = getContext();
if (context != null) {
DebitCardBenefitDetailActivity.HBt hBt = DebitCardBenefitDetailActivity.b;
context.startActivity(DebitCardBenefitDetailActivity.HBt.aaZ_(context, c0562Jl));
}
}
@Override // o.InterfaceC9169dee.RVV
public final void b() {
v("cvp_benefit_selected");
}
@Override // o.InterfaceC9169dee.RVV
public final void c() {
v("tvi_benefit_selected");
}
@Override // com.scb.phone.view.fragment.BaseFragment
public final void aa() {
super.aa();
u(this.g);
Y();
}
@Override // o.InterfaceC9169dee.RVV
public final void d(List<C0562Jl> list) {
C14957gcv.e(list, "");
Context context = getContext();
if (context != null) {
this.c = new DebitCardBenefitLandingAdapter(context, list, this);
RecyclerView recyclerView = this.rvDebitBenefit;
DebitCardBenefitLandingAdapter debitCardBenefitLandingAdapter = null;
if (recyclerView == null) {
C14957gcv.a("");
recyclerView = null;
}
recyclerView.setLayoutManager(new LinearLayoutManager(1, false));
DebitCardBenefitLandingAdapter debitCardBenefitLandingAdapter2 = this.c;
if (debitCardBenefitLandingAdapter2 == null) {
C14957gcv.a("");
} else {
debitCardBenefitLandingAdapter = debitCardBenefitLandingAdapter2;
}
recyclerView.setAdapter(debitCardBenefitLandingAdapter);
}
}
}