what-the-bank/sources/com/scb/phone/view/fragment/investment/redeem/AmountFragment.java

323 lines
13 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.investment.redeem;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.android.material.textfield.TextInputLayout;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.AmountEditText;
import com.scb.phone.view.custom.common.UnitsEditText;
import java.math.BigDecimal;
import o.AbstractC14961gcz;
import o.C14957gcv;
import o.C17559xnd;
import o.C3738bFR;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC16541pFg;
import o.InterfaceC9381dif;
import o.ZI;
import o.fIH;
import o.fZZ;
import o.qeC;
/* loaded from: classes5.dex */
public final class AmountFragment extends Hilt_AmountFragment implements InterfaceC9381dif.HBt {
private final InterfaceC13393fZL c;
private fIH d;
@InterfaceC13391fZD
public C3738bFR presenter;
public static final /* synthetic */ void a(AmountFragment amountFragment, double d) {
fIH fih = amountFragment.d;
if (fih != null) {
fih.a(d);
}
}
public static final /* synthetic */ void e(AmountFragment amountFragment, BigDecimal bigDecimal) {
fIH fih = amountFragment.d;
if (fih != null) {
fih.e(bigDecimal);
}
}
public AmountFragment() {
Sts sts = new Sts(this);
C14957gcv.e(sts, "");
this.c = new fZZ(sts);
}
/* loaded from: classes5.dex */
static final class Sts extends AbstractC14961gcz implements InterfaceC14890gbN<C17559xnd> {
private AmountFragment c;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C17559xnd invoke() {
View inflate = this.c.getLayoutInflater().inflate(R.layout.2131559666, (ViewGroup) null, false);
int i = R.id.all_container_layout;
LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, R.id.all_container_layout);
if (linearLayout != null) {
i = R.id.fund_amount_value_edit_text;
AmountEditText amountEditText = (AmountEditText) qeC.e(inflate, R.id.fund_amount_value_edit_text);
if (amountEditText != null) {
i = R.id.fund_amount_value_input_layout;
TextInputLayout textInputLayout = (TextInputLayout) qeC.e(inflate, R.id.fund_amount_value_input_layout);
if (textInputLayout != null) {
i = R.id.fund_units_value_edit_text;
UnitsEditText unitsEditText = (UnitsEditText) qeC.e(inflate, R.id.fund_units_value_edit_text);
if (unitsEditText != null) {
i = R.id.fund_units_value_input_layout;
TextInputLayout textInputLayout2 = (TextInputLayout) qeC.e(inflate, R.id.fund_units_value_input_layout);
if (textInputLayout2 != null) {
i = R.id.ll_fund_available_unit_section;
LinearLayout linearLayout2 = (LinearLayout) qeC.e(inflate, R.id.ll_fund_available_unit_section);
if (linearLayout2 != null) {
i = R.id.transaction_amount_text_view;
TextView textView = (TextView) qeC.e(inflate, R.id.transaction_amount_text_view);
if (textView != null) {
i = R.id.transaction_units_text_view;
TextView textView2 = (TextView) qeC.e(inflate, R.id.transaction_units_text_view);
if (textView2 != null) {
i = R.id.tv_fund_available_unit;
TextView textView3 = (TextView) qeC.e(inflate, R.id.tv_fund_available_unit);
if (textView3 != null) {
i = R.id.tv_fund_period_title;
TextView textView4 = (TextView) qeC.e(inflate, R.id.tv_fund_period_title);
if (textView4 != null) {
C17559xnd c17559xnd = new C17559xnd((LinearLayout) inflate, linearLayout, amountEditText, textInputLayout, unitsEditText, textInputLayout2, linearLayout2, textView, textView2, textView3, textView4);
C14957gcv.c(c17559xnd, "");
return c17559xnd;
}
}
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
Sts(AmountFragment amountFragment) {
super(0);
this.c = amountFragment;
}
}
@Override // com.scb.phone.view.fragment.investment.redeem.Hilt_AmountFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public final void onAttach(Context context) {
C14957gcv.e(context, "");
super.onAttach(context);
if (getParentFragment() instanceof fIH) {
InterfaceC16541pFg parentFragment = getParentFragment();
C14957gcv.d(parentFragment, "");
this.d = (fIH) parentFragment;
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
C3738bFR c3738bFR = this.presenter;
if (c3738bFR == null) {
C14957gcv.a("");
c3738bFR = null;
}
c3738bFR.e((C3738bFR) this);
LinearLayout linearLayout = ((C17559xnd) this.c.e()).g;
C14957gcv.c(linearLayout, "");
return linearLayout;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
Bundle arguments = getArguments();
if (arguments != null) {
final String string = arguments.getString("EXTRA_PAY_TYPE", "");
final String string2 = arguments.getString("EXTRA_AMOUNT");
final String string3 = arguments.getString("EXTRA_UNIT");
final String string4 = arguments.getString("EXTRA_FUND_TYPE", "");
final String string5 = arguments.getString("EXTRA_REDEEMABLE_UNIT", "");
final boolean z = arguments.getBoolean("EXTRA_IS_SWITCH");
C3738bFR c3738bFR = this.presenter;
if (c3738bFR == null) {
C14957gcv.a("");
c3738bFR = null;
}
C14957gcv.c((Object) string, "");
C14957gcv.c((Object) string4, "");
C14957gcv.c((Object) string5, "");
C14957gcv.e(string, "");
C14957gcv.e(string4, "");
C14957gcv.e(string5, "");
final C3738bFR c3738bFR2 = c3738bFR;
ZI.IeS ieS = new ZI.IeS(string, string2, c3738bFR2, z, string3, string4, string5) { // from class: o.bFQ
private String a;
private C3738bFR b;
private String c;
private boolean d;
private String e;
private String f;
private String g;
@Override // o.ZI.IeS
public final void e(Object obj) {
C3738bFR.e(this.e, this.a, this.b, this.d, this.c, this.g, this.f, (InterfaceC9381dif.HBt) obj);
}
{
this.e = string;
this.a = string2;
this.b = c3738bFR2;
this.d = z;
this.c = string3;
this.g = string4;
this.f = string5;
}
};
if (c3738bFR.f != 0) {
ieS.e(c3738bFR.f);
}
}
C17559xnd c17559xnd = (C17559xnd) this.c.e();
c17559xnd.b.setHint("");
c17559xnd.e.setHint("");
}
@Override // o.InterfaceC9381dif.HBt
public final void c(int i) {
C17559xnd c17559xnd = (C17559xnd) this.c.e();
TextInputLayout textInputLayout = c17559xnd.b;
C14957gcv.c(textInputLayout, "");
TextInputLayout textInputLayout2 = textInputLayout;
C14957gcv.e(textInputLayout2, "");
textInputLayout2.setVisibility(0);
c17559xnd.b.setHint("0.00");
c17559xnd.a.setOnAmountChangeListener(new HBt(this));
c17559xnd.a.setMaximumDecimalDigit(i);
}
/* loaded from: classes5.dex */
public static final class HBt implements AmountEditText.RVV {
private AmountFragment a;
HBt(AmountFragment amountFragment) {
this.a = amountFragment;
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void b(double d) {
AmountFragment.a(this.a, d);
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void a() {
this.a.aN_();
}
}
@Override // o.InterfaceC9381dif.HBt
public final void c(boolean z) {
C17559xnd c17559xnd = (C17559xnd) this.c.e();
TextInputLayout textInputLayout = c17559xnd.e;
C14957gcv.c(textInputLayout, "");
TextInputLayout textInputLayout2 = textInputLayout;
C14957gcv.e(textInputLayout2, "");
textInputLayout2.setVisibility(0);
c17559xnd.c.setHint("0.0000");
c17559xnd.c.setOnUnitChangeListener(new IeS(this));
c17559xnd.c.setSpecificFilter(z);
}
/* loaded from: classes5.dex */
public static final class IeS implements UnitsEditText.RVV {
private AmountFragment e;
IeS(AmountFragment amountFragment) {
this.e = amountFragment;
}
@Override // com.scb.phone.view.custom.common.UnitsEditText.RVV
public final void b(BigDecimal bigDecimal) {
C14957gcv.e(bigDecimal, "");
AmountFragment.e(this.e, bigDecimal);
}
@Override // com.scb.phone.view.custom.common.UnitsEditText.RVV
public final void d() {
this.e.aN_();
}
}
@Override // o.InterfaceC9381dif.HBt
public final void c(String str, String str2) {
C17559xnd c17559xnd = (C17559xnd) this.c.e();
LinearLayout linearLayout = c17559xnd.d;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(0);
c17559xnd.j.setText(str);
c17559xnd.f.setText(str2);
}
@Override // o.InterfaceC9381dif.HBt
public final void b(String str, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
C17559xnd c17559xnd = (C17559xnd) this.c.e();
LinearLayout linearLayout = c17559xnd.i;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(0);
c17559xnd.n.setText(str);
c17559xnd.h.setText(str2);
}
@Override // androidx.fragment.app.Fragment
public final void onDetach() {
this.d = null;
super.onDetach();
}
/* loaded from: classes5.dex */
public static final class LWm {
private LWm() {
}
public /* synthetic */ LWm(byte b) {
this();
}
}
public static final AmountFragment a(String str, String str2, String str3, String str4, boolean z, String str5) {
AmountFragment amountFragment = new AmountFragment();
Bundle bundle = new Bundle();
bundle.putString("EXTRA_PAY_TYPE", str);
bundle.putString("EXTRA_AMOUNT", str2);
bundle.putString("EXTRA_UNIT", str3);
bundle.putString("EXTRA_FUND_TYPE", str4);
bundle.putString("EXTRA_REDEEMABLE_UNIT", str5);
bundle.putBoolean("EXTRA_IS_SWITCH", z);
amountFragment.setArguments(bundle);
return amountFragment;
}
static {
new LWm((byte) 0);
}
}