what-the-bank/sources/com/scb/phone/view/fragment/hml/HmlCalculatorFragment.java

1114 lines
37 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.hml;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.hml.HmlConsentActivity;
import com.scb.phone.view.activity.hml.HmlSimulatorAboutActivity;
import com.scb.phone.view.custom.common.AmountEditText;
import com.scb.phone.view.custom.common.CustomDeltaInput;
import com.scb.phone.view.custom.common.CustomDeltaInputPressed;
import com.scb.phone.view.custom.common.CustomImageWithText;
import com.scb.phone.view.custom.common.CustomRibbonStatus;
import com.scb.phone.view.custom.common.CustomSchedulePayment;
import com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle;
import com.scb.phone.view.custom.tierpricing.BaseProductCatalogueView;
import com.scb.phone.view.custom.tierpricing.TierPricingPromotionView;
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.hml.HmlCalculatorFragment;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
import java.util.List;
import o.C0738Nl;
import o.C0786Oo;
import o.C14819gM;
import o.C5189boO;
import o.C5204bod;
import o.C6583cXR;
import o.DRg;
import o.EBZ;
import o.EVU;
import o.GEP;
import o.InterfaceC13391fZD;
import o.InterfaceC9260dgQ;
import o.Jel;
import o.MU;
import o.MYp;
import o.MZ;
import o.OVB;
import o.WS;
import o.WX;
import o.YKU;
import o.ZI;
import o.bTI;
import o.pug;
import o.utN;
/* loaded from: classes5.dex */
public abstract class HmlCalculatorFragment<T extends C5204bod> extends BaseFragment implements InterfaceC9260dgQ {
@BindView
ImageView background;
@BindView
Button btnApply;
@BindView
CustomImageWithText businessOwnerInfoItem2ImageText;
@BindView
CustomTransferAndPayItem calculatorResult;
@BindView
CustomImageWithText consumerInfoItem2ImageText;
private String i;
@BindView
LinearLayout interestOptionsContainer;
private EVU j;
@BindView
CustomDeltaInputPressed loanAmount;
@BindView
public CustomSpinnerWithTitle paymentDay;
@InterfaceC13391fZD
public T presenter;
@BindView
ImageView productCatalogueArrow;
@BindView
LinearLayout productCatalogueContent;
@InterfaceC13391fZD
public C14819gM productCatalogueFactory;
@BindView
TextView productCataloguePromo;
@BindView
TextView productCatalogueValidUntil;
@BindView
LinearLayout promotionsContainer;
@BindView
CustomRibbonStatus ribbonStatus;
@BindView
ConstraintLayout rootView;
@BindView
CustomSchedulePayment schedulePayment;
@BindView
public CustomSpinnerWithTitle startPayment;
@BindView
TextView tvSubtitle;
@BindView
TextView tvTitle;
private Handler d = new Handler();
private Runnable c = new Runnable(this) { // from class: o.faQ
private HmlCalculatorFragment a;
@Override // java.lang.Runnable
public final void run() {
HmlCalculatorFragment.i(this.a);
}
{
this.a = this;
}
};
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
byte b = 0;
View inflate = layoutInflater.inflate(R.layout.2131559699, viewGroup, false);
ButterKnife.c(this, inflate);
setHasOptionsMenu(true);
this.tvTitle.setFocusable(true);
this.tvTitle.setFocusableInTouchMode(true);
this.tvTitle.requestFocus();
if (getArguments() != null) {
this.j = (EVU) getArguments().getSerializable("PRODUCT_TYPE_ARG");
this.i = getArguments().getString("LEAD_TYPE");
}
this.presenter.e(this);
T t = this.presenter;
EVU evu = this.j;
String str = this.i;
t.m = evu;
t.e = t.n.getString("advertisingId", "");
if (t.f != 0) {
t.f.y();
}
EBZ ebz = t.d;
String obj = evu.toString();
String str2 = t.e;
DRg dRg = t.l;
ebz.d(obj, str2, dRg.c.K() != null ? dRg.c.K().c : null, str);
EBZ ebz2 = t.d;
ebz2.d(ebz2.i, new C5204bod.RVV(t, b));
this.rootView.setOnTouchListener(new View.OnTouchListener(this) { // from class: o.faL
private HmlCalculatorFragment b;
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
return HmlCalculatorFragment.d(this.b, view);
}
{
this.b = this;
}
});
return inflate;
}
@Override // androidx.fragment.app.Fragment
public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
super.onCreateOptionsMenu(menu, menuInflater);
menuInflater.inflate(R.menu.2131689487, menu);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public boolean onOptionsItemSelected(MenuItem menuItem) {
if (menuItem.getItemId() != R.id.menu_action_help) {
return super.onOptionsItemSelected(menuItem);
}
final T t = this.presenter;
ZI.IeS ieS = new ZI.IeS(t) { // from class: o.boF
private C5204bod c;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).d(this.c.p.a.f());
}
{
this.c = t;
}
};
if (t.f == 0) {
return true;
}
ieS.e(t.f);
return true;
}
@Override // o.InterfaceC9260dgQ
public final void G() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_pending_content, R.string.hml_landing_ribbon_pending_action, new View.OnClickListener(this) { // from class: o.faG
private HmlCalculatorFragment e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.e.presenter.j();
}
{
this.e = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void P() {
atb_(R.drawable.ic_clear, R.string.hml_landing_ribbon_reject_content, R.string.hml_landing_ribbon_reject_action, new View.OnClickListener(this) { // from class: o.faZ
private HmlCalculatorFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.a.presenter.j();
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void D() {
atb_(R.drawable.ic_paid, R.string.hml_landing_ribbon_approve_content, R.string.hml_landing_ribbon_approve_action, new View.OnClickListener(this) { // from class: o.faP
private HmlCalculatorFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.a.presenter.j();
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void B() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_accept_content, R.string.hml_landing_ribbon_accept_action, new View.OnClickListener(this) { // from class: o.fba
private HmlCalculatorFragment c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.c.presenter.a();
}
{
this.c = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void S() {
atb_(R.drawable.ic_paid, R.string.hml_landing_ribbon_success_content, R.string.hml_landing_ribbon_success_action, new View.OnClickListener(this) { // from class: o.faU
private HmlCalculatorFragment e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.e.presenter.g();
}
{
this.e = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public void N() {
atb_(R.drawable.ic_paid, R.string.hml_landing_ribbon_progress_soon_content, R.string.hml_landing_ribbon_progress_action, new View.OnClickListener(this) { // from class: o.faN
private HmlCalculatorFragment c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.c.presenter.c();
}
{
this.c = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void R() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_resubmit_documents_content, R.string.hml_landing_ribbon_resubmit_documents_action, new View.OnClickListener(this) { // from class: o.faJ
private HmlCalculatorFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.a.presenter.b();
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void F() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_verify_indentity_pending_content, R.string.hml_landing_ribbon_verify_indentity_pending_action, new View.OnClickListener(this) { // from class: o.fbd
private HmlCalculatorFragment b;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.b.presenter.d();
}
{
this.b = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void E() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_accept_content, R.string.hml_landing_ribbon_accept_action, new View.OnClickListener(this) { // from class: o.faB
private HmlCalculatorFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlCalculatorFragment.d(this.a);
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void I() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_accept_content, R.string.hml_landing_ribbon_accept_action, new View.OnClickListener(this) { // from class: o.faV
private HmlCalculatorFragment e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlCalculatorFragment.f(this.e);
}
{
this.e = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void H() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_accept_content, R.string.hml_landing_ribbon_accept_action, new View.OnClickListener(this) { // from class: o.faX
private HmlCalculatorFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlCalculatorFragment.j(this.a);
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void J() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_accept_content, R.string.hml_landing_ribbon_accept_action, new View.OnClickListener(this) { // from class: o.faT
private HmlCalculatorFragment e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlCalculatorFragment.p(this.e);
}
{
this.e = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void L() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_accept_content, R.string.hml_landing_ribbon_accept_action, new View.OnClickListener(this) { // from class: o.faM
private HmlCalculatorFragment e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlCalculatorFragment.h(this.e);
}
{
this.e = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void K() {
atb_(R.drawable.ic_overdue, R.string.hml_landing_ribbon_with_aip_content, R.string.hml_landing_ribbon_with_aip_action, new View.OnClickListener(this) { // from class: o.faR
private HmlCalculatorFragment c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlCalculatorFragment.k(this.c);
}
{
this.c = this;
}
});
}
@Override // o.InterfaceC9260dgQ
public final void M() {
atb_(R.drawable.ic_paid, R.string.auto_ribbon_offline_desc, R.string.hml_landing_ribbon_progress_action, new View.OnClickListener(this) { // from class: o.faY
private HmlCalculatorFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.a.presenter.c();
}
{
this.a = this;
}
});
}
/* JADX INFO: Access modifiers changed from: protected */
public final void atb_(int i, int i2, int i3, View.OnClickListener onClickListener) {
this.ribbonStatus.setIcon(getResources().getDrawable(i));
this.ribbonStatus.setContent(getString(i2));
this.ribbonStatus.setAction(getString(i3));
this.ribbonStatus.setActionListener(onClickListener);
this.ribbonStatus.setVisibility(0);
}
private void b(C0786Oo c0786Oo) {
if (getContext() != null) {
if (c0786Oo.c && this.schedulePayment.etAmount.e != 0.0d) {
this.productCataloguePromo.setVisibility(0);
} else {
this.productCataloguePromo.setVisibility(8);
}
this.productCatalogueValidUntil.setText(c0786Oo.a);
if (this.interestOptionsContainer.getChildCount() > 0) {
this.interestOptionsContainer.removeAllViews();
}
for (WS ws : c0786Oo.d) {
BaseProductCatalogueView<?> e = C14819gM.e(ws.c, getContext());
e.setDisplay(ws);
this.interestOptionsContainer.addView(e);
}
}
}
@Override // o.InterfaceC9260dgQ
public final void a(List<String> list, int i) {
CustomSpinnerWithTitle customSpinnerWithTitle = this.startPayment;
customSpinnerWithTitle.setOnCustomSpinnerWithTitleCompletion(new CustomSpinnerWithTitle.LWm(this) { // from class: com.scb.phone.view.fragment.hml.HmlCalculatorFragment.2
private HmlCalculatorFragment a;
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bn_() {
}
{
this.a = this;
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bo_() {
T t = this.a.presenter;
t.k = t.f8580o.d.get(((MYp) this.a.startPayment.c.e()).c.getSelectedItemPosition());
ZI.IeS ieS = new ZI.IeS() { // from class: o.boj
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).d();
}
};
if (t.f != 0) {
ieS.e(t.f);
}
t.a(new C5204bod.Sts(t));
}
});
customSpinnerWithTitle.setItems(list, false, true);
customSpinnerWithTitle.d.setSelection(i);
}
@Override // o.InterfaceC9260dgQ
public final void a(String str) {
this.loanAmount.setErrorMessage(String.format(getString(R.string.hml_landing_minimum_amount_error), str));
this.loanAmount.errorMessage.setVisibility(0);
}
@Override // o.InterfaceC9260dgQ
public final void b(String str) {
this.loanAmount.setErrorMessage(String.format(getString(R.string.hml_landing_maximum_amount_error), str));
this.loanAmount.errorMessage.setVisibility(0);
}
@Override // o.InterfaceC9260dgQ
public final void c() {
this.loanAmount.errorMessage.setVisibility(8);
}
@Override // o.InterfaceC9260dgQ
public final void e(String str) {
this.schedulePayment.setError(getString(R.string.hml_landing_amount_too_low, str));
this.schedulePayment.b(true);
}
@Override // o.InterfaceC9260dgQ
public final void d(String str) {
this.schedulePayment.setError(getString(R.string.hml_landing_amount_too_high, str));
this.schedulePayment.b(true);
}
@Override // o.InterfaceC9260dgQ
public final void b() {
this.schedulePayment.b(false);
}
@Override // o.InterfaceC9260dgQ
public final void C() {
CustomDeltaInputPressed customDeltaInputPressed = this.loanAmount;
customDeltaInputPressed.c = 0.0d;
customDeltaInputPressed.inputValue.setText((CharSequence) null);
AmountEditText amountEditText = customDeltaInputPressed.inputValue;
amountEditText.setHint(amountEditText.c);
}
@Override // o.InterfaceC9260dgQ
public final void z() {
CustomSchedulePayment customSchedulePayment = this.schedulePayment;
customSchedulePayment.etAmount.setText((CharSequence) null);
AmountEditText amountEditText = customSchedulePayment.etAmount;
amountEditText.setHint(amountEditText.c);
this.schedulePayment.b(false);
this.schedulePayment.setExtraInfo("");
this.calculatorResult.setVisibility(8);
}
@Override // o.InterfaceC9260dgQ
public final void A() {
if (this.promotionsContainer.getChildCount() > 0) {
this.promotionsContainer.removeAllViews();
}
}
@Override // o.InterfaceC9260dgQ
public final void d(boolean z) {
this.schedulePayment.setEnabled(z);
this.paymentDay.setEnabled(z);
this.startPayment.setEnabled(z);
}
@Override // o.InterfaceC9260dgQ
public final void a() {
this.btnApply.setEnabled(false);
}
@Override // o.InterfaceC9260dgQ
public final void e() {
this.btnApply.setEnabled(true);
}
@Override // o.InterfaceC9260dgQ
public final void a(int i, int i2, int i3) {
this.paymentDay.setSelectionIndex(i3);
this.startPayment.setSelectionIndex(i2);
this.schedulePayment.spinner.setSelection(i);
}
@Override // o.InterfaceC9260dgQ
public final void b(List<String> list, int i) {
CustomSpinnerWithTitle customSpinnerWithTitle = this.paymentDay;
customSpinnerWithTitle.setOnCustomSpinnerWithTitleCompletion(new CustomSpinnerWithTitle.LWm(this) { // from class: com.scb.phone.view.fragment.hml.HmlCalculatorFragment.3
private HmlCalculatorFragment e;
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bn_() {
}
{
this.e = this;
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomSpinnerWithTitle.LWm
public final void bo_() {
T t = this.e.presenter;
t.g = t.f8580o.a.get(((MYp) this.e.paymentDay.c.e()).c.getSelectedItemPosition());
if (t.a) {
t.a = false;
}
}
});
customSpinnerWithTitle.setItems(list, false, true);
customSpinnerWithTitle.d.setSelection(i);
}
@Override // o.InterfaceC9260dgQ
public final void c(String str) {
this.schedulePayment.setExtraInfo(getString(R.string.hml_landing_minimum_repayment, str));
}
public static /* synthetic */ WX[] b(int i) {
return new WX[i];
}
@OnClick
public void onProductCatalogueClick() {
if (this.productCatalogueContent.getVisibility() == 8) {
this.productCatalogueContent.setVisibility(0);
this.productCatalogueArrow.setImageResource(R.drawable.arrow_up);
} else {
this.productCatalogueContent.setVisibility(8);
this.productCatalogueArrow.setImageResource(R.drawable.arrow_down);
}
}
@Override // o.InterfaceC9260dgQ
public final void b(Double d) {
c("p10x1_landing", new pug("user_type", "etb"), new pug("product_application_amount", this.loanAmount.inputValue.getText().toString()), new pug("monthly_repay_amount", d.toString()), new pug("monthly_billing_date", this.paymentDay.d()));
}
@Override // o.InterfaceC9260dgQ
public final void d(bTI bti) {
String string;
ArrayList arrayList = new ArrayList();
if (bti == bTI.BUSINESS_OWNER) {
arrayList.add(new MU(getString(R.string.hml_business_owner_summary_simulator_about_title), getString(R.string.hml_business_owner_summary_simulator_about_steps)));
string = getString(R.string.hml_business_owner_summary_simulator_about);
} else {
string = getString(R.string.hml_summary_simulator_about);
arrayList.add(new MU(getString(R.string.hml_summary_simulator_about_title), getString(R.string.hml_summary_simulator_about_steps)));
}
startActivity(HmlSimulatorAboutActivity.agr_(getContext(), string, arrayList));
}
@Override // o.InterfaceC9260dgQ
public final void m() {
startActivity(HmlConsentActivity.afE_(requireContext(), OVB.NCB_CONSENT));
}
@Override // o.InterfaceC9260dgQ
public final void d() {
this.calculatorResult.setVisibility(8);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
this.d.removeCallbacks(this.c);
this.presenter.w_();
super.onDestroyView();
}
public static /* synthetic */ boolean d(HmlCalculatorFragment hmlCalculatorFragment, View view) {
C6583cXR.d(view);
hmlCalculatorFragment.tvTitle.setFocusable(true);
hmlCalculatorFragment.tvTitle.setFocusableInTouchMode(true);
hmlCalculatorFragment.tvTitle.requestFocus();
return true;
}
public static /* synthetic */ void d(HmlCalculatorFragment hmlCalculatorFragment) {
T t = hmlCalculatorFragment.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boK
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).i();
}
};
if (t.f != 0) {
ieS.e(t.f);
}
}
public static /* synthetic */ void a(HmlCalculatorFragment hmlCalculatorFragment, boolean z) {
final T t = hmlCalculatorFragment.presenter;
double d = hmlCalculatorFragment.loanAmount.c;
int selectedItemPosition = hmlCalculatorFragment.schedulePayment.spinner.getSelectedItemPosition();
if (z) {
t.h = 0.0d;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boy
@Override // o.ZI.IeS
public final void e(Object obj) {
C5204bod.e((InterfaceC9260dgQ) obj);
}
};
if (t.f != 0) {
ieS.e(t.f);
return;
}
return;
}
t.c = null;
t.i = d;
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.boE
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).c();
}
};
if (t.f != 0) {
ieS2.e(t.f);
}
t.a(t.b.e.get(selectedItemPosition), selectedItemPosition);
if (d < t.b.h) {
ZI.IeS ieS3 = new ZI.IeS(t) { // from class: o.boH
private C5204bod a;
@Override // o.ZI.IeS
public final void e(Object obj) {
C5204bod.c(this.a, (InterfaceC9260dgQ) obj);
}
{
this.a = t;
}
};
if (t.f != 0) {
ieS3.e(t.f);
return;
}
return;
}
if (d > t.b.d) {
ZI.IeS ieS4 = new ZI.IeS(t) { // from class: o.boM
private C5204bod a;
@Override // o.ZI.IeS
public final void e(Object obj) {
C5204bod.a(this.a, (InterfaceC9260dgQ) obj);
}
{
this.a = t;
}
};
if (t.f != 0) {
ieS4.e(t.f);
return;
}
return;
}
t.a(new C5204bod.Sts(t));
}
public static /* synthetic */ void e(HmlCalculatorFragment hmlCalculatorFragment) {
hmlCalculatorFragment.tvTitle.setFocusable(true);
hmlCalculatorFragment.tvTitle.setFocusableInTouchMode(true);
hmlCalculatorFragment.tvTitle.requestFocus();
}
public static /* synthetic */ void c(HmlCalculatorFragment hmlCalculatorFragment, boolean z) {
if (z) {
return;
}
hmlCalculatorFragment.presenter.b(hmlCalculatorFragment.schedulePayment.etAmount.e, true);
}
public static /* synthetic */ void h(HmlCalculatorFragment hmlCalculatorFragment) {
T t = hmlCalculatorFragment.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boT
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).g();
}
};
if (t.f != 0) {
ieS.e(t.f);
}
}
public static /* synthetic */ void j(HmlCalculatorFragment hmlCalculatorFragment) {
T t = hmlCalculatorFragment.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boZ
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).h();
}
};
if (t.f != 0) {
ieS.e(t.f);
}
}
public static /* synthetic */ void f(HmlCalculatorFragment hmlCalculatorFragment) {
T t = hmlCalculatorFragment.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boN
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).m();
}
};
if (t.f != 0) {
ieS.e(t.f);
}
}
public static /* synthetic */ void i(HmlCalculatorFragment hmlCalculatorFragment) {
hmlCalculatorFragment.tvTitle.setFocusable(true);
hmlCalculatorFragment.tvTitle.setFocusableInTouchMode(true);
hmlCalculatorFragment.tvTitle.requestFocus();
}
public static /* synthetic */ void m(HmlCalculatorFragment hmlCalculatorFragment) {
T t = hmlCalculatorFragment.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boL
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).l();
}
};
if (t.f != 0) {
ieS.e(t.f);
}
}
@Override // o.InterfaceC9260dgQ
public final void b(MZ mz) {
this.calculatorResult.setText(mz.b);
this.calculatorResult.setValue(mz.a);
this.calculatorResult.setDescriptionText(mz.c);
this.calculatorResult.setDescriptionAlignToLeft();
this.calculatorResult.scheduleFeeText.setVisibility(0);
this.calculatorResult.setVisibility(0);
if (mz.d != null && getContext() != null) {
if (this.promotionsContainer.getChildCount() > 0) {
this.promotionsContainer.removeAllViews();
}
YKU yku = new YKU(mz.d);
for (WX wx : (WX[]) new YKU(yku.a, new GEP(yku.b, new Jel() { // from class: o.faS
@Override // o.Jel
public final boolean e(Object obj) {
boolean z;
z = ((WX) obj).a;
return z;
}
})).d(new utN() { // from class: o.faW
@Override // o.utN
public final Object d(int i) {
return HmlCalculatorFragment.b(i);
}
})) {
TierPricingPromotionView tierPricingPromotionView = new TierPricingPromotionView(getContext());
tierPricingPromotionView.setDisplay(wx);
this.promotionsContainer.addView(tierPricingPromotionView);
}
}
if (mz.e != null) {
b(mz.e);
}
}
@Override // o.InterfaceC9260dgQ
public final void a(C0738Nl c0738Nl, bTI bti) {
this.tvTitle.setText(c0738Nl.g);
this.tvSubtitle.setText(c0738Nl.f);
if (!c0738Nl.c.isEmpty()) {
Picasso.d().e(c0738Nl.c).aBu_(this.background, null);
}
this.loanAmount.setOnFocusLostListener(new View.OnFocusChangeListener(this) { // from class: o.fbb
private HmlCalculatorFragment c;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
HmlCalculatorFragment.a(this.c, z);
}
{
this.c = this;
}
}, false);
this.loanAmount.setOnClickInputAmountListener(new View.OnClickListener(this) { // from class: o.fbe
private HmlCalculatorFragment d;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
r1.d.removeCallbacks(this.d.c);
}
{
this.d = this;
}
});
this.loanAmount.setMaxValue(c0738Nl.d);
this.loanAmount.setMinValue(c0738Nl.h);
this.loanAmount.setDelta(c0738Nl.i);
this.loanAmount.container.setBackgroundResource(R.color.f14042131100912);
this.loanAmount.setOnDismissKeyboardListener(new CustomDeltaInput.RVV(this) { // from class: o.fbc
private HmlCalculatorFragment e;
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.RVV
public final void aP_() {
HmlCalculatorFragment.e(this.e);
}
{
this.e = this;
}
});
this.loanAmount.setOnKeyboardDoneListener(new CustomDeltaInput.LWm(this) { // from class: o.faI
private HmlCalculatorFragment b;
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.LWm
public final void b() {
HmlCalculatorFragment.r(this.b);
}
{
this.b = this;
}
});
this.loanAmount.setOnIncrementChangeListener(new CustomDeltaInput.Sts(this) { // from class: com.scb.phone.view.fragment.hml.HmlCalculatorFragment.5
private HmlCalculatorFragment d;
{
this.d = this;
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void j() {
HmlCalculatorFragment.u(this.d);
}
@Override // com.scb.phone.view.custom.common.CustomDeltaInput.Sts
public final void h() {
HmlCalculatorFragment.u(this.d);
}
});
this.schedulePayment.setEnabled(false);
this.schedulePayment.setInstallment(c0738Nl.e);
this.schedulePayment.setListener(new CustomSchedulePayment.IeS(this) { // from class: com.scb.phone.view.fragment.hml.HmlCalculatorFragment.1
private HmlCalculatorFragment b;
{
this.b = this;
}
@Override // com.scb.phone.view.custom.common.CustomSchedulePayment.IeS
public final void d(C0738Nl.IeS ieS) {
final T t = this.b.presenter;
t.c = null;
t.f8580o = ieS;
t.g = ieS.e;
t.k = ieS.c;
t.h = 0.0d;
ZI.IeS ieS2 = new ZI.IeS(t) { // from class: o.bol
private C5204bod a;
@Override // o.ZI.IeS
public final void e(Object obj) {
C5204bod.e(this.a, (InterfaceC9260dgQ) obj);
}
{
this.a = t;
}
};
if (t.f != 0) {
ieS2.e(t.f);
}
}
@Override // com.scb.phone.view.custom.common.CustomSchedulePayment.IeS
public final void d() {
HmlCalculatorFragment.x(this.b);
}
});
this.schedulePayment.setOnFocusChangeListener(new View.OnFocusChangeListener(this) { // from class: o.faH
private HmlCalculatorFragment b;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
HmlCalculatorFragment.c(this.b, z);
}
{
this.b = this;
}
});
if (c0738Nl.a) {
this.startPayment.setVisibility(8);
} else {
this.startPayment.setIconListener(new View.OnClickListener(this) { // from class: o.faK
private HmlCalculatorFragment a;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlCalculatorFragment.m(this.a);
}
{
this.a = this;
}
});
}
b(c0738Nl.j);
if (bti == bTI.BUSINESS_OWNER) {
this.consumerInfoItem2ImageText.setVisibility(8);
this.businessOwnerInfoItem2ImageText.setVisibility(0);
} else {
this.consumerInfoItem2ImageText.setVisibility(0);
this.businessOwnerInfoItem2ImageText.setVisibility(8);
}
}
static /* synthetic */ void x(HmlCalculatorFragment hmlCalculatorFragment) {
hmlCalculatorFragment.tvTitle.setFocusable(true);
hmlCalculatorFragment.tvTitle.setFocusableInTouchMode(true);
hmlCalculatorFragment.tvTitle.requestFocus();
}
@OnClick
public void onApply() {
final T t = this.presenter;
ZI.IeS ieS = new ZI.IeS(t) { // from class: o.boz
private C5204bod a;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).b(Double.valueOf(this.a.h));
}
{
this.a = t;
}
};
if (t.f != 0) {
ieS.e(t.f);
}
t.a(new C5204bod.LWm(t, (byte) 0));
}
public static /* synthetic */ void p(HmlCalculatorFragment hmlCalculatorFragment) {
T t = hmlCalculatorFragment.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boC
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).n();
}
};
if (t.f != 0) {
ieS.e(t.f);
}
}
public static /* synthetic */ void k(HmlCalculatorFragment hmlCalculatorFragment) {
T t = hmlCalculatorFragment.presenter;
C5189boO c5189boO = new C5189boO();
if (t.f != 0) {
c5189boO.e(t.f);
}
}
public static /* synthetic */ void r(HmlCalculatorFragment hmlCalculatorFragment) {
hmlCalculatorFragment.tvTitle.setFocusable(true);
hmlCalculatorFragment.tvTitle.setFocusableInTouchMode(true);
hmlCalculatorFragment.tvTitle.requestFocus();
}
@OnClick
public void onProductDetails() {
T t = this.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.boV
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9260dgQ) obj).d(OVB.SALE_SHEET);
}
};
if (t.f != 0) {
ieS.e(t.f);
}
}
static /* synthetic */ void u(HmlCalculatorFragment hmlCalculatorFragment) {
hmlCalculatorFragment.d.removeCallbacks(hmlCalculatorFragment.c);
hmlCalculatorFragment.d.postDelayed(hmlCalculatorFragment.c, 2000L);
}
}