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.SelectedAccountAdapter; import java.util.Collections; import java.util.Comparator; import java.util.List; import o.C14957gcv; import o.C6583cXR; import o.dGW; import o.pyT; /* loaded from: classes5.dex */ public final class SelectedAccountAdapter extends RecyclerView.Sts { public final List b; private final boolean d; private final IeS e; /* loaded from: classes5.dex */ public interface IeS { void a(dGW dgw); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ void onBindViewHolder(SelectedAccountAdapterViewHolder selectedAccountAdapterViewHolder, int i) { SelectedAccountAdapterViewHolder selectedAccountAdapterViewHolder2 = selectedAccountAdapterViewHolder; C14957gcv.e(selectedAccountAdapterViewHolder2, ""); final dGW dgw = this.b.get(i); final IeS ieS = this.e; boolean z = this.d; C14957gcv.e(dgw, ""); C14957gcv.e(ieS, ""); TextView textView = selectedAccountAdapterViewHolder2.tvAccountNumber; CheckBox checkBox = null; if (textView == null) { C14957gcv.a(""); textView = null; } textView.setText(C6583cXR.b(dgw.e, z)); TextView textView2 = selectedAccountAdapterViewHolder2.tvProductType; if (textView2 == null) { C14957gcv.a(""); textView2 = null; } textView2.setText(dgw.c); ConstraintLayout constraintLayout = selectedAccountAdapterViewHolder2.layoutAccountContainer; if (constraintLayout == null) { C14957gcv.a(""); constraintLayout = null; } constraintLayout.setOnClickListener(new View.OnClickListener(ieS, dgw) { // from class: o.exn private dGW a; private SelectedAccountAdapter.IeS b; @Override // android.view.View.OnClickListener public final void onClick(View view) { SelectedAccountAdapter.SelectedAccountAdapterViewHolder.c(this.b, this.a); } { this.b = ieS; this.a = dgw; } }); CheckBox checkBox2 = selectedAccountAdapterViewHolder2.cbAccount; if (checkBox2 != null) { checkBox = checkBox2; } else { C14957gcv.a(""); } checkBox.setChecked(true); checkBox.setOnClickListener(new View.OnClickListener(ieS, dgw) { // from class: o.exm private SelectedAccountAdapter.IeS c; private dGW e; @Override // android.view.View.OnClickListener public final void onClick(View view) { SelectedAccountAdapter.SelectedAccountAdapterViewHolder.b(this.c, this.e); } { this.c = ieS; this.e = dgw; } }); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ SelectedAccountAdapterViewHolder 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 SelectedAccountAdapterViewHolder(inflate); } /* loaded from: classes5.dex */ public final class SelectedAccountAdapterViewHolder_ViewBinding implements Unbinder { private SelectedAccountAdapterViewHolder c; public SelectedAccountAdapterViewHolder_ViewBinding(SelectedAccountAdapterViewHolder selectedAccountAdapterViewHolder, View view) { this.c = selectedAccountAdapterViewHolder; selectedAccountAdapterViewHolder.layoutAccountContainer = (ConstraintLayout) pyT.e(view, R.id.cs_layout_account_container, "field 'layoutAccountContainer'", ConstraintLayout.class); selectedAccountAdapterViewHolder.cbAccount = (CheckBox) pyT.e(view, R.id.cb_account, "field 'cbAccount'", CheckBox.class); selectedAccountAdapterViewHolder.tvAccountNumber = (TextView) pyT.e(view, R.id.tv_account_number, "field 'tvAccountNumber'", TextView.class); selectedAccountAdapterViewHolder.tvProductType = (TextView) pyT.e(view, R.id.tv_product_type, "field 'tvProductType'", TextView.class); } @Override // butterknife.Unbinder public final void a() { SelectedAccountAdapterViewHolder selectedAccountAdapterViewHolder = this.c; if (selectedAccountAdapterViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.c = null; selectedAccountAdapterViewHolder.layoutAccountContainer = null; selectedAccountAdapterViewHolder.cbAccount = null; selectedAccountAdapterViewHolder.tvAccountNumber = null; selectedAccountAdapterViewHolder.tvProductType = null; } } public SelectedAccountAdapter(List list, IeS ieS, boolean z) { C14957gcv.e(list, ""); C14957gcv.e(ieS, ""); this.b = list; this.e = ieS; this.d = z; } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemCount() { return this.b.size(); } /* loaded from: classes5.dex */ public static final class SelectedAccountAdapterViewHolder extends RecyclerView.zJl { @BindView public CheckBox cbAccount; @BindView public ConstraintLayout layoutAccountContainer; @BindView public TextView tvAccountNumber; @BindView public TextView tvProductType; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public SelectedAccountAdapterViewHolder(View view) { super(view); C14957gcv.e(view, ""); ButterKnife.c(this, view); } public static /* synthetic */ void b(IeS ieS, dGW dgw) { C14957gcv.e(ieS, ""); C14957gcv.e(dgw, ""); ieS.a(dgw); } public static /* synthetic */ void c(IeS ieS, dGW dgw) { C14957gcv.e(ieS, ""); C14957gcv.e(dgw, ""); ieS.a(dgw); } } /* loaded from: classes5.dex */ public static final class HBt 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 c() { List list = this.b; if (list.size() > 1) { HBt hBt = new HBt(); C14957gcv.e(list, ""); C14957gcv.e(hBt, ""); if (list.size() > 1) { Collections.sort(list, hBt); } } notifyDataSetChanged(); } }