what-the-bank/sources/com/scb/phone/view/adapter/debitatm/DebitCardEComLimitAdapter.java

481 lines
19 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.adapter.debitatm;
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.debitatm.DebitCardEComLimitAdapter;
import com.scb.phone.view.custom.common.CustomDeltaInput;
import java.util.ArrayList;
import java.util.List;
import o.C0917Rn;
import o.C14957gcv;
import o.C6583cXR;
import o.InterfaceC12845fIt;
import o.YH;
import o.ZUN;
import o.fJM;
import o.nMh;
import o.pyT;
/* loaded from: classes5.dex */
public final class DebitCardEComLimitAdapter extends RecyclerView.Sts<LimitCustomViewHolder> {
public List<C0917Rn> b = new ArrayList();
public InterfaceC12845fIt c;
public RVV d;
public LimitCustomViewHolder e;
/* loaded from: classes5.dex */
public interface RVV {
void h();
}
/* loaded from: classes5.dex */
public final class LimitCustomViewHolder_ViewBinding implements Unbinder {
private LimitCustomViewHolder b;
public LimitCustomViewHolder_ViewBinding(LimitCustomViewHolder limitCustomViewHolder, View view) {
this.b = limitCustomViewHolder;
limitCustomViewHolder.tvAccount = (TextView) pyT.e(view, R.id.account_title, "field 'tvAccount'", TextView.class);
limitCustomViewHolder.tvLimitAccount = (TextView) pyT.e(view, R.id.limit_account_value, "field 'tvLimitAccount'", TextView.class);
limitCustomViewHolder.ivLimitExpandArrow = (ImageView) pyT.e(view, R.id.limit_expand_arrow, "field 'ivLimitExpandArrow'", ImageView.class);
limitCustomViewHolder.tvLimitDone = (TextView) pyT.e(view, R.id.limit_done, "field 'tvLimitDone'", TextView.class);
limitCustomViewHolder.limitInput = (CustomDeltaInput) pyT.e(view, R.id.account_set_limit, "field 'limitInput'", CustomDeltaInput.class);
}
@Override // butterknife.Unbinder
public final void a() {
LimitCustomViewHolder limitCustomViewHolder = this.b;
if (limitCustomViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = null;
limitCustomViewHolder.tvAccount = null;
limitCustomViewHolder.tvLimitAccount = null;
limitCustomViewHolder.ivLimitExpandArrow = null;
limitCustomViewHolder.tvLimitDone = null;
limitCustomViewHolder.limitInput = null;
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ void onBindViewHolder(LimitCustomViewHolder limitCustomViewHolder, int i) {
final LimitCustomViewHolder limitCustomViewHolder2 = limitCustomViewHolder;
C14957gcv.e(limitCustomViewHolder2, "");
final C0917Rn c0917Rn = this.b.get(i);
this.e = limitCustomViewHolder2;
C14957gcv.e(c0917Rn, "");
TextView textView = limitCustomViewHolder2.tvAccount;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0917Rn.b);
Integer num = c0917Rn.c;
if (num != null) {
int intValue = num.intValue();
TextView textView3 = limitCustomViewHolder2.tvLimitAccount;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
double d = intValue;
textView3.setText(C6583cXR.b(d));
limitCustomViewHolder2.itemView.setOnClickListener(new View.OnClickListener(limitCustomViewHolder2) { // from class: o.esz
private DebitCardEComLimitAdapter.LimitCustomViewHolder c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
DebitCardEComLimitAdapter.LimitCustomViewHolder.c(this.c);
}
{
this.c = limitCustomViewHolder2;
}
});
CustomDeltaInput customDeltaInput = limitCustomViewHolder2.limitInput;
if (customDeltaInput == null) {
C14957gcv.a("");
customDeltaInput = null;
}
customDeltaInput.setMinValue(0.0d);
Integer num2 = c0917Rn.h;
if (num2 != null) {
int intValue2 = num2.intValue();
CustomDeltaInput customDeltaInput2 = limitCustomViewHolder2.limitInput;
if (customDeltaInput2 == null) {
C14957gcv.a("");
customDeltaInput2 = null;
}
customDeltaInput2.setMaxValue(intValue2);
}
CustomDeltaInput customDeltaInput3 = limitCustomViewHolder2.limitInput;
if (customDeltaInput3 == null) {
C14957gcv.a("");
customDeltaInput3 = null;
}
customDeltaInput3.setErrorMessage(limitCustomViewHolder2.itemView.getContext().getString(R.string.fastpay_setting_range_limit_error_message));
customDeltaInput3.setDelta(1000.0d);
customDeltaInput3.setActualValue(d);
customDeltaInput3.setOnValueChangedListener(new CustomDeltaInput.HBt(limitCustomViewHolder2) { // from class: o.esD
private DebitCardEComLimitAdapter.LimitCustomViewHolder c;
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.HBt
public final void c(double d2, boolean z) {
DebitCardEComLimitAdapter.LimitCustomViewHolder.e(this.c, z);
}
{
this.c = limitCustomViewHolder2;
}
});
}
CustomDeltaInput customDeltaInput4 = limitCustomViewHolder2.limitInput;
if (customDeltaInput4 == null) {
C14957gcv.a("");
customDeltaInput4 = null;
}
customDeltaInput4.setOnIncrementChangeListener(new LimitCustomViewHolder.Sts(limitCustomViewHolder2));
CustomDeltaInput customDeltaInput5 = limitCustomViewHolder2.limitInput;
if (customDeltaInput5 == null) {
C14957gcv.a("");
customDeltaInput5 = null;
}
customDeltaInput5.setOnFocusLostListener(new View.OnFocusChangeListener(limitCustomViewHolder2) { // from class: o.esA
private DebitCardEComLimitAdapter.LimitCustomViewHolder b;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
DebitCardEComLimitAdapter.LimitCustomViewHolder.d(this.b, z);
}
{
this.b = limitCustomViewHolder2;
}
});
CustomDeltaInput customDeltaInput6 = limitCustomViewHolder2.limitInput;
if (customDeltaInput6 == null) {
C14957gcv.a("");
customDeltaInput6 = null;
}
customDeltaInput6.a();
TextView textView4 = limitCustomViewHolder2.tvLimitDone;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
final DebitCardEComLimitAdapter debitCardEComLimitAdapter = limitCustomViewHolder2.a;
textView4.setOnClickListener(new View.OnClickListener(limitCustomViewHolder2, c0917Rn, debitCardEComLimitAdapter) { // from class: o.esE
private C0917Rn a;
private DebitCardEComLimitAdapter.LimitCustomViewHolder c;
private DebitCardEComLimitAdapter d;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
DebitCardEComLimitAdapter.LimitCustomViewHolder.d(this.c, this.a, this.d);
}
{
this.c = limitCustomViewHolder2;
this.a = c0917Rn;
this.d = debitCardEComLimitAdapter;
}
});
CustomDeltaInput customDeltaInput7 = limitCustomViewHolder2.limitInput;
if (customDeltaInput7 == null) {
C14957gcv.a("");
customDeltaInput7 = null;
}
customDeltaInput7.c();
CustomDeltaInput customDeltaInput8 = limitCustomViewHolder2.limitInput;
if (customDeltaInput8 == null) {
C14957gcv.a("");
customDeltaInput8 = null;
}
customDeltaInput8.setContentDescriptionView(YH.E_COMMERCE.name());
TextView textView5 = limitCustomViewHolder2.tvLimitDone;
if (textView5 == null) {
C14957gcv.a("");
textView5 = null;
}
textView5.setContentDescription(YH.E_COMMERCE.name());
TextView textView6 = limitCustomViewHolder2.tvAccount;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
textView6.setContentDescription(YH.E_COMMERCE.name());
TextView textView7 = limitCustomViewHolder2.tvLimitAccount;
if (textView7 != null) {
textView2 = textView7;
} else {
C14957gcv.a("");
}
textView2.setContentDescription(YH.E_COMMERCE.name());
limitCustomViewHolder2.d(false);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final /* synthetic */ LimitCustomViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559096, (ViewGroup) null);
C14957gcv.c(inflate, "");
return new LimitCustomViewHolder(this, inflate);
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.b.size();
}
/* loaded from: classes5.dex */
public final class LimitCustomViewHolder extends RecyclerView.zJl {
final DebitCardEComLimitAdapter a;
private boolean b;
@BindView
public ImageView ivLimitExpandArrow;
@BindView
public CustomDeltaInput limitInput;
@BindView
public TextView tvAccount;
@BindView
public TextView tvLimitAccount;
@BindView
public TextView tvLimitDone;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LimitCustomViewHolder(DebitCardEComLimitAdapter debitCardEComLimitAdapter, View view) {
super(view);
C14957gcv.e(view, "");
this.a = debitCardEComLimitAdapter;
ButterKnife.c(this, view);
}
public final void d(boolean z) {
this.b = z;
CustomDeltaInput customDeltaInput = null;
if (z) {
ImageView imageView = this.ivLimitExpandArrow;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
imageView.setVisibility(8);
TextView textView = this.tvLimitDone;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setVisibility(0);
CustomDeltaInput customDeltaInput2 = this.limitInput;
if (customDeltaInput2 != null) {
customDeltaInput = customDeltaInput2;
} else {
C14957gcv.a("");
}
fJM.e(customDeltaInput);
b();
RVV rvv = this.a.d;
if (rvv != null) {
rvv.h();
return;
}
return;
}
ImageView imageView2 = this.ivLimitExpandArrow;
if (imageView2 == null) {
C14957gcv.a("");
imageView2 = null;
}
imageView2.setVisibility(0);
TextView textView2 = this.tvLimitDone;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setVisibility(8);
CustomDeltaInput customDeltaInput3 = this.limitInput;
if (customDeltaInput3 != null) {
customDeltaInput = customDeltaInput3;
} else {
C14957gcv.a("");
}
fJM.d(customDeltaInput);
}
private final void b() {
TextView textView = this.tvAccount;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setFocusable(true);
textView.setFocusableInTouchMode(true);
textView.requestFocus();
}
/* loaded from: classes5.dex */
public static final class Sts implements CustomDeltaInput.Sts {
private LimitCustomViewHolder e;
Sts(LimitCustomViewHolder limitCustomViewHolder) {
this.e = limitCustomViewHolder;
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void j() {
LimitCustomViewHolder.b(this.e);
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void h() {
LimitCustomViewHolder.b(this.e);
}
}
public static /* synthetic */ void d(LimitCustomViewHolder limitCustomViewHolder, boolean z) {
C14957gcv.e(limitCustomViewHolder, "");
if (z) {
return;
}
TextView textView = limitCustomViewHolder.tvLimitAccount;
CustomDeltaInput customDeltaInput = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
CustomDeltaInput customDeltaInput2 = limitCustomViewHolder.limitInput;
if (customDeltaInput2 != null) {
customDeltaInput = customDeltaInput2;
} else {
C14957gcv.a("");
}
textView.setText(C6583cXR.b(customDeltaInput.c));
}
public static /* synthetic */ void e(LimitCustomViewHolder limitCustomViewHolder, boolean z) {
C14957gcv.e(limitCustomViewHolder, "");
TextView textView = limitCustomViewHolder.tvLimitDone;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setEnabled(z);
TextView textView3 = limitCustomViewHolder.tvLimitDone;
if (textView3 != null) {
textView2 = textView3;
} else {
C14957gcv.a("");
}
textView2.setTextColor(nMh.getColor(limitCustomViewHolder.itemView.getContext(), z ? R.color.f13682131100876 : R.color.f13692131100877));
}
public static /* synthetic */ void c(LimitCustomViewHolder limitCustomViewHolder) {
C14957gcv.e(limitCustomViewHolder, "");
limitCustomViewHolder.d(!limitCustomViewHolder.b);
}
public static /* synthetic */ void d(LimitCustomViewHolder limitCustomViewHolder, C0917Rn c0917Rn, DebitCardEComLimitAdapter debitCardEComLimitAdapter) {
Integer num;
C14957gcv.e(limitCustomViewHolder, "");
C14957gcv.e(c0917Rn, "");
C14957gcv.e(debitCardEComLimitAdapter, "");
CustomDeltaInput customDeltaInput = limitCustomViewHolder.limitInput;
CustomDeltaInput customDeltaInput2 = null;
if (customDeltaInput == null) {
C14957gcv.a("");
customDeltaInput = null;
}
customDeltaInput.inputValue.clearFocus();
TextView textView = limitCustomViewHolder.tvLimitAccount;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
CustomDeltaInput customDeltaInput3 = limitCustomViewHolder.limitInput;
if (customDeltaInput3 == null) {
C14957gcv.a("");
customDeltaInput3 = null;
}
textView.setText(C6583cXR.b(customDeltaInput3.c));
CustomDeltaInput customDeltaInput4 = limitCustomViewHolder.limitInput;
if (customDeltaInput4 == null) {
C14957gcv.a("");
customDeltaInput4 = null;
}
if (C14957gcv.a(customDeltaInput4.c, c0917Rn.c != null ? Double.valueOf(r1.intValue()) : null)) {
limitCustomViewHolder.d(false);
InterfaceC12845fIt interfaceC12845fIt = debitCardEComLimitAdapter.c;
if (interfaceC12845fIt != null) {
interfaceC12845fIt.k();
return;
}
return;
}
String str = c0917Rn.a;
if (str == null || (num = c0917Rn.m) == null) {
return;
}
int intValue = num.intValue();
Integer num2 = c0917Rn.k;
if (num2 != null) {
int intValue2 = num2.intValue();
CustomDeltaInput customDeltaInput5 = limitCustomViewHolder.limitInput;
if (customDeltaInput5 != null) {
customDeltaInput2 = customDeltaInput5;
} else {
C14957gcv.a("");
}
ZUN zun = new ZUN(str, Integer.valueOf(intValue), Integer.valueOf(intValue2), Integer.valueOf((int) customDeltaInput2.c));
InterfaceC12845fIt interfaceC12845fIt2 = debitCardEComLimitAdapter.c;
if (interfaceC12845fIt2 != null) {
interfaceC12845fIt2.d(zun, YH.E_COMMERCE);
}
}
}
public static final /* synthetic */ void b(LimitCustomViewHolder limitCustomViewHolder) {
TextView textView = limitCustomViewHolder.tvLimitAccount;
CustomDeltaInput customDeltaInput = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
CustomDeltaInput customDeltaInput2 = limitCustomViewHolder.limitInput;
if (customDeltaInput2 != null) {
customDeltaInput = customDeltaInput2;
} else {
C14957gcv.a("");
}
textView.setText(C6583cXR.b(customDeltaInput.c));
}
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
static {
new Sts((byte) 0);
}
}