package com.scb.phone.view.adapter.purchase; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; import com.scb.phone.R; import com.scb.phone.view.adapter.purchase.PurchaseAccountSourceAdapter; import java.util.ArrayList; import java.util.List; import o.InterfaceC12824fIT; import o.Jel; import o.PRA; import o.WW; import o.WYJ; import o.YKU; import o.nMh; import o.pyT; /* loaded from: classes5.dex */ public final class PurchaseAccountSourceAdapter extends WYJ { private Context a; private InterfaceC12824fIT b; private List c; public int d = 0; private String e; private LayoutInflater g; @Override // o.WYJ public final int getItemPosition(Object obj) { return -2; } @Override // o.WYJ public final boolean isViewFromObject(View view, Object obj) { return view == obj; } /* loaded from: classes5.dex */ public class ItemViewHolder_ViewBinding implements Unbinder { private ItemViewHolder d; public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) { this.d = itemViewHolder; itemViewHolder.background = (LinearLayout) pyT.e(view, R.id.account_source_linear_layout, "field 'background'", LinearLayout.class); itemViewHolder.title = (TextView) pyT.e(view, R.id.account_source_name_text_view, "field 'title'", TextView.class); itemViewHolder.fund = (TextView) pyT.e(view, R.id.account_source_funds_text_view, "field 'fund'", TextView.class); } @Override // butterknife.Unbinder public final void a() { ItemViewHolder itemViewHolder = this.d; if (itemViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.d = null; itemViewHolder.background = null; itemViewHolder.title = null; itemViewHolder.fund = null; } } public PurchaseAccountSourceAdapter(Context context, List list, InterfaceC12824fIT interfaceC12824fIT) { this.a = context; this.g = (LayoutInflater) context.getSystemService("layout_inflater"); this.c = list == null ? new ArrayList<>() : list; this.b = interfaceC12824fIT; } @Override // o.WYJ public final Object instantiateItem(ViewGroup viewGroup, final int i) { View inflate = this.g.inflate(R.layout.2131559209, viewGroup, false); WW ww = (WW) ((List) new YKU(this.c).b(new Jel(this) { // from class: o.eyf private PurchaseAccountSourceAdapter a; @Override // o.Jel public final boolean e(Object obj) { boolean equalsIgnoreCase; equalsIgnoreCase = ((WW) obj).s.equalsIgnoreCase(this.a.e); return equalsIgnoreCase; } { this.a = this; } }).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8()))).get(i); ItemViewHolder itemViewHolder = new ItemViewHolder(inflate); if (ww != null) { itemViewHolder.title.setText(ww.x); itemViewHolder.title.setTag("TAG_ACCOUNT_SOURCE_ADAPTER_TEXT".concat(String.valueOf(i))); itemViewHolder.fund.setText(ww.c); itemViewHolder.background.setTag("TAG_ACCOUNT_SOURCE_ADAPTER".concat(String.valueOf(i))); if (this.d == i) { itemViewHolder.background.setBackground(nMh.getDrawable(this.a, R.drawable.rounded_purple_view_pager)); itemViewHolder.title.setTextColor(nMh.getColor(this.a, R.color.f2982131099805)); } else { itemViewHolder.background.setBackground(nMh.getDrawable(this.a, R.drawable.bg_white_rounded_with_border)); itemViewHolder.title.setTextColor(nMh.getColor(this.a, R.color.f3092131099816)); } itemViewHolder.background.setOnClickListener(new View.OnClickListener(this, i) { // from class: o.eyi private int a; private PurchaseAccountSourceAdapter d; @Override // android.view.View.OnClickListener public final void onClick(View view) { PurchaseAccountSourceAdapter.d(this.d, this.a); } { this.d = this; this.a = i; } }); } viewGroup.addView(inflate, 0); return inflate; } @Override // o.WYJ public final void destroyItem(ViewGroup viewGroup, int i, Object obj) { viewGroup.removeView((View) obj); } /* loaded from: classes5.dex */ static class ItemViewHolder extends RecyclerView.zJl { @BindView LinearLayout background; private View c; @BindView TextView fund; @BindView TextView title; ItemViewHolder(View view) { super(view); this.c = view; ButterKnife.c(this, view); } } public final WW b(int i) { if (i < getCount()) { return (WW) ((List) new YKU(this.c).b(new Jel(this) { // from class: o.eyq private PurchaseAccountSourceAdapter c; @Override // o.Jel public final boolean e(Object obj) { boolean equalsIgnoreCase; equalsIgnoreCase = ((WW) obj).s.equalsIgnoreCase(this.c.e); return equalsIgnoreCase; } { this.c = this; } }).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8()))).get(i); } return null; } public static /* synthetic */ void d(PurchaseAccountSourceAdapter purchaseAccountSourceAdapter, int i) { InterfaceC12824fIT interfaceC12824fIT = purchaseAccountSourceAdapter.b; if (interfaceC12824fIT != null) { interfaceC12824fIT.a(i); } } @Override // o.WYJ public final int getCount() { List list = this.c; if (list == null) { return 0; } return ((List) new YKU(list).b(new Jel(this) { // from class: o.eyg private PurchaseAccountSourceAdapter e; @Override // o.Jel public final boolean e(Object obj) { boolean equalsIgnoreCase; equalsIgnoreCase = ((WW) obj).s.equalsIgnoreCase(this.e.e); return equalsIgnoreCase; } { this.e = this; } }).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8()))).size(); } }