package com.scb.phone.view.adapter.investment.discover; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; 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.investment.discover.DiscoverSearchResultAdapter; import java.util.ArrayList; import java.util.List; import o.AbstractC14961gcz; import o.C0830Pj; import o.C14866gag; import o.C14957gcv; import o.InterfaceC12929fLg; import o.InterfaceC13393fZL; import o.InterfaceC14890gbN; import o.fZZ; import o.nMh; import o.pyT; /* loaded from: classes5.dex */ public final class DiscoverSearchResultAdapter extends RecyclerView.Sts { public IeS b; public final InterfaceC13393fZL c; public String e; /* loaded from: classes5.dex */ public interface IeS { void e(C0830Pj c0830Pj); } /* loaded from: classes5.dex */ public final class ItemViewHolder_ViewBinding implements Unbinder { private ItemViewHolder e; public ItemViewHolder_ViewBinding(ItemViewHolder itemViewHolder, View view) { this.e = itemViewHolder; itemViewHolder.tvFundCode = (TextView) pyT.e(view, R.id.tvFundCode, "field 'tvFundCode'", TextView.class); itemViewHolder.tvFundName = (TextView) pyT.e(view, R.id.tvFundName, "field 'tvFundName'", TextView.class); itemViewHolder.tvBrokerName = (TextView) pyT.e(view, R.id.tvBrokerName, "field 'tvBrokerName'", TextView.class); itemViewHolder.tvYield = (TextView) pyT.e(view, R.id.tvYield, "field 'tvYield'", TextView.class); itemViewHolder.tvAsOfDate = (TextView) pyT.e(view, R.id.tvAsOfDate, "field 'tvAsOfDate'", TextView.class); itemViewHolder.tvTag1 = (TextView) pyT.e(view, R.id.tvTag1, "field 'tvTag1'", TextView.class); itemViewHolder.tvTag2 = (TextView) pyT.e(view, R.id.tvTag2, "field 'tvTag2'", TextView.class); } @Override // butterknife.Unbinder public final void a() { ItemViewHolder itemViewHolder = this.e; if (itemViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.e = null; itemViewHolder.tvFundCode = null; itemViewHolder.tvFundName = null; itemViewHolder.tvBrokerName = null; itemViewHolder.tvYield = null; itemViewHolder.tvAsOfDate = null; itemViewHolder.tvTag1 = null; itemViewHolder.tvTag2 = null; } } public DiscoverSearchResultAdapter() { RVV rvv = RVV.b; C14957gcv.e(rvv, ""); this.c = new fZZ(rvv); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ void onBindViewHolder(ItemViewHolder itemViewHolder, int i) { Context context; ItemViewHolder itemViewHolder2 = itemViewHolder; C14957gcv.e(itemViewHolder2, ""); final C0830Pj c0830Pj = (C0830Pj) ((List) this.c.e()).get(i); if (c0830Pj == null || (context = itemViewHolder2.itemView.getContext()) == null) { return; } C14957gcv.c(context, ""); if (itemViewHolder2 != null) { C14957gcv.e(context, ""); C14957gcv.e(c0830Pj, ""); ButterKnife.c(itemViewHolder2, itemViewHolder2.itemView); View view = itemViewHolder2.itemView; final DiscoverSearchResultAdapter discoverSearchResultAdapter = itemViewHolder2.c; view.setOnClickListener(new View.OnClickListener(discoverSearchResultAdapter, c0830Pj) { // from class: o.evo private C0830Pj c; private DiscoverSearchResultAdapter e; @Override // android.view.View.OnClickListener public final void onClick(View view2) { DiscoverSearchResultAdapter.ItemViewHolder.c(this.e, this.c); } { this.e = discoverSearchResultAdapter; this.c = c0830Pj; } }); int color = nMh.getColor(context, ItemViewHolder.a(c0830Pj.j)); TextView textView = itemViewHolder2.tvFundCode; C14866gag c14866gag = null; if (textView == null) { C14957gcv.a(""); textView = null; } ItemViewHolder itemViewHolder3 = itemViewHolder2; String str = c0830Pj.a; String str2 = itemViewHolder2.c.e; if (str2 == null) { str2 = ""; } textView.setText(InterfaceC12929fLg.aAt_(itemViewHolder3, str, str2, nMh.getColor(context, R.color.f13682131100876))); TextView textView2 = itemViewHolder2.tvFundName; if (textView2 == null) { C14957gcv.a(""); textView2 = null; } String str3 = c0830Pj.b; String str4 = itemViewHolder2.c.e; if (str4 == null) { str4 = ""; } textView2.setText(InterfaceC12929fLg.aAt_(itemViewHolder3, str3, str4, nMh.getColor(context, R.color.f13682131100876))); TextView textView3 = itemViewHolder2.tvBrokerName; if (textView3 == null) { C14957gcv.a(""); textView3 = null; } textView3.setText(c0830Pj.e); TextView textView4 = itemViewHolder2.tvYield; if (textView4 == null) { C14957gcv.a(""); textView4 = null; } textView4.setText(c0830Pj.g); TextView textView5 = itemViewHolder2.tvAsOfDate; if (textView5 == null) { C14957gcv.a(""); textView5 = null; } textView5.setText(c0830Pj.c); TextView textView6 = itemViewHolder2.tvAsOfDate; if (textView6 == null) { C14957gcv.a(""); textView6 = null; } textView6.setVisibility(c0830Pj.c.length() == 0 ? 8 : 0); TextView textView7 = itemViewHolder2.tvYield; if (textView7 == null) { C14957gcv.a(""); textView7 = null; } textView7.setTextColor(color); List list = c0830Pj.d; TextView textView8 = itemViewHolder2.tvTag1; if (textView8 == null) { C14957gcv.a(""); textView8 = null; } TextView textView9 = itemViewHolder2.tvTag2; if (textView9 == null) { C14957gcv.a(""); textView9 = null; } if (list != null) { if (list.size() == 1) { textView8.setText(list.get(0)); textView8.setVisibility(0); textView9.setVisibility(8); } else if (list.size() >= 2) { textView8.setText(list.get(0)); textView9.setText(list.get(1)); textView8.setVisibility(0); textView9.setVisibility(0); } else { textView8.setVisibility(8); textView9.setVisibility(8); } c14866gag = C14866gag.c; } if (c14866gag == null) { textView8.setVisibility(8); textView9.setVisibility(8); } } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ ItemViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { C14957gcv.e(viewGroup, ""); View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559993, viewGroup, false); C14957gcv.c(inflate, ""); return new ItemViewHolder(this, inflate); } /* loaded from: classes5.dex */ public static final class LWm { private LWm() { } public /* synthetic */ LWm(byte b) { this(); } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemCount() { return ((List) this.c.e()).size(); } /* loaded from: classes5.dex */ public final class ItemViewHolder extends RecyclerView.zJl implements InterfaceC12929fLg { final DiscoverSearchResultAdapter c; @BindView public TextView tvAsOfDate; @BindView public TextView tvBrokerName; @BindView public TextView tvFundCode; @BindView public TextView tvFundName; @BindView public TextView tvTag1; @BindView public TextView tvTag2; @BindView public TextView tvYield; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public ItemViewHolder(DiscoverSearchResultAdapter discoverSearchResultAdapter, View view) { super(view); C14957gcv.e(view, ""); this.c = discoverSearchResultAdapter; } static int a(Double d) { return (d == null || d.doubleValue() <= 0.0d) ? (d == null || d.doubleValue() >= 0.0d) ? R.color.f1852131099685 : R.color.f3462131099854 : R.color.f3432131099851; } public static /* synthetic */ void c(DiscoverSearchResultAdapter discoverSearchResultAdapter, C0830Pj c0830Pj) { C14957gcv.e(discoverSearchResultAdapter, ""); C14957gcv.e(c0830Pj, ""); IeS ieS = discoverSearchResultAdapter.b; if (ieS != null) { ieS.e(c0830Pj); } } } /* loaded from: classes5.dex */ static final class RVV extends AbstractC14961gcz implements InterfaceC14890gbN> { public static final RVV b = new RVV(); @Override // o.InterfaceC14890gbN public final /* synthetic */ List invoke() { return new ArrayList(); } RVV() { super(0); } } static { new LWm((byte) 0); } }