what-the-bank/sources/o/C12105ert.java

251 lines
10 KiB
Java

package o;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
/* renamed from: o.ert, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12105ert extends RecyclerView.Sts<RecyclerView.zJl> {
public C0430Gj b;
public InterfaceViewOnClickListenerC9005dbZ c;
public InterfaceC10303eAL e;
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemViewType(int i) {
return i;
}
/* renamed from: o.ert$Sts */
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
Context context = viewGroup.getContext();
if (i != 0) {
int itemCount = getItemCount();
Integer num = SDK.d;
C14957gcv.c(num, "");
if (i != itemCount - num.intValue()) {
if (i != getItemCount() - 1) {
FCf QY_ = FCf.QY_(LayoutInflater.from(context), viewGroup);
C14957gcv.c(QY_, "");
return new C12062erC(QY_);
}
C11146eZo a = C11146eZo.a(LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560131, viewGroup, false));
C14957gcv.c(a, "");
return new C12063erD(a);
}
Vep b = Vep.b(LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560085, viewGroup, false));
C14957gcv.c(b, "");
return new C12064erE(b);
}
C17327voA a2 = C17327voA.a(LayoutInflater.from(context).inflate(com.scb.phone.R.layout.2131560083, viewGroup, false));
C14957gcv.c(a2, "");
return new C12111erz(a2);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
C0430Gj c0430Gj = this.b;
if (c0430Gj == null) {
C14957gcv.a("");
c0430Gj = null;
}
List<C0449Gu> list = c0430Gj.j;
if (list != null) {
return list.size() + 3;
}
return 0;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, int i) {
String str;
String str2;
C14957gcv.e(zjl, "");
InterfaceViewOnClickListenerC9005dbZ interfaceViewOnClickListenerC9005dbZ = null;
C0430Gj c0430Gj = null;
C0430Gj c0430Gj2 = null;
if (!(zjl instanceof C12111erz)) {
if (!(zjl instanceof C12064erE)) {
if (!(zjl instanceof C12062erC)) {
if (zjl instanceof C12063erD) {
C12063erD c12063erD = (C12063erD) zjl;
InterfaceC10303eAL interfaceC10303eAL = this.e;
if (interfaceC10303eAL == null) {
C14957gcv.a("");
interfaceC10303eAL = null;
}
InterfaceViewOnClickListenerC9005dbZ interfaceViewOnClickListenerC9005dbZ2 = this.c;
if (interfaceViewOnClickListenerC9005dbZ2 == null) {
C14957gcv.a("");
} else {
interfaceViewOnClickListenerC9005dbZ = interfaceViewOnClickListenerC9005dbZ2;
}
C14957gcv.e(interfaceC10303eAL, "");
C14957gcv.e(interfaceViewOnClickListenerC9005dbZ, "");
final C11146eZo c11146eZo = c12063erD.b;
c11146eZo.a.setTermsAndConditionsListener(interfaceC10303eAL);
c11146eZo.e.setEnabled(c11146eZo.a.termsCheckBox.isChecked());
c11146eZo.a.setTermsCheckboxListener(new eAO(c11146eZo) { // from class: o.erG
private C11146eZo c;
@Override // o.eAO
public final void c(boolean z) {
C12063erD.a(this.c);
}
{
this.c = c11146eZo;
}
});
c11146eZo.e.setOnClickListener(interfaceViewOnClickListenerC9005dbZ);
return;
}
return;
}
C0430Gj c0430Gj3 = this.b;
if (c0430Gj3 == null) {
C14957gcv.a("");
c0430Gj3 = null;
}
List<C0449Gu> list = c0430Gj3.j;
C12062erC c12062erC = (C12062erC) zjl;
C0449Gu c0449Gu = list != null ? list.get(i - 1) : null;
FCf fCf = c12062erC.a;
TextView textView = fCf.d;
c12062erC.itemView.getResources();
textView.setMaxLines(2);
String str3 = c0449Gu != null ? c0449Gu.a : null;
if (str3 == null) {
str3 = "";
}
textView.setText(str3);
TextView textView2 = fCf.b;
String str4 = c0449Gu != null ? c0449Gu.b : null;
textView2.setText(str4 != null ? str4 : "");
return;
}
C12064erE c12064erE = (C12064erE) zjl;
C0430Gj c0430Gj4 = this.b;
if (c0430Gj4 == null) {
C14957gcv.a("");
} else {
c0430Gj2 = c0430Gj4;
}
C14957gcv.e(c0430Gj2, "");
Vep vep = c12064erE.c;
vep.e.setText(c0430Gj2.b);
if (c0430Gj2.g) {
TextView textView3 = vep.b;
String str5 = c0430Gj2.y;
if (str5 != null) {
StringBuilder sb = new StringBuilder();
sb.append(str5);
sb.append("%");
str2 = sb.toString();
} else {
str2 = "";
}
textView3.setText(str2);
vep.a.setText(vep.a.getContext().getString(com.scb.phone.R.string.yearly_interest_rate_label));
LinearLayout linearLayout = vep.h;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(8);
} else {
TextView textView4 = vep.b;
String str6 = c0430Gj2.n;
if (str6 != null) {
StringBuilder sb2 = new StringBuilder();
sb2.append(str6);
sb2.append("%");
str = sb2.toString();
} else {
str = "";
}
textView4.setText(str);
vep.a.setText(vep.a.getContext().getString(com.scb.phone.R.string.monthly_interest_rate_label));
LinearLayout linearLayout3 = vep.h;
C14957gcv.c(linearLayout3, "");
LinearLayout linearLayout4 = linearLayout3;
C14957gcv.e(linearLayout4, "");
linearLayout4.setVisibility(0);
TextView textView5 = vep.m;
String str7 = (String) C6583cXR.c(new Object[]{Double.valueOf(c0430Gj2.k)}, -150997759, 150997764, (int) System.currentTimeMillis());
C14957gcv.c((Object) str7, "");
textView5.setText(str7);
}
vep.f8422o.setText(c0430Gj2.t);
vep.k.setText(c0430Gj2.l);
vep.n.setText(c0430Gj2.p);
String str8 = c0430Gj2.s;
if ((str8 == null || gdZ.d((CharSequence) str8)) ^ true) {
ConstraintLayout constraintLayout = vep.d;
C14957gcv.c(constraintLayout, "");
ConstraintLayout constraintLayout2 = constraintLayout;
C14957gcv.e(constraintLayout2, "");
constraintLayout2.setVisibility(0);
vep.j.setText(c0430Gj2.s);
if (c0430Gj2.i) {
vep.g.setText(vep.g.getContext().getString(com.scb.phone.R.string.new_deejung_installment_email_notification_message));
return;
} else {
vep.g.setText(vep.g.getContext().getString(com.scb.phone.R.string.deejung_installment_email_notification_message));
return;
}
}
ConstraintLayout constraintLayout3 = vep.d;
C14957gcv.c(constraintLayout3, "");
ConstraintLayout constraintLayout4 = constraintLayout3;
C14957gcv.e(constraintLayout4, "");
constraintLayout4.setVisibility(8);
return;
}
C12111erz c12111erz = (C12111erz) zjl;
C0430Gj c0430Gj5 = this.b;
if (c0430Gj5 == null) {
C14957gcv.a("");
} else {
c0430Gj = c0430Gj5;
}
C14957gcv.e(c0430Gj, "");
C17327voA c17327voA = c12111erz.d;
c17327voA.b.e.setText(c0430Gj.f8183o);
c17327voA.b.c.setText(c0430Gj.f);
ImageView imageView = c17327voA.b.d;
C14957gcv.c(imageView, "");
String str9 = c0430Gj.c;
if (str9 == null) {
str9 = "";
}
C12111erz.amU_(imageView, str9);
TextView textView6 = c17327voA.d;
String str10 = (String) C6583cXR.c(new Object[]{Double.valueOf(c0430Gj.q)}, -150997759, 150997764, (int) System.currentTimeMillis());
C14957gcv.c((Object) str10, "");
textView6.setText(str10);
}
static {
new Sts((byte) 0);
}
}