what-the-bank/sources/com/scb/phone/view/custom/SingleFormCustomInformation...

1162 lines
49 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.text.SpannableString;
import android.text.method.DigitsKeyListener;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.scheduledtransaction.CalendarDialogActivity;
import com.scb.phone.view.custom.SingleFormCustomInformationPanel;
import com.scb.phone.view.custom.common.CommonInputViewGroup;
import com.scb.phone.view.custom.common.CustomEditText;
import com.scb.phone.view.custom.common.ScheduleDate;
import com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle;
import io.github.inflationx.calligraphy3.TypefaceUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.NoWhenBranchMatchedException;
import o.AbstractC0518Im;
import o.AbstractC14961gcz;
import o.C0513Ij;
import o.C0519In;
import o.C0524Ir;
import o.C0525Is;
import o.C0533Ix;
import o.C0536Iy;
import o.C10383eCj;
import o.C14866gag;
import o.C14881gav;
import o.C14957gcv;
import o.C15602gz;
import o.C15715hv;
import o.InterfaceC12869fJm;
import o.InterfaceC14894gbR;
import o.MYp;
import o.YJ;
import o.cXG;
import o.fHW;
import o.fLJ;
import o.gtH;
import o.nMh;
import o.pyT;
import o.qBc;
import org.threeten.bp.OffsetDateTime;
/* loaded from: classes5.dex */
public final class SingleFormCustomInformationPanel extends LinearLayout {
boolean a;
private fHW b;
public List<AbstractC0518Im> c;
private String d;
private int e;
private int i;
@BindView
public RecyclerView rvInformation;
@BindView
public TextView tvTitle;
/* loaded from: classes5.dex */
public final class ItemLabelViewHolder_ViewBinding implements Unbinder {
private ItemLabelViewHolder d;
public ItemLabelViewHolder_ViewBinding(ItemLabelViewHolder itemLabelViewHolder, View view) {
this.d = itemLabelViewHolder;
itemLabelViewHolder.tvLabel = (TextView) pyT.e(view, R.id.tv_label, "field 'tvLabel'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemLabelViewHolder itemLabelViewHolder = this.d;
if (itemLabelViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.d = null;
itemLabelViewHolder.tvLabel = null;
}
}
/* loaded from: classes5.dex */
public final class ItemTitleLabelViewHolder_ViewBinding implements Unbinder {
private ItemTitleLabelViewHolder c;
public ItemTitleLabelViewHolder_ViewBinding(ItemTitleLabelViewHolder itemTitleLabelViewHolder, View view) {
this.c = itemTitleLabelViewHolder;
itemTitleLabelViewHolder.tvTitle = (TextView) pyT.e(view, R.id.tv_title, "field 'tvTitle'", TextView.class);
itemTitleLabelViewHolder.tvDescription = (TextView) pyT.e(view, R.id.tv_description, "field 'tvDescription'", TextView.class);
itemTitleLabelViewHolder.tvRemark = (TextView) pyT.e(view, R.id.tv_remark, "field 'tvRemark'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemTitleLabelViewHolder itemTitleLabelViewHolder = this.c;
if (itemTitleLabelViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.c = null;
itemTitleLabelViewHolder.tvTitle = null;
itemTitleLabelViewHolder.tvDescription = null;
itemTitleLabelViewHolder.tvRemark = null;
}
}
/* loaded from: classes5.dex */
public final class ItemTitleSpinnerViewHolder_ViewBinding implements Unbinder {
private ItemTitleSpinnerViewHolder e;
public ItemTitleSpinnerViewHolder_ViewBinding(ItemTitleSpinnerViewHolder itemTitleSpinnerViewHolder, View view) {
this.e = itemTitleSpinnerViewHolder;
itemTitleSpinnerViewHolder.swtValue = (CustomSpinnerWithTitle) pyT.e(view, R.id.swt_value, "field 'swtValue'", CustomSpinnerWithTitle.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemTitleSpinnerViewHolder itemTitleSpinnerViewHolder = this.e;
if (itemTitleSpinnerViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
itemTitleSpinnerViewHolder.swtValue = null;
}
}
/* loaded from: classes5.dex */
public final class ItemCheckboxExpiryDateViewHolder_ViewBinding implements Unbinder {
private ItemCheckboxExpiryDateViewHolder b;
public ItemCheckboxExpiryDateViewHolder_ViewBinding(ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder, View view) {
this.b = itemCheckboxExpiryDateViewHolder;
itemCheckboxExpiryDateViewHolder.ivpExpiryDate = (CommonInputViewGroup) pyT.e(view, R.id.ivp_expiry_date, "field 'ivpExpiryDate'", CommonInputViewGroup.class);
itemCheckboxExpiryDateViewHolder.cbExpiryDate = (CheckBox) pyT.e(view, R.id.cb_expiry_date, "field 'cbExpiryDate'", CheckBox.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder = this.b;
if (itemCheckboxExpiryDateViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.b = null;
itemCheckboxExpiryDateViewHolder.ivpExpiryDate = null;
itemCheckboxExpiryDateViewHolder.cbExpiryDate = null;
}
}
/* loaded from: classes5.dex */
public final class ItemTitleDatePickerViewHolder_ViewBinding implements Unbinder {
private ItemTitleDatePickerViewHolder e;
public ItemTitleDatePickerViewHolder_ViewBinding(ItemTitleDatePickerViewHolder itemTitleDatePickerViewHolder, View view) {
this.e = itemTitleDatePickerViewHolder;
itemTitleDatePickerViewHolder.sdDate = (ScheduleDate) pyT.e(view, R.id.sd_date, "field 'sdDate'", ScheduleDate.class);
itemTitleDatePickerViewHolder.tvError = (TextView) pyT.e(view, R.id.tv_error, "field 'tvError'", TextView.class);
}
@Override // butterknife.Unbinder
public final void a() {
ItemTitleDatePickerViewHolder itemTitleDatePickerViewHolder = this.e;
if (itemTitleDatePickerViewHolder == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.e = null;
itemTitleDatePickerViewHolder.sdDate = null;
itemTitleDatePickerViewHolder.tvError = null;
}
}
private /* synthetic */ SingleFormCustomInformationPanel(Context context, AttributeSet attributeSet, int i, int i2) {
this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i, (byte) 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private SingleFormCustomInformationPanel(Context context, AttributeSet attributeSet, int i, byte b) {
super(context, attributeSet, i, 0);
C14957gcv.e(context, "");
Object systemService = context.getSystemService("layout_inflater");
C14957gcv.d(systemService, "");
((LayoutInflater) systemService).inflate(R.layout.2131560245, (ViewGroup) this, true);
ButterKnife.c(this);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.SingleFormCustomInformationPanel, i, 0);
try {
try {
String string = obtainStyledAttributes.getString(0);
setTitle(string == null ? "" : string);
setTitleBackground(obtainStyledAttributes.getResourceId(1, R.color.f3032131099810));
} catch (RuntimeException unused) {
String string2 = context.getString(R.string.empty);
C14957gcv.c((Object) string2, "");
setTitle(string2);
setTitleBackground(R.color.f3032131099810);
}
obtainStyledAttributes.recycle();
setOrientation(1);
this.d = "";
this.i = R.color.f3032131099810;
this.c = new ArrayList();
this.e = -1;
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
}
public final void setTitle(String str) {
C14957gcv.e(str, "");
this.d = str;
TextView textView = this.tvTitle;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(str);
}
public final void setTitleBackground(int i) {
this.i = i;
TextView textView = this.tvTitle;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setBackgroundColor(nMh.getColor(getContext(), i));
}
public final void setInformationItemList(List<? extends AbstractC0518Im> list) {
C14957gcv.e(list, "");
List<? extends AbstractC0518Im> list2 = list;
C14957gcv.e(list2, "");
this.c = new ArrayList(list2);
RecyclerView recyclerView = this.rvInformation;
if (recyclerView == null) {
C14957gcv.a("");
recyclerView = null;
}
recyclerView.getContext();
recyclerView.setLayoutManager(new LinearLayoutManager());
recyclerView.d(new C10383eCj(), -1);
recyclerView.setNestedScrollingEnabled(false);
recyclerView.setFocusable(false);
recyclerView.setAdapter(new LWm(this));
b();
}
/* JADX WARN: Code restructure failed: missing block: B:28:0x0056, code lost:
if (r3.h == null) goto L31;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void b() {
/*
r7 = this;
java.util.List<o.Im> r0 = r7.c
java.lang.Iterable r0 = (java.lang.Iterable) r0
java.util.ArrayList r1 = new java.util.ArrayList
java.lang.String r2 = ""
o.C14957gcv.e(r0, r2)
boolean r3 = r0 instanceof java.util.Collection
if (r3 == 0) goto L17
r3 = r0
java.util.Collection r3 = (java.util.Collection) r3
int r3 = r3.size()
goto L19
L17:
r3 = 10
L19:
r1.<init>(r3)
java.util.Collection r1 = (java.util.Collection) r1
java.util.Iterator r0 = r0.iterator()
L22:
boolean r3 = r0.hasNext()
r4 = 0
r5 = 1
if (r3 == 0) goto L69
java.lang.Object r3 = r0.next()
o.Im r3 = (o.AbstractC0518Im) r3
boolean r6 = r3 instanceof o.C0536Iy
if (r6 == 0) goto L3b
o.Iy r3 = (o.C0536Iy) r3
T r3 = r3.c
if (r3 == 0) goto L61
goto L60
L3b:
boolean r6 = r3 instanceof o.C0524Ir
if (r6 == 0) goto L4a
o.Ir r3 = (o.C0524Ir) r3
org.threeten.bp.OffsetDateTime r6 = r3.i
if (r6 == 0) goto L61
boolean r3 = r3.a
if (r3 != 0) goto L61
goto L60
L4a:
boolean r6 = r3 instanceof o.C0525Is
if (r6 == 0) goto L60
o.Is r3 = (o.C0525Is) r3
boolean r6 = r3.d
if (r6 == 0) goto L58
org.threeten.bp.OffsetDateTime r6 = r3.h
if (r6 == 0) goto L60
L58:
org.threeten.bp.OffsetDateTime r6 = r3.h
if (r6 == 0) goto L61
boolean r3 = r3.i
if (r3 != 0) goto L61
L60:
r4 = r5
L61:
java.lang.Boolean r3 = java.lang.Boolean.valueOf(r4)
r1.add(r3)
goto L22
L69:
java.util.List r1 = (java.util.List) r1
java.util.Collection r1 = (java.util.Collection) r1
boolean r0 = r1.isEmpty()
if (r0 == 0) goto L7c
java.lang.Boolean r0 = java.lang.Boolean.FALSE
java.util.List r1 = java.util.Collections.singletonList(r0)
o.C14957gcv.c(r1, r2)
L7c:
java.lang.Iterable r1 = (java.lang.Iterable) r1
java.util.Iterator r0 = r1.iterator()
boolean r1 = r0.hasNext()
if (r1 == 0) goto Lbc
java.lang.Object r1 = r0.next()
L8c:
boolean r2 = r0.hasNext()
if (r2 == 0) goto Lae
java.lang.Object r2 = r0.next()
java.lang.Boolean r2 = (java.lang.Boolean) r2
boolean r2 = r2.booleanValue()
java.lang.Boolean r1 = (java.lang.Boolean) r1
boolean r1 = r1.booleanValue()
if (r1 == 0) goto La8
if (r2 == 0) goto La8
r1 = r5
goto La9
La8:
r1 = r4
La9:
java.lang.Boolean r1 = java.lang.Boolean.valueOf(r1)
goto L8c
Lae:
java.lang.Boolean r1 = (java.lang.Boolean) r1
boolean r0 = r1.booleanValue()
o.fHW r1 = r7.b
if (r1 == 0) goto Lbb
r1.a(r0)
Lbb:
return
Lbc:
java.lang.UnsupportedOperationException r0 = new java.lang.UnsupportedOperationException
java.lang.String r1 = "Empty collection can't be reduced."
r0.<init>(r1)
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.custom.SingleFormCustomInformationPanel.b():void");
}
public final void aoo_(int i, int i2, Intent intent) {
if (i == 3214 && i2 == -1 && this.e >= 0) {
Serializable serializableExtra = intent != null ? intent.getSerializableExtra("com.scb.phone.EXTRA_DATE") : null;
OffsetDateTime offsetDateTime = serializableExtra instanceof OffsetDateTime ? (OffsetDateTime) serializableExtra : null;
RecyclerView recyclerView = this.rvInformation;
if (recyclerView == null) {
C14957gcv.a("");
recyclerView = null;
}
RecyclerView.zJl a = recyclerView.a(this.e);
ItemTitleDatePickerViewHolder itemTitleDatePickerViewHolder = a instanceof ItemTitleDatePickerViewHolder ? (ItemTitleDatePickerViewHolder) a : null;
AbstractC0518Im abstractC0518Im = this.c.get(this.e);
C14957gcv.d(abstractC0518Im, "");
C0524Ir c0524Ir = (C0524Ir) abstractC0518Im;
boolean z = offsetDateTime == null;
CharSequence charSequence = c0524Ir.g;
String str = c0524Ir.b;
String str2 = c0524Ir.e;
String str3 = c0524Ir.c;
String str4 = c0524Ir.d;
C14957gcv.e(charSequence, "");
C14957gcv.e(str, "");
C14957gcv.e(str4, "");
C0524Ir c0524Ir2 = new C0524Ir(charSequence, offsetDateTime, str, z, str2, str3, str4);
this.c.set(this.e, c0524Ir2);
if (itemTitleDatePickerViewHolder != null) {
itemTitleDatePickerViewHolder.a(c0524Ir2);
}
}
this.a = false;
this.e = -1;
b();
}
/* loaded from: classes5.dex */
public static final class RVV {
private RVV() {
}
public /* synthetic */ RVV(byte b) {
this();
}
}
/* loaded from: classes5.dex */
public final class LWm extends RecyclerView.Sts<RecyclerView.zJl> {
private SingleFormCustomInformationPanel e;
public LWm(SingleFormCustomInformationPanel singleFormCustomInformationPanel) {
this.e = singleFormCustomInformationPanel;
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
C14957gcv.e(viewGroup, "");
if (i == 0) {
return new ItemTitleLabelViewHolder(this.e, viewGroup);
}
if (i == 1) {
return new ItemTitleSpinnerViewHolder(this.e, viewGroup);
}
if (i == 2) {
return new ItemTitleDatePickerViewHolder(this.e, viewGroup);
}
if (i == 3) {
return new ItemLabelViewHolder(this.e, viewGroup);
}
if (i == 4) {
return new ItemCheckboxExpiryDateViewHolder(this.e, viewGroup);
}
throw new IllegalArgumentException();
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, final int i) {
Typeface load;
C14957gcv.e(zjl, "");
int itemViewType = getItemViewType(i);
TextView textView = null;
CheckBox checkBox = null;
final TextView textView2 = null;
ScheduleDate scheduleDate = null;
CustomSpinnerWithTitle customSpinnerWithTitle = null;
if (itemViewType == 0) {
ItemTitleLabelViewHolder itemTitleLabelViewHolder = (ItemTitleLabelViewHolder) zjl;
AbstractC0518Im abstractC0518Im = this.e.c.get(i);
C14957gcv.d(abstractC0518Im, "");
C0533Ix c0533Ix = (C0533Ix) abstractC0518Im;
C14957gcv.e(c0533Ix, "");
TextView textView3 = itemTitleLabelViewHolder.tvTitle;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(c0533Ix.b);
int i2 = ItemTitleLabelViewHolder.IeS.c[c0533Ix.c.ordinal()];
if (i2 == 1) {
textView3.setTextAppearance(R.style.f56162132017876);
load = TypefaceUtils.load(textView3.getContext().getAssets(), "fonts/db_heavent_regular.ttf");
} else {
if (i2 != 2) {
throw new NoWhenBranchMatchedException();
}
textView3.setTextAppearance(R.style.f56152132017875);
load = TypefaceUtils.load(textView3.getContext().getAssets(), "fonts/db_heavent_medium.ttf");
}
textView3.setTypeface(load);
TextView textView4 = itemTitleLabelViewHolder.tvDescription;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
textView4.setText(c0533Ix.d);
TextView textView5 = itemTitleLabelViewHolder.tvRemark;
if (textView5 != null) {
textView = textView5;
} else {
C14957gcv.a("");
}
String str = c0533Ix.a;
textView.setVisibility(8);
return;
}
if (itemViewType == 1) {
ItemTitleSpinnerViewHolder itemTitleSpinnerViewHolder = (ItemTitleSpinnerViewHolder) zjl;
AbstractC0518Im abstractC0518Im2 = this.e.c.get(i);
C14957gcv.d(abstractC0518Im2, "");
C0536Iy c0536Iy = (C0536Iy) abstractC0518Im2;
IeS ieS = new IeS(this.e, i, c0536Iy);
C14957gcv.e(c0536Iy, "");
C14957gcv.e(ieS, "");
Iterable iterable = c0536Iy.a;
C14957gcv.e(iterable, "");
ArrayList arrayList = new ArrayList(iterable instanceof Collection ? ((Collection) iterable).size() : 10);
Iterator it = iterable.iterator();
while (it.hasNext()) {
arrayList.add(((C0513Ij) it.next()).b);
}
ArrayList arrayList2 = arrayList;
CustomSpinnerWithTitle customSpinnerWithTitle2 = itemTitleSpinnerViewHolder.swtValue;
if (customSpinnerWithTitle2 != null) {
customSpinnerWithTitle = customSpinnerWithTitle2;
} else {
C14957gcv.a("");
}
customSpinnerWithTitle.setTitle(c0536Iy.d.toString());
customSpinnerWithTitle.setHint(c0536Iy.b);
customSpinnerWithTitle.setItemsWithPlaceholder(arrayList2, true, false);
customSpinnerWithTitle.setOnCustomSpinnerWithTitleCompletion(new ItemTitleSpinnerViewHolder.HBt(ieS, itemTitleSpinnerViewHolder));
return;
}
if (itemViewType == 2) {
ItemTitleDatePickerViewHolder itemTitleDatePickerViewHolder = (ItemTitleDatePickerViewHolder) zjl;
AbstractC0518Im abstractC0518Im3 = this.e.c.get(i);
C14957gcv.d(abstractC0518Im3, "");
C0524Ir c0524Ir = (C0524Ir) abstractC0518Im3;
final SingleFormCustomInformationPanel singleFormCustomInformationPanel = this.e;
InterfaceC12869fJm interfaceC12869fJm = new InterfaceC12869fJm(singleFormCustomInformationPanel, i) { // from class: o.eAu
private int a;
private SingleFormCustomInformationPanel c;
@Override // o.InterfaceC12869fJm
public final void b() {
SingleFormCustomInformationPanel.LWm.e(this.c, this.a);
}
{
this.c = singleFormCustomInformationPanel;
this.a = i;
}
};
C14957gcv.e(c0524Ir, "");
C14957gcv.e(interfaceC12869fJm, "");
itemTitleDatePickerViewHolder.a(c0524Ir);
ScheduleDate scheduleDate2 = itemTitleDatePickerViewHolder.sdDate;
if (scheduleDate2 != null) {
scheduleDate = scheduleDate2;
} else {
C14957gcv.a("");
}
scheduleDate.setOnSelectDateListener(interfaceC12869fJm);
return;
}
if (itemViewType == 3) {
ItemLabelViewHolder itemLabelViewHolder = (ItemLabelViewHolder) zjl;
AbstractC0518Im abstractC0518Im4 = this.e.c.get(i);
C14957gcv.d(abstractC0518Im4, "");
final C0519In c0519In = (C0519In) abstractC0518Im4;
C14957gcv.e(c0519In, "");
final CharSequence charSequence = c0519In.d;
TextView textView6 = itemLabelViewHolder.tvLabel;
if (textView6 != null) {
textView2 = textView6;
} else {
C14957gcv.a("");
}
final SingleFormCustomInformationPanel singleFormCustomInformationPanel2 = itemLabelViewHolder.d;
textView2.setText(charSequence);
textView2.setMovementMethod(LinkMovementMethod.getInstance());
textView2.setOnClickListener(new View.OnClickListener(charSequence, textView2, singleFormCustomInformationPanel2, c0519In) { // from class: o.eAA
private CharSequence a;
private TextView c;
private C0519In d;
private SingleFormCustomInformationPanel e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
SingleFormCustomInformationPanel.ItemLabelViewHolder.aop_(this.a, this.c, this.e, this.d);
}
{
this.a = charSequence;
this.c = textView2;
this.e = singleFormCustomInformationPanel2;
this.d = c0519In;
}
});
return;
}
if (itemViewType == 4) {
final ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder = (ItemCheckboxExpiryDateViewHolder) zjl;
AbstractC0518Im abstractC0518Im5 = this.e.c.get(i);
C14957gcv.d(abstractC0518Im5, "");
C0525Is c0525Is = (C0525Is) abstractC0518Im5;
C14957gcv.e(c0525Is, "");
itemCheckboxExpiryDateViewHolder.c = i;
final CommonInputViewGroup commonInputViewGroup = itemCheckboxExpiryDateViewHolder.ivpExpiryDate;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
commonInputViewGroup.setTitle(c0525Is.f.toString());
commonInputViewGroup.setHint(c0525Is.c);
commonInputViewGroup.setErrorText(c0525Is.b);
if (c0525Is.i) {
commonInputViewGroup.c();
} else {
commonInputViewGroup.e();
}
CustomEditText customEditText = commonInputViewGroup.mEditText;
customEditText.setInputType(2);
customEditText.setKeyListener(DigitsKeyListener.getInstance("0123456789/"));
commonInputViewGroup.setMaxCounter(4);
commonInputViewGroup.setEnabled(!c0525Is.d);
if (commonInputViewGroup.isEnabled()) {
commonInputViewGroup.setText(cXG.VL_(commonInputViewGroup.getResources(), c0525Is.a, c0525Is.h));
} else {
commonInputViewGroup.setText(null);
commonInputViewGroup.e();
}
commonInputViewGroup.setFocusListener(new View.OnFocusChangeListener(commonInputViewGroup, itemCheckboxExpiryDateViewHolder) { // from class: o.eAy
private CommonInputViewGroup b;
private SingleFormCustomInformationPanel.ItemCheckboxExpiryDateViewHolder e;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
SingleFormCustomInformationPanel.ItemCheckboxExpiryDateViewHolder.a(this.b, this.e, z);
}
{
this.b = commonInputViewGroup;
this.e = itemCheckboxExpiryDateViewHolder;
}
});
CheckBox checkBox2 = itemCheckboxExpiryDateViewHolder.cbExpiryDate;
if (checkBox2 != null) {
checkBox = checkBox2;
} else {
C14957gcv.a("");
}
checkBox.setText(c0525Is.e);
checkBox.setChecked(c0525Is.d);
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(itemCheckboxExpiryDateViewHolder) { // from class: o.eAC
private SingleFormCustomInformationPanel.ItemCheckboxExpiryDateViewHolder b;
@Override // android.widget.CompoundButton.OnCheckedChangeListener
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
SingleFormCustomInformationPanel.ItemCheckboxExpiryDateViewHolder.c(this.b, z);
}
{
this.b = itemCheckboxExpiryDateViewHolder;
}
});
itemCheckboxExpiryDateViewHolder.a.b();
}
}
/* loaded from: classes5.dex */
static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR<Integer, C14866gag> {
private SingleFormCustomInformationPanel c;
private int d;
private C0536Iy<?> e;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Integer num) {
int intValue = num.intValue();
List<AbstractC0518Im> list = this.c.c;
int i = this.d;
C0536Iy<?> c0536Iy = this.e;
C0513Ij c0513Ij = (C0513Ij) C14881gav.b(c0536Iy.a, intValue);
Object obj = c0513Ij != null ? c0513Ij.d : null;
CharSequence charSequence = c0536Iy.d;
List<C0513Ij<?>> list2 = c0536Iy.a;
String str = c0536Iy.b;
String str2 = c0536Iy.e;
C14957gcv.e(charSequence, "");
C14957gcv.e(list2, "");
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
list.set(i, new C0536Iy(charSequence, list2, obj, str, str2));
this.c.b();
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
IeS(SingleFormCustomInformationPanel singleFormCustomInformationPanel, int i, C0536Iy<?> c0536Iy) {
super(1);
this.c = singleFormCustomInformationPanel;
this.d = i;
this.e = c0536Iy;
}
}
public static /* synthetic */ void e(SingleFormCustomInformationPanel singleFormCustomInformationPanel, int i) {
C14957gcv.e(singleFormCustomInformationPanel, "");
if (singleFormCustomInformationPanel.a) {
return;
}
singleFormCustomInformationPanel.setCalendarDialogOpening(true);
singleFormCustomInformationPanel.setItemDatePickerPosition(i);
Context context = singleFormCustomInformationPanel.getContext();
BaseActivity baseActivity = context instanceof BaseActivity ? (BaseActivity) context : null;
if (baseActivity != null) {
OffsetDateTime truncatedTo = OffsetDateTime.now().truncatedTo(gtH.DAYS);
baseActivity.startActivityForResult(CalendarDialogActivity.alI_(singleFormCustomInformationPanel.getContext(), 0, null, truncatedTo, truncatedTo.plusYears(10L), truncatedTo), 3214);
}
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
return this.e.c.size();
}
@Override // androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemViewType(int i) {
AbstractC0518Im abstractC0518Im = this.e.c.get(i);
if (abstractC0518Im instanceof C0533Ix) {
return 0;
}
if (abstractC0518Im instanceof C0536Iy) {
return 1;
}
if (abstractC0518Im instanceof C0524Ir) {
return 2;
}
if (abstractC0518Im instanceof C0519In) {
return 3;
}
if (abstractC0518Im instanceof C0525Is) {
return 4;
}
throw new NoWhenBranchMatchedException();
}
}
/* loaded from: classes5.dex */
public final class ItemTitleLabelViewHolder extends RecyclerView.zJl {
private SingleFormCustomInformationPanel a;
@BindView
public TextView tvDescription;
@BindView
public TextView tvRemark;
@BindView
public TextView tvTitle;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ItemTitleLabelViewHolder(SingleFormCustomInformationPanel singleFormCustomInformationPanel, ViewGroup viewGroup) {
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559047, viewGroup, false));
C14957gcv.e(viewGroup, "");
this.a = singleFormCustomInformationPanel;
ButterKnife.c(this, this.itemView);
}
/* loaded from: classes5.dex */
public final /* synthetic */ class IeS {
public static final int[] c;
static {
int[] iArr = new int[C0533Ix.RVV.values().length];
try {
iArr[C0533Ix.RVV.REGULAR.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[C0533Ix.RVV.MEDIUM.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
c = iArr;
}
}
}
/* loaded from: classes5.dex */
public final class ItemTitleSpinnerViewHolder extends RecyclerView.zJl {
private SingleFormCustomInformationPanel e;
@BindView
public CustomSpinnerWithTitle swtValue;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ItemTitleSpinnerViewHolder(SingleFormCustomInformationPanel singleFormCustomInformationPanel, ViewGroup viewGroup) {
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559048, viewGroup, false));
C14957gcv.e(viewGroup, "");
this.e = singleFormCustomInformationPanel;
ButterKnife.c(this, this.itemView);
}
/* loaded from: classes5.dex */
public static final class HBt implements CustomSpinnerWithTitle.LWm {
private ItemTitleSpinnerViewHolder c;
private InterfaceC14894gbR<Integer, C14866gag> e;
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bn_() {
}
/* JADX WARN: Multi-variable type inference failed */
HBt(InterfaceC14894gbR<? super Integer, C14866gag> interfaceC14894gbR, ItemTitleSpinnerViewHolder itemTitleSpinnerViewHolder) {
this.e = interfaceC14894gbR;
this.c = itemTitleSpinnerViewHolder;
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bo_() {
InterfaceC14894gbR<Integer, C14866gag> interfaceC14894gbR = this.e;
CustomSpinnerWithTitle customSpinnerWithTitle = this.c.swtValue;
if (customSpinnerWithTitle == null) {
C14957gcv.a("");
customSpinnerWithTitle = null;
}
interfaceC14894gbR.invoke(Integer.valueOf(((MYp) customSpinnerWithTitle.c.e()).c.getSelectedItemPosition() - 1));
}
}
}
/* loaded from: classes5.dex */
public final class ItemTitleDatePickerViewHolder extends RecyclerView.zJl {
private SingleFormCustomInformationPanel a;
@BindView
public ScheduleDate sdDate;
@BindView
public TextView tvError;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ItemTitleDatePickerViewHolder(SingleFormCustomInformationPanel singleFormCustomInformationPanel, ViewGroup viewGroup) {
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559046, viewGroup, false));
C14957gcv.e(viewGroup, "");
this.a = singleFormCustomInformationPanel;
ButterKnife.c(this, this.itemView);
}
public final void a(C0524Ir c0524Ir) {
C14957gcv.e(c0524Ir, "");
ScheduleDate scheduleDate = this.sdDate;
TextView textView = null;
if (scheduleDate == null) {
C14957gcv.a("");
scheduleDate = null;
}
scheduleDate.setLabel(c0524Ir.g);
scheduleDate.setDateHint(c0524Ir.e);
scheduleDate.setDateField(cXG.VL_(scheduleDate.getResources(), c0524Ir.b, c0524Ir.i));
scheduleDate.setCalendarButtonTint(R.color.f2982131099805);
if (c0524Ir.a) {
ScheduleDate scheduleDate2 = this.sdDate;
if (scheduleDate2 == null) {
C14957gcv.a("");
scheduleDate2 = null;
}
scheduleDate2.setDateFieldBackground(R.drawable.shape_red_reounded_reactangle_border);
TextView textView2 = this.tvError;
if (textView2 != null) {
textView = textView2;
} else {
C14957gcv.a("");
}
textView.setVisibility(0);
textView.setText(c0524Ir.c);
return;
}
ScheduleDate scheduleDate3 = this.sdDate;
if (scheduleDate3 == null) {
C14957gcv.a("");
scheduleDate3 = null;
}
scheduleDate3.setDateFieldBackground(R.drawable.shape_gray_rounded_rectangle);
TextView textView3 = this.tvError;
if (textView3 != null) {
textView = textView3;
} else {
C14957gcv.a("");
}
textView.setVisibility(8);
}
}
/* loaded from: classes5.dex */
public final class ItemLabelViewHolder extends RecyclerView.zJl {
final SingleFormCustomInformationPanel d;
@BindView
public TextView tvLabel;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ItemLabelViewHolder(SingleFormCustomInformationPanel singleFormCustomInformationPanel, ViewGroup viewGroup) {
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559045, viewGroup, false));
C14957gcv.e(viewGroup, "");
this.d = singleFormCustomInformationPanel;
ButterKnife.c(this, this.itemView);
}
public static /* synthetic */ void aop_(CharSequence charSequence, TextView textView, SingleFormCustomInformationPanel singleFormCustomInformationPanel, C0519In c0519In) {
fHW fhw;
C14957gcv.e(charSequence, "");
C14957gcv.e(textView, "");
C14957gcv.e(singleFormCustomInformationPanel, "");
C14957gcv.e(c0519In, "");
if (charSequence instanceof SpannableString) {
ClickableSpan[] clickableSpanArr = (ClickableSpan[]) ((SpannableString) charSequence).getSpans(0, charSequence.length(), ClickableSpan.class);
C14957gcv.c(clickableSpanArr, "");
if (!(clickableSpanArr.length == 0)) {
if ((textView.getSelectionStart() == -1 && textView.getSelectionEnd() == -1) || (fhw = singleFormCustomInformationPanel.b) == null) {
return;
}
fhw.b(c0519In);
return;
}
}
fHW fhw2 = singleFormCustomInformationPanel.b;
if (fhw2 != null) {
fhw2.b(c0519In);
}
}
}
/* loaded from: classes5.dex */
public final class ItemCheckboxExpiryDateViewHolder extends RecyclerView.zJl {
final SingleFormCustomInformationPanel a;
int c;
@BindView
public CheckBox cbExpiryDate;
@BindView
public CommonInputViewGroup ivpExpiryDate;
public static final /* synthetic */ void c(ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder, String str) {
AbstractC0518Im abstractC0518Im = itemCheckboxExpiryDateViewHolder.a.c.get(itemCheckboxExpiryDateViewHolder.c);
C14957gcv.d(abstractC0518Im, "");
C0525Is c0525Is = (C0525Is) abstractC0518Im;
fHW fhw = itemCheckboxExpiryDateViewHolder.a.b;
CommonInputViewGroup commonInputViewGroup = null;
YJ b = fhw != null ? fhw.b(str) : null;
int i = b == null ? -1 : Sts.a[b.ordinal()];
if (i == 1) {
c0525Is.h = null;
c0525Is.i = true;
c0525Is.b = itemCheckboxExpiryDateViewHolder.a.getResources().getString(R.string.auto_single_form_personal_info_expiry_date_expired_date_in_line_invalid);
} else if (i == 2 || i == 3) {
c0525Is.h = null;
c0525Is.i = true;
c0525Is.b = itemCheckboxExpiryDateViewHolder.a.getResources().getString(R.string.single_form_personal_info_expiry_date_invalid_date_in_line_invalid);
} else if (i == 4) {
c0525Is.i = false;
} else if (i == 5) {
c0525Is.h = cXG.b("yyyy-MM-dd", cXG.b(cXG.e(str, "/")), Boolean.FALSE);
c0525Is.i = false;
}
CommonInputViewGroup commonInputViewGroup2 = itemCheckboxExpiryDateViewHolder.ivpExpiryDate;
if (commonInputViewGroup2 == null) {
C14957gcv.a("");
commonInputViewGroup2 = null;
}
commonInputViewGroup2.setErrorText(c0525Is.b);
CommonInputViewGroup commonInputViewGroup3 = itemCheckboxExpiryDateViewHolder.ivpExpiryDate;
if (commonInputViewGroup3 != null) {
commonInputViewGroup = commonInputViewGroup3;
} else {
C14957gcv.a("");
}
if (c0525Is.i) {
commonInputViewGroup.c();
} else {
commonInputViewGroup.e();
}
itemCheckboxExpiryDateViewHolder.a.c.set(itemCheckboxExpiryDateViewHolder.c, c0525Is);
itemCheckboxExpiryDateViewHolder.a.b();
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ItemCheckboxExpiryDateViewHolder(SingleFormCustomInformationPanel singleFormCustomInformationPanel, ViewGroup viewGroup) {
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.2131559044, viewGroup, false));
C14957gcv.e(viewGroup, "");
this.a = singleFormCustomInformationPanel;
ButterKnife.c(this, this.itemView);
this.c = 6;
}
/* loaded from: classes5.dex */
public static final class HBt implements fLJ.IeS {
private ItemCheckboxExpiryDateViewHolder e;
HBt(ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder) {
this.e = itemCheckboxExpiryDateViewHolder;
}
@Override // o.fLJ.IeS
public final void b(String str) {
C14957gcv.e(str, "");
ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder = this.e;
CommonInputViewGroup commonInputViewGroup = itemCheckboxExpiryDateViewHolder.ivpExpiryDate;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
ItemCheckboxExpiryDateViewHolder.c(itemCheckboxExpiryDateViewHolder, commonInputViewGroup.mEditText.getText().toString());
}
@Override // o.fLJ.IeS
public final void e(String str) {
C14957gcv.e(str, "");
ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder = this.e;
CommonInputViewGroup commonInputViewGroup = itemCheckboxExpiryDateViewHolder.ivpExpiryDate;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
ItemCheckboxExpiryDateViewHolder.c(itemCheckboxExpiryDateViewHolder, commonInputViewGroup.mEditText.getText().toString());
}
}
public static /* synthetic */ void c(ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder, boolean z) {
C14957gcv.e(itemCheckboxExpiryDateViewHolder, "");
AbstractC0518Im abstractC0518Im = itemCheckboxExpiryDateViewHolder.a.c.get(itemCheckboxExpiryDateViewHolder.c);
C14957gcv.d(abstractC0518Im, "");
C0525Is c0525Is = (C0525Is) abstractC0518Im;
c0525Is.d = z;
c0525Is.i = false;
c0525Is.h = null;
CommonInputViewGroup commonInputViewGroup = itemCheckboxExpiryDateViewHolder.ivpExpiryDate;
if (commonInputViewGroup == null) {
C14957gcv.a("");
commonInputViewGroup = null;
}
commonInputViewGroup.setEnabled(!z);
if (z) {
commonInputViewGroup.setText(null);
commonInputViewGroup.e();
}
itemCheckboxExpiryDateViewHolder.a.c.set(itemCheckboxExpiryDateViewHolder.c, c0525Is);
itemCheckboxExpiryDateViewHolder.a.b();
}
public static /* synthetic */ String e(String str) {
new qBc();
return C15602gz.b(str, "[^0-9]", "XX/XX/XXXX");
}
public static /* synthetic */ void a(CommonInputViewGroup commonInputViewGroup, ItemCheckboxExpiryDateViewHolder itemCheckboxExpiryDateViewHolder, boolean z) {
C14957gcv.e(commonInputViewGroup, "");
C14957gcv.e(itemCheckboxExpiryDateViewHolder, "");
if (z) {
CommonInputViewGroup commonInputViewGroup2 = itemCheckboxExpiryDateViewHolder.ivpExpiryDate;
if (commonInputViewGroup2 == null) {
C14957gcv.a("");
commonInputViewGroup2 = null;
}
fLJ flj = new fLJ(commonInputViewGroup2.mEditText, "XX/XX/XXXX", new fLJ.Sts() { // from class: o.eAz
@Override // o.fLJ.Sts
public final String c(String str) {
return SingleFormCustomInformationPanel.ItemCheckboxExpiryDateViewHolder.e(str);
}
});
flj.b = new HBt(itemCheckboxExpiryDateViewHolder);
flj.e = true;
fLJ flj2 = flj;
commonInputViewGroup.mEditText.addTextChangedListener(flj2);
commonInputViewGroup.d.add(flj2);
return;
}
commonInputViewGroup.b();
}
/* loaded from: classes5.dex */
public final /* synthetic */ class Sts {
public static final int[] a;
static {
int[] iArr = new int[YJ.values().length];
try {
iArr[YJ.INVALID_DATE_EXPIRED.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[YJ.INVALID_DATE_MORE_THAN_TEN_YEARS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[YJ.INVALID_DATE_FORMAT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
iArr[YJ.INVALID_EMPTY_DATE_STRING.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
iArr[YJ.VALID.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
a = iArr;
}
}
}
public final void setTvTitle(TextView textView) {
C14957gcv.e(textView, "");
this.tvTitle = textView;
}
public final void setRvInformation(RecyclerView recyclerView) {
C14957gcv.e(recyclerView, "");
this.rvInformation = recyclerView;
}
public final void setItemDatePickerPosition(int i) {
this.e = i;
}
public final void setInformationDisplayList(List<AbstractC0518Im> list) {
C14957gcv.e(list, "");
this.c = list;
}
public final void setCustomInformationPanelListener(fHW fhw) {
C14957gcv.e(fhw, "");
this.b = fhw;
}
public final void setCalendarDialogOpening(boolean z) {
this.a = z;
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public SingleFormCustomInformationPanel(Context context, AttributeSet attributeSet, int i) {
this(context, attributeSet, i, 8);
C14957gcv.e(context, "");
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public SingleFormCustomInformationPanel(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0, 12);
C14957gcv.e(context, "");
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public SingleFormCustomInformationPanel(Context context) {
this(context, (AttributeSet) null, 0, 14);
C14957gcv.e(context, "");
}
static {
new RVV((byte) 0);
}
}