package com.scb.phone.view.adapter.ndid; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CheckBox; import android.widget.TextView; import androidx.constraintlayout.widget.ConstraintLayout; 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.ndid.SearchAccountFoundAdapter; import java.util.Collections; import java.util.Comparator; import java.util.List; import o.C14957gcv; import o.C6583cXR; import o.dGW; import o.nMh; import o.pyT; /* loaded from: classes5.dex */ public final class SearchAccountFoundAdapter extends RecyclerView.Sts { private final RVV a; public boolean b; public final List d; private final boolean e; /* loaded from: classes5.dex */ public interface RVV { void b(dGW dgw); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ void onBindViewHolder(SearchAccountFoundAdapterViewHolder searchAccountFoundAdapterViewHolder, int i) { SearchAccountFoundAdapterViewHolder searchAccountFoundAdapterViewHolder2 = searchAccountFoundAdapterViewHolder; C14957gcv.e(searchAccountFoundAdapterViewHolder2, ""); final dGW dgw = this.d.get(i); final RVV rvv = this.a; boolean z = this.e; boolean z2 = this.b; C14957gcv.e(dgw, ""); C14957gcv.e(rvv, ""); searchAccountFoundAdapterViewHolder2.itemView.setEnabled(z2); TextView textView = searchAccountFoundAdapterViewHolder2.tvAccountNumber; CheckBox checkBox = null; if (textView == null) { C14957gcv.a(""); textView = null; } textView.setText(C6583cXR.b(dgw.e, z)); textView.setTextColor(nMh.getColor(textView.getContext(), SearchAccountFoundAdapterViewHolder.c(z2))); TextView textView2 = searchAccountFoundAdapterViewHolder2.tvProductType; if (textView2 == null) { C14957gcv.a(""); textView2 = null; } textView2.setText(dgw.c); textView2.setTextColor(nMh.getColor(textView2.getContext(), SearchAccountFoundAdapterViewHolder.c(z2))); ConstraintLayout constraintLayout = searchAccountFoundAdapterViewHolder2.layoutAccountContainer; if (constraintLayout == null) { C14957gcv.a(""); constraintLayout = null; } if (z2) { constraintLayout.setOnClickListener(new View.OnClickListener(rvv, dgw) { // from class: o.exh private SearchAccountFoundAdapter.RVV a; private dGW e; @Override // android.view.View.OnClickListener public final void onClick(View view) { SearchAccountFoundAdapter.SearchAccountFoundAdapterViewHolder.e(this.a, this.e); } { this.a = rvv; this.e = dgw; } }); } CheckBox checkBox2 = searchAccountFoundAdapterViewHolder2.cbAccount; if (checkBox2 != null) { checkBox = checkBox2; } else { C14957gcv.a(""); } checkBox.setChecked(false); checkBox.setEnabled(z2); checkBox.setButtonDrawable(nMh.getDrawable(checkBox.getContext(), SearchAccountFoundAdapterViewHolder.e(z2))); if (z2) { checkBox.setOnClickListener(new View.OnClickListener(rvv, dgw) { // from class: o.exo private SearchAccountFoundAdapter.RVV a; private dGW d; @Override // android.view.View.OnClickListener public final void onClick(View view) { SearchAccountFoundAdapter.SearchAccountFoundAdapterViewHolder.d(this.a, this.d); } { this.a = rvv; this.d = dgw; } }); } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ SearchAccountFoundAdapterViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { C14957gcv.e(viewGroup, ""); View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559332, viewGroup, false); C14957gcv.c(inflate, ""); return new SearchAccountFoundAdapterViewHolder(inflate); } /* loaded from: classes5.dex */ public final class SearchAccountFoundAdapterViewHolder_ViewBinding implements Unbinder { private SearchAccountFoundAdapterViewHolder b; public SearchAccountFoundAdapterViewHolder_ViewBinding(SearchAccountFoundAdapterViewHolder searchAccountFoundAdapterViewHolder, View view) { this.b = searchAccountFoundAdapterViewHolder; searchAccountFoundAdapterViewHolder.layoutAccountContainer = (ConstraintLayout) pyT.e(view, R.id.cs_layout_account_container, "field 'layoutAccountContainer'", ConstraintLayout.class); searchAccountFoundAdapterViewHolder.cbAccount = (CheckBox) pyT.e(view, R.id.cb_account, "field 'cbAccount'", CheckBox.class); searchAccountFoundAdapterViewHolder.tvAccountNumber = (TextView) pyT.e(view, R.id.tv_account_number, "field 'tvAccountNumber'", TextView.class); searchAccountFoundAdapterViewHolder.tvProductType = (TextView) pyT.e(view, R.id.tv_product_type, "field 'tvProductType'", TextView.class); } @Override // butterknife.Unbinder public final void a() { SearchAccountFoundAdapterViewHolder searchAccountFoundAdapterViewHolder = this.b; if (searchAccountFoundAdapterViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.b = null; searchAccountFoundAdapterViewHolder.layoutAccountContainer = null; searchAccountFoundAdapterViewHolder.cbAccount = null; searchAccountFoundAdapterViewHolder.tvAccountNumber = null; searchAccountFoundAdapterViewHolder.tvProductType = null; } } public SearchAccountFoundAdapter(List list, RVV rvv, boolean z) { C14957gcv.e(list, ""); C14957gcv.e(rvv, ""); this.d = list; this.a = rvv; this.e = z; this.b = true; } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemCount() { return this.d.size(); } /* loaded from: classes5.dex */ public static final class SearchAccountFoundAdapterViewHolder extends RecyclerView.zJl { @BindView public CheckBox cbAccount; @BindView public ConstraintLayout layoutAccountContainer; @BindView public TextView tvAccountNumber; @BindView public TextView tvProductType; static int c(boolean z) { return z ? R.color.f2982131099805 : R.color.f3412131099849; } static int e(boolean z) { return z ? R.drawable.account_checkbox_selector : R.drawable.ic_checkbox_disable; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public SearchAccountFoundAdapterViewHolder(View view) { super(view); C14957gcv.e(view, ""); ButterKnife.c(this, view); } public static /* synthetic */ void d(RVV rvv, dGW dgw) { C14957gcv.e(rvv, ""); C14957gcv.e(dgw, ""); rvv.b(dgw); } public static /* synthetic */ void e(RVV rvv, dGW dgw) { C14957gcv.e(rvv, ""); C14957gcv.e(dgw, ""); rvv.b(dgw); } } /* loaded from: classes5.dex */ public static final class LWm implements Comparator { /* JADX WARN: Multi-variable type inference failed */ @Override // java.util.Comparator public final int compare(T t, T t2) { Integer valueOf = Integer.valueOf(((dGW) t).b); Integer valueOf2 = Integer.valueOf(((dGW) t2).b); if (valueOf == valueOf2) { return 0; } if (valueOf == null) { return -1; } if (valueOf2 == null) { return 1; } return valueOf.compareTo(valueOf2); } } public final void b() { List list = this.d; if (list.size() > 1) { LWm lWm = new LWm(); C14957gcv.e(list, ""); C14957gcv.e(lWm, ""); if (list.size() > 1) { Collections.sort(list, lWm); } } notifyDataSetChanged(); } }