package com.scb.phone.view.adapter.investment.onboarding; 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.onboarding.SelectableChoiceAdapter; import java.util.ArrayList; import java.util.List; import o.pyT; /* loaded from: classes5.dex */ public class SelectableChoiceAdapter extends RecyclerView.Sts { private final HBt d; public int b = -1; public ChoiceHolder e = null; public final List c = new ArrayList(); /* loaded from: classes5.dex */ public interface HBt { void e(String str, int i); } /* loaded from: classes5.dex */ public interface Sts { void b(ChoiceHolder choiceHolder, String str); } /* loaded from: classes5.dex */ public class ChoiceHolder_ViewBinding implements Unbinder { private ChoiceHolder d; public ChoiceHolder_ViewBinding(ChoiceHolder choiceHolder, View view) { this.d = choiceHolder; choiceHolder.text1 = (TextView) pyT.e(view, R.id.text1, "field 'text1'", TextView.class); } @Override // butterknife.Unbinder public final void a() { ChoiceHolder choiceHolder = this.d; if (choiceHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.d = null; choiceHolder.text1 = null; } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public /* synthetic */ void onBindViewHolder(ChoiceHolder choiceHolder, int i) { ChoiceHolder choiceHolder2 = choiceHolder; String str = this.c.get(i); choiceHolder2.e = str; choiceHolder2.text1.setText(str); if (i == this.b) { ChoiceHolder choiceHolder3 = this.e; if (choiceHolder3 != null) { choiceHolder3.itemView.setSelected(false); } choiceHolder2.itemView.setSelected(false); this.e = choiceHolder2; choiceHolder2.itemView.setSelected(true); this.d.e(choiceHolder2.e, choiceHolder2.getAdapterPosition()); this.b = -1; } } public SelectableChoiceAdapter(HBt hBt) { this.d = hBt; } @Override // androidx.recyclerview.widget.RecyclerView.Sts public int getItemCount() { return this.c.size(); } /* loaded from: classes5.dex */ public static class ChoiceHolder extends RecyclerView.zJl { String e; @BindView TextView text1; ChoiceHolder(ViewGroup viewGroup, final Sts sts) { super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559987, viewGroup, false)); ButterKnife.c(this, this.itemView); this.itemView.setOnClickListener(new View.OnClickListener(this, sts) { // from class: o.evF private SelectableChoiceAdapter.ChoiceHolder d; private SelectableChoiceAdapter.Sts e; @Override // android.view.View.OnClickListener public final void onClick(View view) { this.e.b(r2, this.d.e); } { this.d = this; this.e = sts; } }); } } public static /* synthetic */ void a(SelectableChoiceAdapter selectableChoiceAdapter, ChoiceHolder choiceHolder, String str) { ChoiceHolder choiceHolder2 = selectableChoiceAdapter.e; if (choiceHolder2 != null) { choiceHolder2.itemView.setSelected(false); } selectableChoiceAdapter.e = choiceHolder; choiceHolder.itemView.setSelected(true); selectableChoiceAdapter.d.e(str, choiceHolder.getAdapterPosition()); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public /* synthetic */ ChoiceHolder onCreateViewHolder(ViewGroup viewGroup, int i) { return new ChoiceHolder(viewGroup, new Sts(this) { // from class: o.evG private SelectableChoiceAdapter a; @Override // com.scb.phone.view.adapter.investment.onboarding.SelectableChoiceAdapter.Sts public final void b(SelectableChoiceAdapter.ChoiceHolder choiceHolder, String str) { SelectableChoiceAdapter.a(this.a, choiceHolder, str); } { this.a = this; } }); } }