package com.scb.phone.view.adapter.ccrredemption.pointtopay; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.RadioButton; 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.ccrredemption.pointtopay.PointToPaySelectPurchaseAdapter; import java.util.ArrayList; import o.C14957gcv; import o.HB; import o.HD; import o.InterfaceC12078erS; import o.YX; import o.pyT; /* loaded from: classes5.dex */ public final class PointToPaySelectPurchaseAdapter extends RecyclerView.Sts { private HD b; private final InterfaceC12078erS d; public ArrayList e; /* loaded from: classes5.dex */ public final class PointToPaySelectPurchaseTitleViewHolder_ViewBinding implements Unbinder { private PointToPaySelectPurchaseTitleViewHolder b; public PointToPaySelectPurchaseTitleViewHolder_ViewBinding(PointToPaySelectPurchaseTitleViewHolder pointToPaySelectPurchaseTitleViewHolder, View view) { this.b = pointToPaySelectPurchaseTitleViewHolder; pointToPaySelectPurchaseTitleViewHolder.tvRewardPoints = (TextView) pyT.e(view, R.id.tv_reward_points, "field 'tvRewardPoints'", TextView.class); pointToPaySelectPurchaseTitleViewHolder.tvDescription = (TextView) pyT.e(view, R.id.tv_description, "field 'tvDescription'", TextView.class); } @Override // butterknife.Unbinder public final void a() { PointToPaySelectPurchaseTitleViewHolder pointToPaySelectPurchaseTitleViewHolder = this.b; if (pointToPaySelectPurchaseTitleViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.b = null; pointToPaySelectPurchaseTitleViewHolder.tvRewardPoints = null; pointToPaySelectPurchaseTitleViewHolder.tvDescription = null; } } public PointToPaySelectPurchaseAdapter(InterfaceC12078erS interfaceC12078erS) { C14957gcv.e(interfaceC12078erS, ""); this.d = interfaceC12078erS; } /* loaded from: classes5.dex */ public final class PointToPaySelectPurchaseItemViewHolder_ViewBinding implements Unbinder { private PointToPaySelectPurchaseItemViewHolder e; public PointToPaySelectPurchaseItemViewHolder_ViewBinding(PointToPaySelectPurchaseItemViewHolder pointToPaySelectPurchaseItemViewHolder, View view) { this.e = pointToPaySelectPurchaseItemViewHolder; pointToPaySelectPurchaseItemViewHolder.llSelectPurchaseItem = (LinearLayout) pyT.e(view, R.id.ll_select_purchase_item, "field 'llSelectPurchaseItem'", LinearLayout.class); pointToPaySelectPurchaseItemViewHolder.rbSelectedTransaction = (RadioButton) pyT.e(view, R.id.rb_item, "field 'rbSelectedTransaction'", RadioButton.class); pointToPaySelectPurchaseItemViewHolder.tvAmount = (TextView) pyT.e(view, R.id.tv_amount, "field 'tvAmount'", TextView.class); pointToPaySelectPurchaseItemViewHolder.tvStatus = (TextView) pyT.e(view, R.id.tv_status_point, "field 'tvStatus'", TextView.class); } @Override // butterknife.Unbinder public final void a() { PointToPaySelectPurchaseItemViewHolder pointToPaySelectPurchaseItemViewHolder = this.e; if (pointToPaySelectPurchaseItemViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.e = null; pointToPaySelectPurchaseItemViewHolder.llSelectPurchaseItem = null; pointToPaySelectPurchaseItemViewHolder.rbSelectedTransaction = null; pointToPaySelectPurchaseItemViewHolder.tvAmount = null; pointToPaySelectPurchaseItemViewHolder.tvStatus = null; } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) { C14957gcv.e(viewGroup, ""); if (i == YX.TITLE.ordinal()) { View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131560031, viewGroup, false); C14957gcv.c(inflate, ""); return new PointToPaySelectPurchaseTitleViewHolder(this, inflate); } View inflate2 = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131560030, viewGroup, false); C14957gcv.c(inflate2, ""); return new PointToPaySelectPurchaseItemViewHolder(this, inflate2); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemCount() { ArrayList arrayList = this.e; if (arrayList != null) { return arrayList.size(); } return 0; } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemViewType(int i) { HB hb; ArrayList arrayList = this.e; YX yx = (arrayList == null || (hb = arrayList.get(i)) == null) ? null : hb.d; if (yx != null && RVV.b[yx.ordinal()] == 1) { return YX.TITLE.ordinal(); } return YX.ITEM.ordinal(); } /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Type inference failed for: r7v4, types: [android.widget.LinearLayout] */ @Override // androidx.recyclerview.widget.RecyclerView.Sts public final void onBindViewHolder(RecyclerView.zJl zjl, int i) { HB hb; HB hb2; HD hd; C14957gcv.e(zjl, ""); TextView textView = null; if (zjl instanceof PointToPaySelectPurchaseItemViewHolder) { PointToPaySelectPurchaseItemViewHolder pointToPaySelectPurchaseItemViewHolder = (PointToPaySelectPurchaseItemViewHolder) zjl; ArrayList arrayList = this.e; final HB hb3 = arrayList != null ? arrayList.get(i) : null; if (hb3 == null || (hd = hb3.a) == null) { return; } final PointToPaySelectPurchaseAdapter pointToPaySelectPurchaseAdapter = pointToPaySelectPurchaseItemViewHolder.b; RadioButton radioButton = pointToPaySelectPurchaseItemViewHolder.rbSelectedTransaction; if (radioButton == null) { C14957gcv.a(""); radioButton = null; } radioButton.setText(hd.i); TextView textView2 = pointToPaySelectPurchaseItemViewHolder.tvAmount; if (textView2 == null) { C14957gcv.a(""); textView2 = null; } textView2.setText(hd.b); TextView textView3 = pointToPaySelectPurchaseItemViewHolder.tvStatus; if (textView3 == null) { C14957gcv.a(""); textView3 = null; } textView3.setText(hd.c); RadioButton radioButton2 = pointToPaySelectPurchaseItemViewHolder.rbSelectedTransaction; if (radioButton2 == null) { C14957gcv.a(""); radioButton2 = null; } radioButton2.setChecked(pointToPaySelectPurchaseAdapter.b == hd); RadioButton radioButton3 = pointToPaySelectPurchaseItemViewHolder.rbSelectedTransaction; if (radioButton3 == null) { C14957gcv.a(""); radioButton3 = null; } radioButton3.setOnClickListener(new View.OnClickListener(pointToPaySelectPurchaseAdapter, hb3) { // from class: o.erQ private PointToPaySelectPurchaseAdapter b; private HB c; @Override // android.view.View.OnClickListener public final void onClick(View view) { PointToPaySelectPurchaseAdapter.PointToPaySelectPurchaseItemViewHolder.d(this.b, this.c); } { this.b = pointToPaySelectPurchaseAdapter; this.c = hb3; } }); ?? r7 = pointToPaySelectPurchaseItemViewHolder.llSelectPurchaseItem; if (r7 != 0) { textView = r7; } else { C14957gcv.a(""); } textView.setOnClickListener(new View.OnClickListener(pointToPaySelectPurchaseAdapter, hb3) { // from class: o.erT private PointToPaySelectPurchaseAdapter c; private HB e; @Override // android.view.View.OnClickListener public final void onClick(View view) { PointToPaySelectPurchaseAdapter.PointToPaySelectPurchaseItemViewHolder.b(this.c, this.e); } { this.c = pointToPaySelectPurchaseAdapter; this.e = hb3; } }); return; } if (zjl instanceof PointToPaySelectPurchaseTitleViewHolder) { PointToPaySelectPurchaseTitleViewHolder pointToPaySelectPurchaseTitleViewHolder = (PointToPaySelectPurchaseTitleViewHolder) zjl; ArrayList arrayList2 = this.e; String str = (arrayList2 == null || (hb2 = arrayList2.get(i)) == null) ? null : hb2.b; ArrayList arrayList3 = this.e; String str2 = (arrayList3 == null || (hb = arrayList3.get(i)) == null) ? null : hb.e; TextView textView4 = pointToPaySelectPurchaseTitleViewHolder.tvRewardPoints; if (textView4 == null) { C14957gcv.a(""); textView4 = null; } if (str == null) { str = ""; } textView4.setText(str); TextView textView5 = pointToPaySelectPurchaseTitleViewHolder.tvDescription; if (textView5 != null) { textView = textView5; } else { C14957gcv.a(""); } textView.setText(str2 != null ? str2 : ""); } } /* loaded from: classes5.dex */ public final class PointToPaySelectPurchaseItemViewHolder extends RecyclerView.zJl { private final View a; final PointToPaySelectPurchaseAdapter b; @BindView public LinearLayout llSelectPurchaseItem; @BindView public RadioButton rbSelectedTransaction; @BindView public TextView tvAmount; @BindView public TextView tvStatus; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public PointToPaySelectPurchaseItemViewHolder(PointToPaySelectPurchaseAdapter pointToPaySelectPurchaseAdapter, View view) { super(view); C14957gcv.e(view, ""); this.b = pointToPaySelectPurchaseAdapter; this.a = view; ButterKnife.c(this, view); } public static /* synthetic */ void d(PointToPaySelectPurchaseAdapter pointToPaySelectPurchaseAdapter, HB hb) { C14957gcv.e(pointToPaySelectPurchaseAdapter, ""); PointToPaySelectPurchaseAdapter.d(pointToPaySelectPurchaseAdapter, hb); } public static /* synthetic */ void b(PointToPaySelectPurchaseAdapter pointToPaySelectPurchaseAdapter, HB hb) { C14957gcv.e(pointToPaySelectPurchaseAdapter, ""); PointToPaySelectPurchaseAdapter.d(pointToPaySelectPurchaseAdapter, hb); } } /* loaded from: classes5.dex */ public final class PointToPaySelectPurchaseTitleViewHolder extends RecyclerView.zJl { private final View d; private PointToPaySelectPurchaseAdapter e; @BindView public TextView tvDescription; @BindView public TextView tvRewardPoints; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public PointToPaySelectPurchaseTitleViewHolder(PointToPaySelectPurchaseAdapter pointToPaySelectPurchaseAdapter, View view) { super(view); C14957gcv.e(view, ""); this.e = pointToPaySelectPurchaseAdapter; this.d = view; ButterKnife.c(this, view); } } public static final /* synthetic */ void d(PointToPaySelectPurchaseAdapter pointToPaySelectPurchaseAdapter, HB hb) { pointToPaySelectPurchaseAdapter.b = hb.a; pointToPaySelectPurchaseAdapter.d.a(hb); pointToPaySelectPurchaseAdapter.notifyDataSetChanged(); } /* loaded from: classes5.dex */ public final /* synthetic */ class RVV { public static final int[] b; static { int[] iArr = new int[YX.values().length]; try { iArr[YX.TITLE.ordinal()] = 1; } catch (NoSuchFieldError unused) { } b = iArr; } } }