package com.scb.phone.view.adapter.hml; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.Unbinder; import com.scb.phone.R; import com.scb.phone.view.activity.hml.HmlETBOperatingAccountActivity; import com.squareup.picasso.Picasso; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import o.AbstractC14961gcz; import o.C13020fOa; import o.C14866gag; import o.C14957gcv; import o.InterfaceC14894gbR; import o.InterfaceC14937gcb; import o.MT; import o.MX; import o.gnL; import o.pyT; /* loaded from: classes5.dex */ public final class HmlBusinessInfoAdapter extends RecyclerView.Sts { public List a; public int b; private final InterfaceC14937gcb c; public final int e; @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ void onBindViewHolder(BankAccountViewHolder bankAccountViewHolder, int i) { TextView textView; BankAccountViewHolder bankAccountViewHolder2 = bankAccountViewHolder; C14957gcv.e(bankAccountViewHolder2, ""); MX mx = this.a.get(i); C14957gcv.e(mx, ""); int i2 = BankAccountViewHolder.Sts.c[mx.j.ordinal()]; if (i2 != 1) { if (i2 != 2 || (textView = (TextView) bankAccountViewHolder2.itemView.findViewById(R.id.tv_operating_selector)) == null) { return; } textView.setBackgroundResource(mx.h ? R.drawable.shape_red_reounded_reactangle_border : R.drawable.shape_gray_rounded_rectangle); return; } TextView textView2 = bankAccountViewHolder2.accountTitle; if (textView2 == null) { C14957gcv.a(""); textView2 = null; } textView2.setText(mx.a); C13020fOa e = Picasso.d().e(mx.c); ImageView imageView = bankAccountViewHolder2.accountIcon; if (imageView == null) { C14957gcv.a(""); imageView = null; } e.aBu_(imageView, null); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final /* synthetic */ BankAccountViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { BankAccountViewHolder bankAccountViewHolder; C14957gcv.e(viewGroup, ""); if (i == MT.PLACE_HOLDER.ordinal()) { View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559034, viewGroup, false); C14957gcv.c(inflate, ""); bankAccountViewHolder = new BankAccountViewHolder(inflate, new LWm(this)); } else { View inflate2 = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559062, viewGroup, false); C14957gcv.c(inflate2, ""); bankAccountViewHolder = new BankAccountViewHolder(inflate2, new Sts(this)); } return bankAccountViewHolder; } /* loaded from: classes5.dex */ public final class BankAccountViewHolder_ViewBinding implements Unbinder { private BankAccountViewHolder b; private View c; public BankAccountViewHolder_ViewBinding(BankAccountViewHolder bankAccountViewHolder, View view) { this.b = bankAccountViewHolder; bankAccountViewHolder.accountIcon = (ImageView) pyT.e(view, R.id.iv_account_icon, "field 'accountIcon'", ImageView.class); bankAccountViewHolder.accountTitle = (TextView) pyT.e(view, R.id.tv_account_title, "field 'accountTitle'", TextView.class); View a = pyT.a(view, R.id.iv_edit, "method 'onItemClick'"); this.c = a; a.setOnClickListener(new gnL(this, bankAccountViewHolder) { // from class: com.scb.phone.view.adapter.hml.HmlBusinessInfoAdapter.BankAccountViewHolder_ViewBinding.3 private BankAccountViewHolder a; private BankAccountViewHolder_ViewBinding d; { this.d = this; this.a = bankAccountViewHolder; } @Override // o.gnL public final void e(View view2) { this.a.onItemClick(); } }); } @Override // butterknife.Unbinder public final void a() { BankAccountViewHolder bankAccountViewHolder = this.b; if (bankAccountViewHolder == null) { throw new IllegalStateException("Bindings already cleared."); } this.b = null; bankAccountViewHolder.accountIcon = null; bankAccountViewHolder.accountTitle = null; this.c.setOnClickListener(null); this.c = null; } } /* JADX WARN: Multi-variable type inference failed */ public HmlBusinessInfoAdapter(int i, InterfaceC14937gcb interfaceC14937gcb) { C14957gcv.e(interfaceC14937gcb, ""); this.e = i; this.c = interfaceC14937gcb; this.a = new ArrayList(); this.b = -1; } /* loaded from: classes5.dex */ static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR { private HmlBusinessInfoAdapter d; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Integer num) { this.d.b = num.intValue(); this.d.c.invoke(HmlETBOperatingAccountActivity.LWm.ADD, null); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ LWm(HmlBusinessInfoAdapter hmlBusinessInfoAdapter) { super(1); this.d = hmlBusinessInfoAdapter; } } /* loaded from: classes5.dex */ static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR { private HmlBusinessInfoAdapter b; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Integer num) { this.b.b = num.intValue(); this.b.c.invoke(HmlETBOperatingAccountActivity.LWm.EDIT, this.b.a.get(this.b.b)); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ Sts(HmlBusinessInfoAdapter hmlBusinessInfoAdapter) { super(1); this.b = hmlBusinessInfoAdapter; } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemCount() { return this.a.size(); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemViewType(int i) { return this.a.get(i).j.ordinal(); } /* loaded from: classes5.dex */ public static final class BankAccountViewHolder extends RecyclerView.zJl { @BindView public ImageView accountIcon; @BindView public TextView accountTitle; private final InterfaceC14894gbR b; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ public BankAccountViewHolder(View view, InterfaceC14894gbR interfaceC14894gbR) { super(view); C14957gcv.e(view, ""); C14957gcv.e(interfaceC14894gbR, ""); this.b = interfaceC14894gbR; ButterKnife.c(this, view); } @OnClick public final void onItemClick() { this.b.invoke(Integer.valueOf(getAdapterPosition())); } /* loaded from: classes5.dex */ public final /* synthetic */ class Sts { public static final int[] c; static { int[] iArr = new int[MT.values().length]; try { iArr[MT.ACCOUNT.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { iArr[MT.PLACE_HOLDER.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } c = iArr; } } } /* loaded from: classes5.dex */ public static final class RVV implements Comparator { /* JADX WARN: Multi-variable type inference failed */ @Override // java.util.Comparator public final int compare(T t, T t2) { MT mt = ((MX) t).j; MT mt2 = ((MX) t2).j; if (mt == mt2) { return 0; } if (mt == null) { return -1; } if (mt2 == null) { return 1; } return mt.compareTo(mt2); } } }