package o; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import androidx.appcompat.widget.AppCompatCheckBox; import androidx.recyclerview.widget.RecyclerView; import com.scb.phone.view.custom.common.CustomBulletTextView; import com.scb.phone.view.custom.easycash.CustomAccountSelector; import com.scb.phone.view.custom.easycash.CustomCreditCardPageSelector; import com.scb.phone.view.custom.easycash.CustomEasyCashSectionLabel; import com.scb.phone.view.custom.easycash.CustomTileToggle; import com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; import o.C12180etO; import o.C12188etW; /* renamed from: o.etz, reason: case insensitive filesystem */ /* loaded from: classes5.dex */ public final class C12217etz extends RecyclerView.Sts { private final HBt b; public List c; /* renamed from: o.etz$HBt */ /* loaded from: classes5.dex */ public interface HBt { void a(String str); void a(boolean z); void c(String str); void c(JO jo); void c(KQ kq); void c(WW ww); boolean c(); List e(); void e(String str); } public C12217etz(HBt hBt) { C14957gcv.e(hBt, ""); this.b = hBt; this.c = C14851gaI.c; } /* renamed from: o.etz$IeS */ /* loaded from: classes5.dex */ public static final class IeS { private IeS() { } public /* synthetic */ IeS(byte b) { this(); } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemViewType(int i) { KY ky = this.c.get(i); if (ky instanceof KZ) { return 0; } if (ky instanceof C0635Lc) { return 1; } if (ky instanceof KW) { return 2; } if (ky instanceof KP) { return 3; } if (ky instanceof C0633Lb) { return 4; } if (ky instanceof KX) { return 5; } if (ky instanceof KV) { return 6; } if (ky instanceof KS) { return 7; } if (ky instanceof C0638Ld) { return 8; } return super.getItemViewType(i); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) { C14957gcv.e(viewGroup, ""); LayoutInflater from = LayoutInflater.from(viewGroup.getContext()); int i2 = com.scb.phone.R.id.text_header; switch (i) { case 0: C3377awR QT_ = C3377awR.QT_(from, viewGroup); C14957gcv.c(QT_, ""); return new C12191etZ(QT_); case 1: C3377awR QT_2 = C3377awR.QT_(from, viewGroup); C14957gcv.c(QT_2, ""); return new C12245eua(QT_2); case 2: View inflate = from.inflate(com.scb.phone.R.layout.2131559123, viewGroup, false); CustomAccountSelector customAccountSelector = (CustomAccountSelector) qeC.e(inflate, com.scb.phone.R.id.account_selector); if (customAccountSelector != null) { CustomEasyCashSectionLabel customEasyCashSectionLabel = (CustomEasyCashSectionLabel) qeC.e(inflate, com.scb.phone.R.id.text_header); if (customEasyCashSectionLabel != null) { XYX xyx = new XYX((LinearLayout) inflate, customAccountSelector, customEasyCashSectionLabel); C14957gcv.c(xyx, ""); return new C12182etQ(xyx); } } else { i2 = com.scb.phone.R.id.account_selector; } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i2))); case 3: View inflate2 = from.inflate(com.scb.phone.R.layout.2131559121, viewGroup, false); CustomCreditCardPageSelector customCreditCardPageSelector = (CustomCreditCardPageSelector) qeC.e(inflate2, com.scb.phone.R.id.card_selector); if (customCreditCardPageSelector != null) { mXN mxn = new mXN((LinearLayout) inflate2, customCreditCardPageSelector); C14957gcv.c(mxn, ""); return new C12180etO(mxn); } throw new NullPointerException("Missing required view with ID: ".concat(inflate2.getResources().getResourceName(com.scb.phone.R.id.card_selector))); case 4: View inflate3 = from.inflate(com.scb.phone.R.layout.2131559126, viewGroup, false); CustomTileToggle customTileToggle = (CustomTileToggle) qeC.e(inflate3, com.scb.phone.R.id.custom_tile_toggle_repayment); if (customTileToggle != null) { CustomEasyCashSectionLabel customEasyCashSectionLabel2 = (CustomEasyCashSectionLabel) qeC.e(inflate3, com.scb.phone.R.id.text_header); if (customEasyCashSectionLabel2 != null) { i2 = com.scb.phone.R.id.view_repayment_plan_container; LinearLayout linearLayout = (LinearLayout) qeC.e(inflate3, com.scb.phone.R.id.view_repayment_plan_container); if (linearLayout != null) { C16473ofo c16473ofo = new C16473ofo((LinearLayout) inflate3, customTileToggle, customEasyCashSectionLabel2, linearLayout); C14957gcv.c(c16473ofo, ""); return new C12189etX(c16473ofo); } } } else { i2 = com.scb.phone.R.id.custom_tile_toggle_repayment; } throw new NullPointerException("Missing required view with ID: ".concat(inflate3.getResources().getResourceName(i2))); case 5: C1229Ynb QS_ = C1229Ynb.QS_(from, viewGroup); C14957gcv.c(QS_, ""); return new C12187etV(QS_); case 6: C1229Ynb QS_2 = C1229Ynb.QS_(from, viewGroup); C14957gcv.c(QS_2, ""); return new C12186etU(QS_2); case 7: View inflate4 = from.inflate(com.scb.phone.R.layout.2131559122, viewGroup, false); AppCompatCheckBox appCompatCheckBox = (AppCompatCheckBox) qeC.e(inflate4, com.scb.phone.R.id.checkbox_e_statement); if (appCompatCheckBox != null) { CustomEasyCashSectionLabel customEasyCashSectionLabel3 = (CustomEasyCashSectionLabel) qeC.e(inflate4, com.scb.phone.R.id.text_header); if (customEasyCashSectionLabel3 != null) { Jpx jpx = new Jpx((LinearLayout) inflate4, appCompatCheckBox, customEasyCashSectionLabel3); C14957gcv.c(jpx, ""); return new C12178etM(jpx); } } else { i2 = com.scb.phone.R.id.checkbox_e_statement; } throw new NullPointerException("Missing required view with ID: ".concat(inflate4.getResources().getResourceName(i2))); case 8: View inflate5 = from.inflate(com.scb.phone.R.layout.2131559125, viewGroup, false); int i3 = com.scb.phone.R.id.custom_spinner_due_date; CustomSpinnerWithTitle customSpinnerWithTitle = (CustomSpinnerWithTitle) qeC.e(inflate5, com.scb.phone.R.id.custom_spinner_due_date); if (customSpinnerWithTitle != null) { i3 = com.scb.phone.R.id.ll_layout_remark; LinearLayout linearLayout2 = (LinearLayout) qeC.e(inflate5, com.scb.phone.R.id.ll_layout_remark); if (linearLayout2 != null) { LinearLayout linearLayout3 = (LinearLayout) inflate5; ALt aLt = new ALt(linearLayout3, customSpinnerWithTitle, linearLayout2, linearLayout3); C14957gcv.c(aLt, ""); Context context = viewGroup.getContext(); C14957gcv.c(context, ""); return new C12188etW(aLt, context, this.b.c()); } } throw new NullPointerException("Missing required view with ID: ".concat(inflate5.getResources().getResourceName(i3))); default: View inflate6 = from.inflate(com.scb.phone.R.layout.2131559081, viewGroup, false); CustomEasyCashSectionLabel customEasyCashSectionLabel4 = (CustomEasyCashSectionLabel) qeC.e(inflate6, com.scb.phone.R.id.text_header); if (customEasyCashSectionLabel4 != null) { WHv wHv = new WHv((LinearLayout) inflate6, customEasyCashSectionLabel4); C14957gcv.c(wHv, ""); return new C12181etP(wHv); } throw new NullPointerException("Missing required view with ID: ".concat(inflate6.getResources().getResourceName(com.scb.phone.R.id.text_header))); } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final void onBindViewHolder(RecyclerView.zJl zjl, int i) { C14957gcv.e(zjl, ""); KY ky = this.c.get(i); switch (getItemViewType(i)) { case 0: C14957gcv.d(ky, ""); ((C12191etZ) zjl).d((KZ) ky, this.b.c(), new Sts(this), new LWm(this)); return; case 1: C14957gcv.d(ky, ""); ((C12245eua) zjl).d((C0635Lc) ky, new RVV(this)); return; case 2: C14957gcv.d(ky, ""); ((C12182etQ) zjl).b((KW) ky, new ojQ(this)); return; case 3: C14957gcv.d(ky, ""); KP kp = (KP) ky; ZqN zqN = new ZqN(this); C14957gcv.e(kp, ""); C14957gcv.e(zqN, ""); IR ir = kp.e; mXN mxn = ((C12180etO) zjl).a; List list = ir != null ? ir.e : null; List list2 = list; if (list2 == null || list2.isEmpty()) { zqN.invoke(null); mxn.c.setVisibility(8); return; } else { zqN.invoke(C14881gav.e((List) list)); mxn.c.setVisibility(0); mxn.c.d(ir, false, new C12180etO.RVV(mxn, zqN, list)); return; } case 4: C14957gcv.d(ky, ""); ((C12189etX) zjl).b((C0633Lb) ky, this.b.c(), new tOB(this)); return; case 5: C14957gcv.d(ky, ""); KX kx = (KX) ky; C14957gcv.e(kx, ""); ((C12187etV) zjl).c.a.setText(kx.b); return; case 6: C12186etU c12186etU = (C12186etU) zjl; C14957gcv.d(ky, ""); KV kv = (KV) ky; boolean c = this.b.c(); C14957gcv.e(kv, ""); KV kv2 = kv; C14957gcv.e(kv2, ""); c12186etU.c.a.setText(kv2.b); c12186etU.c.a.setVisibility(c ? 8 : 0); return; case 7: C14957gcv.d(ky, ""); ((C12178etM) zjl).c((KS) ky, new saX(this)); return; case 8: C12188etW c12188etW = (C12188etW) zjl; HBt hBt = this.b; C14957gcv.d(ky, ""); C0638Ld c0638Ld = (C0638Ld) ky; List e = hBt.e(); boolean c2 = this.b.c(); jbe jbeVar = new jbe(hBt); C14957gcv.e(c0638Ld, ""); C14957gcv.e(e, ""); C14957gcv.e(jbeVar, ""); ALt aLt = c12188etW.b; CustomSpinnerWithTitle customSpinnerWithTitle = aLt.d; if (!e.isEmpty()) { customSpinnerWithTitle.setItemsWithPlaceholder(e, false, false); } else { List singletonList = Collections.singletonList(c0638Ld.d); C14957gcv.c(singletonList, ""); customSpinnerWithTitle.setItemsWithPlaceholder(singletonList, false, false); } customSpinnerWithTitle.setSelectionIndex(c0638Ld.e); customSpinnerWithTitle.setForegroundFontEnabled(true); customSpinnerWithTitle.setOnCustomSpinnerWithTitleCompletion(new C12188etW.RVV(jbeVar, customSpinnerWithTitle)); if (c12188etW.a != c2) { c12188etW.a = c2; customSpinnerWithTitle.setSelectionIndex(0); } if (!c0638Ld.b.isEmpty()) { aLt.b.removeAllViews(); if (c2) { LinearLayout linearLayout = aLt.b; String str = (String) C14881gav.d((List) c0638Ld.b); CustomBulletTextView customBulletTextView = new CustomBulletTextView(c12188etW.d); customBulletTextView.setText(str); linearLayout.addView(customBulletTextView); return; } ArrayList arrayList = new ArrayList(); arrayList.addAll(c0638Ld.b); ArrayList arrayList2 = arrayList; C14957gcv.e(arrayList2, ""); if (!arrayList2.isEmpty()) { C14957gcv.e(arrayList2, ""); arrayList2.remove(arrayList2.size() - 1); for (String str2 : arrayList) { LinearLayout linearLayout2 = aLt.b; CustomBulletTextView customBulletTextView2 = new CustomBulletTextView(c12188etW.d); customBulletTextView2.setText(str2); linearLayout2.addView(customBulletTextView2); } return; } throw new NoSuchElementException("List is empty."); } return; default: return; } } /* renamed from: o.etz$LWm */ /* loaded from: classes5.dex */ static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR { private C12217etz d; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(String str) { String str2 = str; C14957gcv.e(str2, ""); this.d.b.e(str2); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ LWm(C12217etz c12217etz) { super(1); this.d = c12217etz; } } /* renamed from: o.etz$Sts */ /* loaded from: classes5.dex */ static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR { private C12217etz c; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(WW ww) { WW ww2 = ww; C14957gcv.e(ww2, ""); this.c.b.c(ww2); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ Sts(C12217etz c12217etz) { super(1); this.c = c12217etz; } } /* renamed from: o.etz$RVV */ /* loaded from: classes5.dex */ static final class RVV extends AbstractC14961gcz implements InterfaceC14894gbR { private C12217etz a; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(WW ww) { WW ww2 = ww; C14957gcv.e(ww2, ""); this.a.b.c(ww2); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ RVV(C12217etz c12217etz) { super(1); this.a = c12217etz; } } /* renamed from: o.etz$ojQ */ /* loaded from: classes5.dex */ static final class ojQ extends AbstractC14961gcz implements InterfaceC14894gbR { private C12217etz b; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(KQ kq) { KQ kq2 = kq; C14957gcv.e(kq2, ""); this.b.b.c(kq2); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ ojQ(C12217etz c12217etz) { super(1); this.b = c12217etz; } } /* renamed from: o.etz$ZqN */ /* loaded from: classes5.dex */ static final class ZqN extends AbstractC14961gcz implements InterfaceC14894gbR { private C12217etz d; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(JO jo) { this.d.b.c(jo); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ ZqN(C12217etz c12217etz) { super(1); this.d = c12217etz; } } /* renamed from: o.etz$tOB */ /* loaded from: classes5.dex */ static final class tOB extends AbstractC14961gcz implements InterfaceC14894gbR { private C12217etz a; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(String str) { String str2 = str; C14957gcv.e(str2, ""); this.a.b.a(str2); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ tOB(C12217etz c12217etz) { super(1); this.a = c12217etz; } } /* renamed from: o.etz$saX */ /* loaded from: classes5.dex */ static final class saX extends AbstractC14961gcz implements InterfaceC14894gbR { private C12217etz e; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Boolean bool) { this.e.b.a(bool.booleanValue()); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ saX(C12217etz c12217etz) { super(1); this.e = c12217etz; } } /* renamed from: o.etz$jbe */ /* loaded from: classes5.dex */ static final class jbe extends AbstractC14961gcz implements InterfaceC14894gbR { private HBt d; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(String str) { String str2 = str; C14957gcv.e(str2, ""); this.d.c(str2); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ jbe(HBt hBt) { super(1); this.d = hBt; } } @Override // androidx.recyclerview.widget.RecyclerView.Sts public final int getItemCount() { return this.c.size(); } static { new IeS((byte) 0); } }