package o; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.recyclerview.widget.RecyclerView; import com.scb.phone.view.adapter.ccrredemption.product.PaginationViewFooterHolder; /* renamed from: o.esc, reason: case insensitive filesystem */ /* loaded from: classes5.dex */ public abstract class AbstractC12141esc extends RecyclerView.Sts { private PaginationViewFooterHolder e; public View.OnClickListener g; public boolean a = false; public EnumC12146esh i = EnumC12146esh.UNKNOWN; protected abstract RecyclerView.zJl amY_(ViewGroup viewGroup); protected abstract int d(); @Override // androidx.recyclerview.widget.RecyclerView.Sts public RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) { if (i == 1) { this.e = new PaginationViewFooterHolder(LayoutInflater.from(viewGroup.getContext()).inflate(com.scb.phone.R.layout.2131560235, viewGroup, false)); e(); return this.e; } return amY_(viewGroup); } @Override // androidx.recyclerview.widget.RecyclerView.Sts public int getItemCount() { int d = d(); return this.a ? d + 1 : d; } @Override // androidx.recyclerview.widget.RecyclerView.Sts public int getItemViewType(int i) { return i == d() ? 1 : 0; } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.esc$1, reason: invalid class name */ /* loaded from: classes5.dex */ public static /* synthetic */ class AnonymousClass1 { static final int[] c; static { int[] iArr = new int[EnumC12146esh.values().length]; c = iArr; try { iArr[EnumC12146esh.SHOWING_LOADER.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { c[EnumC12146esh.SHOWING_ERROR.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { c[EnumC12146esh.HIDDEN_ERROR.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { c[EnumC12146esh.HIDDEN_LOADER.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } try { c[EnumC12146esh.UNKNOWN.ordinal()] = 5; } catch (NoSuchFieldError unused5) { } } } public final void e() { if (this.e != null) { int i = AnonymousClass1.c[this.i.ordinal()]; if (i == 1) { PaginationViewFooterHolder paginationViewFooterHolder = this.e; paginationViewFooterHolder.paginationStatusView.setVisibility(0); paginationViewFooterHolder.inlineLoader.setVisibility(0); return; } if (i == 2) { PaginationViewFooterHolder paginationViewFooterHolder2 = this.e; View.OnClickListener onClickListener = this.g; paginationViewFooterHolder2.paginationStatusView.setVisibility(0); paginationViewFooterHolder2.tapToRetryView.setVisibility(0); paginationViewFooterHolder2.tapToRetryView.setOnClickListener(onClickListener); return; } if (i == 3) { PaginationViewFooterHolder paginationViewFooterHolder3 = this.e; paginationViewFooterHolder3.paginationStatusView.setVisibility(8); paginationViewFooterHolder3.tapToRetryView.setVisibility(8); } else if (i != 4) { if (i == 5) { this.e = null; } } else { PaginationViewFooterHolder paginationViewFooterHolder4 = this.e; paginationViewFooterHolder4.paginationStatusView.setVisibility(8); paginationViewFooterHolder4.inlineLoader.setVisibility(8); } } } }