package o; import android.app.Activity; import android.util.SparseArray; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import androidx.viewpager.widget.ViewPager; import com.google.android.material.textfield.TextInputLayout; import com.scb.phone.view.custom.common.AmountEditText; import java.util.List; /* renamed from: o.ewH, reason: case insensitive filesystem */ /* loaded from: classes5.dex */ public final class C12332ewH extends WYJ implements ViewPager.ojQ { public static final LWm e = new LWm(0); public int a; public double b; public final SparseArray c; public List d; private final InterfaceC14890gbN f; private final IeS g; private final SparseArray i; private final Activity j; /* renamed from: o.ewH$IeS */ /* loaded from: classes5.dex */ public interface IeS { void b(double d); void c(); } @Override // androidx.viewpager.widget.ViewPager.ojQ public final void onPageScrollStateChanged(int i) { } @Override // androidx.viewpager.widget.ViewPager.ojQ public final void onPageScrolled(int i, float f, int i2) { } public C12332ewH(Activity activity, List list, InterfaceC14890gbN interfaceC14890gbN, IeS ieS) { C14957gcv.e(activity, ""); C14957gcv.e(list, ""); C14957gcv.e(interfaceC14890gbN, ""); this.j = activity; this.d = list; this.f = interfaceC14890gbN; this.g = ieS; this.c = new SparseArray<>(3); this.i = new SparseArray<>(3); } @Override // o.WYJ public final CharSequence getPageTitle(int i) { return this.d.get(i).a; } @Override // o.WYJ public final int getCount() { return this.d.size(); } @Override // o.WYJ public final Object instantiateItem(ViewGroup viewGroup, int i) { C14957gcv.e(viewGroup, ""); C0932Rv c0932Rv = this.d.get(i); View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(com.scb.phone.R.layout.2131560221, viewGroup, false); int i2 = com.scb.phone.R.id.edit_amount; AmountEditText amountEditText = (AmountEditText) qeC.e(inflate, com.scb.phone.R.id.edit_amount); if (amountEditText != null) { i2 = com.scb.phone.R.id.text_error_input_layout; TextInputLayout textInputLayout = (TextInputLayout) qeC.e(inflate, com.scb.phone.R.id.text_error_input_layout); if (textInputLayout != null) { final pxz pxzVar = new pxz((LinearLayout) inflate, amountEditText, textInputLayout); C14957gcv.c(pxzVar, ""); pxzVar.e.setCurrencyFormattingTextWatcher(new fLM(pxzVar.e, pxzVar.a, 9.9999999999E8d, 0.0d, this.j.getResources().getString(com.scb.phone.R.string.error_limit), this.j.getResources().getString(com.scb.phone.R.string.not_enough_funds_on_selected_account), this.j.getResources().getString(com.scb.phone.R.string.zero_amount_error))); pxzVar.e.setOnPasteListener(new AmountEditText.HBt()); pxzVar.e.setOnAmountChangeListener(new HBt(this)); pxzVar.e.setHandleDismissKeyboard(new AmountEditText.LWm(this) { // from class: o.ewL private C12332ewH e; @Override // com.scb.phone.view.custom.common.AmountEditText.LWm public final void d() { C12332ewH.a(this.e); } { this.e = this; } }); pxzVar.e.setOnFocusChangeListener(new View.OnFocusChangeListener(pxzVar) { // from class: o.ewN private pxz e; @Override // android.view.View.OnFocusChangeListener public final void onFocusChange(View view, boolean z) { C12332ewH.c(this.e, z); } { this.e = pxzVar; } }); pxzVar.e.setFormattedAmount(c0932Rv.b); pxzVar.e.setEnabled(c0932Rv.e); this.c.put(i, pxzVar.e); this.i.put(i, pxzVar.a); viewGroup.addView(pxzVar.c); LinearLayout linearLayout = pxzVar.c; C14957gcv.c(linearLayout, ""); return linearLayout; } } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i2))); } /* renamed from: o.ewH$HBt */ /* loaded from: classes5.dex */ public static final class HBt implements AmountEditText.RVV { private C12332ewH e; HBt(C12332ewH c12332ewH) { this.e = c12332ewH; } @Override // com.scb.phone.view.custom.common.AmountEditText.RVV public final void b(double d) { IeS ieS = this.e.g; if (ieS != null) { this.e.b = d; ieS.b(d); } } @Override // com.scb.phone.view.custom.common.AmountEditText.RVV public final void a() { IeS ieS = this.e.g; if (ieS != null) { ieS.c(); } } } @Override // o.WYJ public final void destroyItem(ViewGroup viewGroup, int i, Object obj) { C14957gcv.e(viewGroup, ""); C14957gcv.e(obj, ""); viewGroup.removeView((View) obj); } @Override // androidx.viewpager.widget.ViewPager.ojQ public final void onPageSelected(int i) { this.a = i; c(i); } public final void c(int i) { double d; IeS ieS = this.g; if (ieS != null) { String valueOf = String.valueOf(this.c.get(i).getText()); if (valueOf.length() > 0) { Double c = C6583cXR.c(valueOf); C14957gcv.c(c, ""); d = c.doubleValue(); } else { d = 0.0d; } this.b = d; ieS.b(d); } } public final C0932Rv e() { if (!this.d.isEmpty()) { return this.d.get(this.a); } return new C0932Rv((byte) 0); } /* renamed from: o.ewH$LWm */ /* loaded from: classes5.dex */ public static final class LWm { private LWm() { } public /* synthetic */ LWm(byte b) { this(); } } public static /* synthetic */ void c(pxz pxzVar, boolean z) { C14957gcv.e(pxzVar, ""); if (z) { pxzVar.a.setHintEnabled(false); pxzVar.e.setHint(""); } else if (C6583cXR.q(String.valueOf(pxzVar.e.getText()))) { pxzVar.e.setText(""); } } public static /* synthetic */ void a(C12332ewH c12332ewH) { C14957gcv.e(c12332ewH, ""); c12332ewH.f.invoke(); } @Override // o.WYJ public final boolean isViewFromObject(View view, Object obj) { C14957gcv.e(view, ""); C14957gcv.e(obj, ""); return view == obj; } }