what-the-bank/sources/com/scb/phone/view/adapter/hml/HmlDocumentSubmissionAdapte...

428 lines
18 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
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.Unbinder;
import com.scb.phone.R;
import com.scb.phone.view.adapter.hml.HmlDocumentSubmissionAdapter;
import java.util.List;
import o.AbstractC0777Oj;
import o.C0775Oi;
import o.C0783Om;
import o.C0791Oq;
import o.C14851gaI;
import o.C14957gcv;
import o.EBL;
import o.EnumC5730bya;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class HmlDocumentSubmissionAdapter extends RecyclerView.Sts<RecyclerView.zJl> {
public List<? extends AbstractC0777Oj> a;
private final Sts d;
/* loaded from: classes5.dex */
public interface Sts {
void e(C0791Oq c0791Oq);
}
/* loaded from: classes5.dex */
public final class HmlDocumentCategoryViewHolder_ViewBinding implements Unbinder {
private HmlDocumentCategoryViewHolder c;
public HmlDocumentCategoryViewHolder_ViewBinding(HmlDocumentCategoryViewHolder hmlDocumentCategoryViewHolder, View view) {
this.c = hmlDocumentCategoryViewHolder;
hmlDocumentCategoryViewHolder.categoryType = (TextView) pyT.e(view, R.id.hml_document_category, "field 'categoryType'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
HmlDocumentCategoryViewHolder hmlDocumentCategoryViewHolder = this.c;
if (hmlDocumentCategoryViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
hmlDocumentCategoryViewHolder.categoryType = null;
}
}
/* loaded from: classes5.dex */
public final class HmlDocumentItemViewHolder_ViewBinding implements Unbinder {
private HmlDocumentItemViewHolder c;
public HmlDocumentItemViewHolder_ViewBinding(HmlDocumentItemViewHolder hmlDocumentItemViewHolder, View view) {
this.c = hmlDocumentItemViewHolder;
hmlDocumentItemViewHolder.docType = (TextView) pyT.e(view, R.id.hml_document_type, "field 'docType'", TextView.class);
hmlDocumentItemViewHolder.docNumber = (TextView) pyT.e(view, R.id.hml_document_number, "field 'docNumber'", TextView.class);
hmlDocumentItemViewHolder.docDetails = (TextView) pyT.e(view, R.id.hml_document_details, "field 'docDetails'", TextView.class);
hmlDocumentItemViewHolder.toSubmit = (ImageView) pyT.e(view, R.id.hml_document_image, "field 'toSubmit'", ImageView.class);
hmlDocumentItemViewHolder.statusImage = (ImageView) pyT.e(view, R.id.hml_document_status_image, "field 'statusImage'", ImageView.class);
}
@Override // butterknife.Unbinder
public final void a() {
HmlDocumentItemViewHolder hmlDocumentItemViewHolder = this.c;
if (hmlDocumentItemViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
hmlDocumentItemViewHolder.docType = null;
hmlDocumentItemViewHolder.docNumber = null;
hmlDocumentItemViewHolder.docDetails = null;
hmlDocumentItemViewHolder.toSubmit = null;
hmlDocumentItemViewHolder.statusImage = null;
}
}
public HmlDocumentSubmissionAdapter(Sts sts) {
C14957gcv.e(sts, "");
this.d = sts;
this.a = C14851gaI.c;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
if (i == EnumC5730bya.ITEM.ordinal()) {
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559982, viewGroup, false);
C14957gcv.c(inflate, "");
return new HmlDocumentItemViewHolder(this, inflate);
}
View inflate2 = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559981, viewGroup, false);
C14957gcv.c(inflate2, "");
return new HmlDocumentCategoryViewHolder(this, inflate2);
}
@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).e().ordinal();
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, int i) {
C14957gcv.e(zjl, "");
AbstractC0777Oj abstractC0777Oj = this.a.get(i);
int i2 = LWm.c[abstractC0777Oj.e().ordinal()];
TextView textView = null;
if (i2 == 1) {
C14957gcv.d(abstractC0777Oj, "");
C0783Om c0783Om = (C0783Om) abstractC0777Oj;
C14957gcv.e(c0783Om, "");
TextView textView2 = ((HmlDocumentCategoryViewHolder) zjl).categoryType;
if (textView2 != null) {
textView = textView2;
} else {
C14957gcv.a("");
}
textView.setText(c0783Om.a);
return;
}
if (i2 == 2) {
HmlDocumentItemViewHolder hmlDocumentItemViewHolder = (HmlDocumentItemViewHolder) zjl;
C14957gcv.d(abstractC0777Oj, "");
final C0775Oi c0775Oi = (C0775Oi) abstractC0777Oj;
final Sts sts = this.d;
C14957gcv.e(c0775Oi, "");
C14957gcv.e(sts, "");
TextView textView3 = hmlDocumentItemViewHolder.docType;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
HmlDocumentItemViewHolder.anm_(c0775Oi, textView3);
TextView textView4 = hmlDocumentItemViewHolder.docNumber;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
HmlDocumentItemViewHolder.ank_(c0775Oi, textView4);
ImageView imageView = hmlDocumentItemViewHolder.toSubmit;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
int i3 = HmlDocumentItemViewHolder.RVV.a[c0775Oi.d.ordinal()];
if (i3 == 1) {
Integer num = c0775Oi.i;
if (num != null) {
if (num.intValue() <= 0) {
ImageView imageView2 = hmlDocumentItemViewHolder.toSubmit;
if (imageView2 == null) {
C14957gcv.a("");
imageView2 = null;
}
imageView2.setVisibility(0);
imageView = hmlDocumentItemViewHolder.statusImage;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
imageView.setVisibility(8);
} else {
ImageView imageView3 = hmlDocumentItemViewHolder.statusImage;
if (imageView3 == null) {
C14957gcv.a("");
imageView3 = null;
}
imageView3.setImageResource(R.drawable.ic_uploaded);
ImageView imageView4 = hmlDocumentItemViewHolder.toSubmit;
if (imageView4 == null) {
C14957gcv.a("");
imageView4 = null;
}
imageView4.setVisibility(8);
ImageView imageView5 = hmlDocumentItemViewHolder.statusImage;
if (imageView5 == null) {
C14957gcv.a("");
imageView5 = null;
}
imageView5.setVisibility(0);
}
}
} else if (i3 == 2) {
ImageView imageView6 = hmlDocumentItemViewHolder.statusImage;
if (imageView6 == null) {
C14957gcv.a("");
imageView6 = null;
}
imageView6.setImageResource(R.drawable.ic_uploaded);
ImageView imageView7 = hmlDocumentItemViewHolder.toSubmit;
if (imageView7 == null) {
C14957gcv.a("");
imageView7 = null;
}
imageView7.setVisibility(8);
ImageView imageView8 = hmlDocumentItemViewHolder.statusImage;
if (imageView8 == null) {
C14957gcv.a("");
imageView8 = null;
}
imageView8.setVisibility(0);
} else {
if (i3 == 3) {
Integer num2 = c0775Oi.g;
if (num2 != null) {
if (c0775Oi.f >= num2.intValue()) {
ImageView imageView9 = hmlDocumentItemViewHolder.statusImage;
if (imageView9 == null) {
C14957gcv.a("");
imageView9 = null;
}
imageView9.setImageResource(R.drawable.ic_reuploaded);
ImageView imageView10 = hmlDocumentItemViewHolder.toSubmit;
if (imageView10 == null) {
C14957gcv.a("");
imageView10 = null;
}
imageView10.setVisibility(8);
ImageView imageView11 = hmlDocumentItemViewHolder.statusImage;
if (imageView11 == null) {
C14957gcv.a("");
imageView11 = null;
}
imageView11.setVisibility(0);
TextView textView5 = hmlDocumentItemViewHolder.docNumber;
if (textView5 == null) {
C14957gcv.a("");
textView5 = null;
}
TextView textView6 = hmlDocumentItemViewHolder.docNumber;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
textView5.setTextColor(nMh.getColor(textView6.getContext(), R.color.f3432131099851));
} else {
ImageView imageView12 = hmlDocumentItemViewHolder.statusImage;
if (imageView12 == null) {
C14957gcv.a("");
imageView12 = null;
}
imageView12.setImageResource(R.drawable.ic_reupload_pending);
ImageView imageView13 = hmlDocumentItemViewHolder.toSubmit;
if (imageView13 == null) {
C14957gcv.a("");
imageView13 = null;
}
imageView13.setVisibility(8);
ImageView imageView14 = hmlDocumentItemViewHolder.statusImage;
if (imageView14 == null) {
C14957gcv.a("");
imageView14 = null;
}
imageView14.setVisibility(0);
TextView textView7 = hmlDocumentItemViewHolder.docNumber;
if (textView7 == null) {
C14957gcv.a("");
textView7 = null;
}
TextView textView8 = hmlDocumentItemViewHolder.docNumber;
if (textView8 == null) {
C14957gcv.a("");
textView8 = null;
}
textView7.setTextColor(nMh.getColor(textView8.getContext(), R.color.f3462131099854));
TextView textView9 = hmlDocumentItemViewHolder.docNumber;
if (textView9 == null) {
C14957gcv.a("");
textView9 = null;
}
TextView textView10 = hmlDocumentItemViewHolder.docNumber;
if (textView10 == null) {
C14957gcv.a("");
textView10 = null;
}
textView9.setText(textView10.getContext().getString(R.string.hml_document_resubmit_files));
}
}
}
imageView.setVisibility(8);
}
TextView textView11 = hmlDocumentItemViewHolder.docDetails;
if (textView11 != null) {
textView = textView11;
} else {
C14957gcv.a("");
}
HmlDocumentItemViewHolder.anl_(c0775Oi, textView);
hmlDocumentItemViewHolder.itemView.setOnClickListener(new View.OnClickListener(sts, c0775Oi) { // from class: o.euM
private HmlDocumentSubmissionAdapter.Sts a;
private C0775Oi c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlDocumentSubmissionAdapter.HmlDocumentItemViewHolder.d(this.a, this.c);
}
{
this.a = sts;
this.c = c0775Oi;
}
});
}
}
/* loaded from: classes5.dex */
public final class HmlDocumentItemViewHolder extends RecyclerView.zJl {
@BindView
public TextView docDetails;
@BindView
public TextView docNumber;
@BindView
public TextView docType;
private HmlDocumentSubmissionAdapter e;
@BindView
public ImageView statusImage;
@BindView
public ImageView toSubmit;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public HmlDocumentItemViewHolder(HmlDocumentSubmissionAdapter hmlDocumentSubmissionAdapter, View view) {
super(view);
C14957gcv.e(view, "");
this.e = hmlDocumentSubmissionAdapter;
ButterKnife.c(this, view);
}
public static /* synthetic */ void d(Sts sts, C0775Oi c0775Oi) {
C14957gcv.e(sts, "");
C14957gcv.e(c0775Oi, "");
sts.e(new C0791Oq(c0775Oi.d, c0775Oi.c, c0775Oi.e, c0775Oi.a));
}
static void ank_(C0775Oi c0775Oi, TextView textView) {
Integer num = c0775Oi.i;
textView.setText(textView.getContext().getString(R.string.hml_document_uploaded_files, num));
if (num != null && num.intValue() == 0) {
textView.setTextColor(nMh.getColor(textView.getContext(), R.color.f3092131099816));
} else {
textView.setTextColor(nMh.getColor(textView.getContext(), R.color.f3432131099851));
}
}
static void anl_(C0775Oi c0775Oi, TextView textView) {
if (c0775Oi.b != null) {
textView.setText(c0775Oi.b);
textView.setVisibility(0);
}
}
static void anm_(C0775Oi c0775Oi, TextView textView) {
textView.setText(c0775Oi.a);
}
/* loaded from: classes5.dex */
public final /* synthetic */ class RVV {
public static final int[] a;
static {
int[] iArr = new int[EBL.values().length];
try {
iArr[EBL.INITIAL.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[EBL.SUBMITTED.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[EBL.RESUBMIT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
a = iArr;
}
}
}
/* loaded from: classes5.dex */
public final class HmlDocumentCategoryViewHolder extends RecyclerView.zJl {
@BindView
public TextView categoryType;
private HmlDocumentSubmissionAdapter d;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public HmlDocumentCategoryViewHolder(HmlDocumentSubmissionAdapter hmlDocumentSubmissionAdapter, View view) {
super(view);
C14957gcv.e(view, "");
this.d = hmlDocumentSubmissionAdapter;
ButterKnife.c(this, view);
}
}
/* loaded from: classes5.dex */
public final /* synthetic */ class LWm {
public static final int[] c;
static {
int[] iArr = new int[EnumC5730bya.values().length];
try {
iArr[EnumC5730bya.CATEGORY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[EnumC5730bya.ITEM.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
c = iArr;
}
}
}