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

189 lines
9.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.scb.phone.view.custom.common.ImageViewCropStart;
import com.squareup.picasso.Picasso;
import java.util.List;
import o.C12529ezt;
/* renamed from: o.ezt, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12529ezt extends WYJ {
public int a;
public RVV b;
public int c;
private final List<C0367Fb> d;
private final Context e;
private int h;
/* renamed from: o.ezt$RVV */
/* loaded from: classes5.dex */
public interface RVV {
void c(C0367Fb c0367Fb, int i);
}
/* JADX WARN: Multi-variable type inference failed */
public C12529ezt(Context context, List<? extends C0367Fb> list) {
C14957gcv.e(context, "");
this.e = context;
this.d = list;
this.h = com.scb.phone.R.drawable.rounded_purple_view_pager;
this.c = com.scb.phone.R.drawable.bg_white_rounded;
}
@Override // o.WYJ
public final boolean isViewFromObject(View view, Object obj) {
C14957gcv.e(view, "");
C14957gcv.e(obj, "");
return C14957gcv.b(view, obj);
}
@Override // o.WYJ
public final int getCount() {
List<C0367Fb> list = this.d;
if (list != null) {
return list.size();
}
return 0;
}
@Override // o.WYJ
public final void destroyItem(ViewGroup viewGroup, int i, Object obj) {
C14957gcv.e(viewGroup, "");
C14957gcv.e(obj, "");
if (obj instanceof View) {
viewGroup.removeView((View) obj);
}
}
@Override // o.WYJ
public final Object instantiateItem(ViewGroup viewGroup, final int i) {
C14957gcv.e(viewGroup, "");
List<C0367Fb> list = this.d;
final C0367Fb c0367Fb = list != null ? list.get(i) : null;
View inflate = LayoutInflater.from(this.e).inflate(com.scb.phone.R.layout.2131559078, viewGroup, false);
int i2 = com.scb.phone.R.id.card_container;
ConstraintLayout constraintLayout = (ConstraintLayout) qeC.e(inflate, com.scb.phone.R.id.card_container);
if (constraintLayout != null) {
i2 = com.scb.phone.R.id.credit_card_dots_linear_layout;
LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, com.scb.phone.R.id.credit_card_dots_linear_layout);
if (linearLayout != null) {
i2 = com.scb.phone.R.id.image_card_art;
ImageViewCropStart imageViewCropStart = (ImageViewCropStart) qeC.e(inflate, com.scb.phone.R.id.image_card_art);
if (imageViewCropStart != null) {
i2 = com.scb.phone.R.id.layout_card;
RelativeLayout relativeLayout = (RelativeLayout) qeC.e(inflate, com.scb.phone.R.id.layout_card);
if (relativeLayout != null) {
i2 = com.scb.phone.R.id.tv_card_available_credit;
AppCompatTextView appCompatTextView = (AppCompatTextView) qeC.e(inflate, com.scb.phone.R.id.tv_card_available_credit);
if (appCompatTextView != null) {
i2 = com.scb.phone.R.id.tv_card_available_label;
TextView textView = (TextView) qeC.e(inflate, com.scb.phone.R.id.tv_card_available_label);
if (textView != null) {
i2 = com.scb.phone.R.id.tv_card_last_number;
TextView textView2 = (TextView) qeC.e(inflate, com.scb.phone.R.id.tv_card_last_number);
if (textView2 != null) {
i2 = com.scb.phone.R.id.tv_card_reference_name;
TextView textView3 = (TextView) qeC.e(inflate, com.scb.phone.R.id.tv_card_reference_name);
if (textView3 != null) {
tuh tuhVar = new tuh((RelativeLayout) inflate, constraintLayout, linearLayout, imageViewCropStart, relativeLayout, appCompatTextView, textView, textView2, textView3);
C14957gcv.c(tuhVar, "");
LWm lWm = new LWm(this, tuhVar);
if (this.a == i) {
lWm.d.a.setBackground(nMh.getDrawable(this.e, this.h));
lWm.d.f.setTextColor(nMh.getColor(this.e, com.scb.phone.R.color.f2982131099805));
} else {
lWm.d.a.setBackground(nMh.getDrawable(this.e, this.c));
lWm.d.f.setTextColor(nMh.getColor(this.e, com.scb.phone.R.color.f3092131099816));
}
tuh tuhVar2 = lWm.d;
C12529ezt c12529ezt = lWm.c;
if (c0367Fb != null) {
tuhVar2.b.setText(c0367Fb.d);
tuhVar2.f.setText(c0367Fb.S);
tuhVar2.c.setText(c0367Fb.r);
} else {
tuhVar2.b.setText((CharSequence) null);
tuhVar2.f.setText((CharSequence) null);
tuhVar2.c.setText((CharSequence) null);
}
String str = c0367Fb != null ? c0367Fb.p : null;
if (str == null) {
str = "";
}
ImageViewCropStart imageViewCropStart2 = tuhVar2.d;
C14957gcv.c(imageViewCropStart2, "");
LWm.anT_(str, imageViewCropStart2);
tuhVar2.f.setTag("TAG_ACCOUNT_SOURCE_ADAPTER_TEXT".concat(String.valueOf(i)));
tuhVar2.a.setTag("TAG_ACCOUNT_SOURCE_ADAPTER".concat(String.valueOf(i)));
final RVV rvv = c12529ezt.b;
if (rvv != null) {
tuhVar2.e.setOnClickListener(new View.OnClickListener(rvv, c0367Fb, i) { // from class: o.ezs
private C0367Fb b;
private C12529ezt.RVV d;
private int e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
C12529ezt.LWm.d(this.d, this.b, this.e);
}
{
this.d = rvv;
this.b = c0367Fb;
this.e = i;
}
});
}
viewGroup.addView(lWm.d.e, 0);
RelativeLayout relativeLayout2 = lWm.d.e;
C14957gcv.c(relativeLayout2, "");
return relativeLayout2;
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i2)));
}
/* renamed from: o.ezt$LWm */
/* loaded from: classes5.dex */
public final class LWm extends RecyclerView.zJl {
final C12529ezt c;
final tuh d;
static void anT_(String str, ImageView imageView) {
C13020fOa a = Picasso.d().e(str).e(com.scb.phone.R.drawable.default_card_without_logo).b(com.scb.phone.R.drawable.default_card).a(EnumC12984fNP.NO_STORE, new EnumC12984fNP[0]);
a.e = true;
a.aBu_(imageView, null);
}
public static /* synthetic */ void d(RVV rvv, C0367Fb c0367Fb, int i) {
C14957gcv.e(rvv, "");
rvv.c(c0367Fb, i);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LWm(C12529ezt c12529ezt, tuh tuhVar) {
super(tuhVar.e);
C14957gcv.e(tuhVar, "");
this.c = c12529ezt;
this.d = tuhVar;
}
}
}