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

187 lines
6.7 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.squareup.picasso.Picasso;
import java.util.List;
import o.AbstractC0734Nh;
import o.C0742Nn;
import o.C0744No;
import o.C13020fOa;
import o.C14957gcv;
import o.pyT;
/* loaded from: classes5.dex */
public final class HmlDocumentsUploadedAdapter extends RecyclerView.Sts<RecyclerView.zJl> {
private final List<AbstractC0734Nh> b;
/* loaded from: classes5.dex */
public final class GroupTitleViewHolder_ViewBinding implements Unbinder {
private GroupTitleViewHolder d;
public GroupTitleViewHolder_ViewBinding(GroupTitleViewHolder groupTitleViewHolder, View view) {
this.d = groupTitleViewHolder;
groupTitleViewHolder.title = (TextView) pyT.e(view, R.id.tv_group_title, "field 'title'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
GroupTitleViewHolder groupTitleViewHolder = this.d;
if (groupTitleViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
groupTitleViewHolder.title = null;
}
}
/* loaded from: classes5.dex */
public final class DocumentViewHolder_ViewBinding implements Unbinder {
private DocumentViewHolder d;
public DocumentViewHolder_ViewBinding(DocumentViewHolder documentViewHolder, View view) {
this.d = documentViewHolder;
documentViewHolder.icon = (ImageView) pyT.e(view, R.id.iv_document_icon, "field 'icon'", ImageView.class);
documentViewHolder.title = (TextView) pyT.e(view, R.id.tv_document_title, "field 'title'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
DocumentViewHolder documentViewHolder = this.d;
if (documentViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
documentViewHolder.icon = null;
documentViewHolder.title = null;
}
}
/* JADX WARN: Multi-variable type inference failed */
public HmlDocumentsUploadedAdapter(List<? extends AbstractC0734Nh> list) {
C14957gcv.e(list, "");
this.b = list;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
LayoutInflater from = LayoutInflater.from(viewGroup.getContext());
if (i == 1) {
View inflate = from.inflate(R.layout.2131560042, viewGroup, false);
C14957gcv.c(inflate, "");
return new GroupTitleViewHolder(inflate);
}
View inflate2 = from.inflate(R.layout.2131559995, viewGroup, false);
C14957gcv.c(inflate2, "");
return new DocumentViewHolder(inflate2);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemViewType(int i) {
return this.b.get(i) instanceof C0744No ? 1 : 2;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.b.size();
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, int i) {
String str;
C14957gcv.e(zjl, "");
TextView textView = null;
if (!(zjl instanceof GroupTitleViewHolder)) {
if (zjl instanceof DocumentViewHolder) {
DocumentViewHolder documentViewHolder = (DocumentViewHolder) zjl;
AbstractC0734Nh abstractC0734Nh = this.b.get(i);
C14957gcv.d(abstractC0734Nh, "");
C0742Nn c0742Nn = (C0742Nn) abstractC0734Nh;
C14957gcv.e(c0742Nn, "");
C13020fOa e = Picasso.d().e(c0742Nn.c);
ImageView imageView = documentViewHolder.icon;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
e.aBu_(imageView, null);
TextView textView2 = documentViewHolder.title;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
if (c0742Nn.a.length() > 0) {
String str2 = c0742Nn.b;
TextView textView3 = documentViewHolder.title;
if (textView3 != null) {
textView = textView3;
} else {
C14957gcv.a("");
}
String string = textView.getContext().getString(R.string.hml_document_guidelines_extra, c0742Nn.a);
StringBuilder sb = new StringBuilder();
sb.append(str2);
sb.append(string);
str = sb.toString();
} else {
str = c0742Nn.b;
}
textView2.setText(str);
return;
}
return;
}
AbstractC0734Nh abstractC0734Nh2 = this.b.get(i);
C14957gcv.d(abstractC0734Nh2, "");
C0744No c0744No = (C0744No) abstractC0734Nh2;
C14957gcv.e(c0744No, "");
TextView textView4 = ((GroupTitleViewHolder) zjl).title;
if (textView4 != null) {
textView = textView4;
} else {
C14957gcv.a("");
}
textView.setText(c0744No.b);
}
/* loaded from: classes5.dex */
public static final class DocumentViewHolder extends RecyclerView.zJl {
@BindView
public ImageView icon;
@BindView
public TextView title;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DocumentViewHolder(View view) {
super(view);
C14957gcv.e(view, "");
ButterKnife.c(this, view);
}
}
/* loaded from: classes5.dex */
public static final class GroupTitleViewHolder extends RecyclerView.zJl {
@BindView
public TextView title;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public GroupTitleViewHolder(View view) {
super(view);
C14957gcv.e(view, "");
ButterKnife.c(this, view);
}
}
}