what-the-bank/sources/com/scb/phone/view/fragment/purchase/PurchaseDepositInputFragmen...

894 lines
34 KiB
Java

package com.scb.phone.view.fragment.purchase;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.google.android.material.textfield.TextInputLayout;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.PreLoadCheckActivity;
import com.scb.phone.view.activity.scheduledtransaction.ScheduleLandingActivity;
import com.scb.phone.view.activity.transferandpay.billpayment.BillPaymentReviewActivity;
import com.scb.phone.view.activity.transferandpay.topup.TopUpReviewActivity;
import com.scb.phone.view.activity.transferandpay.transfer.TransferGiftingInputActivity;
import com.scb.phone.view.activity.transferandpay.transfer.TransferReviewActivity;
import com.scb.phone.view.custom.common.AmountEditText;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.custom.common.CustomGiftingView;
import com.scb.phone.view.custom.common.CustomScheduleView;
import com.scb.phone.view.custom.common.DefaultButton;
import com.scb.phone.view.custom.common.NoteEditText;
import com.scb.phone.view.fragment.purchase.PurchaseDepositInputFragment;
import java.text.NumberFormat;
import java.util.List;
import java.util.concurrent.TimeUnit;
import o.AbstractC13163fSk;
import o.C1168Xb;
import o.C1189Xo;
import o.C1193Xr;
import o.C1203Xy;
import o.C1225Yk;
import o.C1226Yl;
import o.C1249Yx;
import o.C12525ezp;
import o.C12891fKc;
import o.C13080fQ;
import o.C13417fZt;
import o.C14589fw;
import o.C15602gz;
import o.C6583cXR;
import o.C7869cwV;
import o.C7871cwX;
import o.EnumC8951daY;
import o.InterfaceC12851fIz;
import o.InterfaceC13391fZD;
import o.InterfaceC8972dat;
import o.MBB;
import o.NZv;
import o.PWw;
import o.REU;
import o.SBO;
import o.VN;
import o.WW;
import o.ZI;
import o.cXG;
import o.fLM;
import o.fRR;
import o.fSJ;
import o.fSQ;
import o.gHK;
import o.gjJ;
import o.nMh;
import o.qhK;
import o.tLY;
/* loaded from: classes5.dex */
public class PurchaseDepositInputFragment extends Hilt_PurchaseDepositInputFragment implements InterfaceC8972dat.IeS, InterfaceC12851fIz {
@BindView
protected LinearLayout billDetail;
@BindView
protected DefaultButton buttonReview;
private double c;
@BindView
protected TextView contactAccount;
@BindView
protected TextView contactAccountNumber;
@BindView
protected CustomGiftingView customGiftingView;
@BindView
protected CustomScheduleView customScheduleView;
private boolean d;
@BindView
protected AmountEditText editAmount;
private String f;
private C12525ezp g;
@BindView
protected LinearLayout giftLayout;
private boolean h;
private String i;
@BindView
protected ImageView imageIcon;
@BindView
LinearLayout inputContent;
@BindView
protected TextInputLayout inputLayout;
@BindView
protected TextView invoiceAccount;
@BindView
protected TextView invoiceAccountNumber;
private boolean j;
private VN k;
private fLM l;
private fSJ m;
@BindView
protected RecyclerView mRecyclerView;
private C1203Xy n;
@BindView
protected NoteEditText noteEditText;
@BindView
protected LinearLayout noteLayout;
@InterfaceC13391fZD
public C7871cwX purchaseDepositInputPresenter;
@BindView
protected TextView refThreeId;
@BindView
protected TextView refThreeLabel;
@BindView
protected LinearLayout refThreeLayout;
@BindView
protected LinearLayout refTwoLayout;
@BindView
protected TextView remainingLimit;
@BindView
protected TextView remainingLimitError;
@BindView
protected LinearLayout remainingLimitLinearLayout;
@BindView
protected LinearLayout scheduleLayout;
@BindView
protected TextView textNumber;
@BindView
protected TextView textRemainingLimit;
@BindView
protected TextView textTitle;
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC9620dnF.IeS
public final void aI_() {
while (true) {
}
}
public static PurchaseDepositInputFragment b(C1203Xy c1203Xy, boolean z, boolean z2) {
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN", c1203Xy);
bundle.putBoolean("com.scb.phone.EXTRA_IS_POINT_ENABLE", z);
bundle.putBoolean("com.scb.phone.IS_HIDE_POINT", z2);
PurchaseDepositInputFragment purchaseDepositInputFragment = new PurchaseDepositInputFragment();
purchaseDepositInputFragment.setArguments(bundle);
return purchaseDepositInputFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C1203Xy c1203Xy;
View inflate = layoutInflater.inflate(R.layout.2131559844, viewGroup, false);
ButterKnife.c(this, inflate);
this.purchaseDepositInputPresenter.e((C7871cwX) this);
if (getArguments() != null && getArguments().getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN") != null) {
this.n = (C1203Xy) getArguments().getParcelable("com.scb.phone.TransferTabFragment.EXTRA_BILL_SCAN");
this.h = getArguments().getBoolean("com.scb.phone.EXTRA_IS_POINT_ENABLE");
this.j = getArguments().getBoolean("com.scb.phone.IS_HIDE_POINT");
}
final C7871cwX c7871cwX = this.purchaseDepositInputPresenter;
C1203Xy c1203Xy2 = this.n;
final gHK al = getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) getActivity()).al() : null;
boolean z = this.h;
boolean z2 = this.j;
c7871cwX.a = c1203Xy2;
c7871cwX.h = z;
c7871cwX.i = z2;
if (c7871cwX.f != 0 && (c1203Xy = c7871cwX.a) != null) {
c7871cwX.e = c1203Xy.a;
ZI.IeS ieS = new ZI.IeS(c7871cwX, al) { // from class: o.cwY
private gHK b;
private C7871cwX e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7871cwX.b(this.e, this.b, (InterfaceC8972dat.IeS) obj);
}
{
this.e = c7871cwX;
this.b = al;
}
};
if (c7871cwX.f != 0) {
ieS.e(c7871cwX.f);
}
}
this.customScheduleView.setOnEditClickListener(this);
this.buttonReview.setButtonEnabled(false);
fLM flm = new fLM(this.editAmount, this.inputLayout, 9.9999999999E8d, 9.9999999999E8d, 0.0d, getResources().getString(R.string.error_limit), getResources().getString(R.string.not_enough_funds_on_selected_account), getResources().getString(R.string.invalid_amount_transfer_input));
this.l = flm;
this.editAmount.setCurrencyFormattingTextWatcher(flm);
this.editAmount.setOnPasteListener(new AmountEditText.HBt());
this.editAmount.setOnAmountChangeListener(new AmountEditText.RVV(this) { // from class: com.scb.phone.view.fragment.purchase.PurchaseDepositInputFragment.1
private PurchaseDepositInputFragment a;
{
this.a = this;
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void b(double d) {
PurchaseDepositInputFragment.b(this.a, d);
}
@Override // com.scb.phone.view.custom.common.AmountEditText.RVV
public final void a() {
this.a.f();
this.a.aN_();
}
});
return inflate;
}
public final void f() {
double d = this.c;
double d2 = 0.0d;
if (d == 0.0d) {
this.inputLayout.setError(getString(R.string.edit_favourite_empty));
this.inputLayout.setErrorEnabled(true);
this.buttonReview.setButtonEnabled(false);
return;
}
C7871cwX c7871cwX = this.purchaseDepositInputPresenter;
WW ww = c7871cwX.c;
if (ww != null && ww.d != null) {
d2 = c7871cwX.c.d.doubleValue();
}
if (d > d2) {
this.inputLayout.setError(getString(R.string.not_enough_funds_on_selected_account));
this.inputLayout.setErrorEnabled(true);
this.buttonReview.setButtonEnabled(false);
} else {
this.inputLayout.setError(null);
this.inputLayout.setErrorEnabled(false);
this.buttonReview.setButtonEnabled(this.purchaseDepositInputPresenter.d(this.editAmount.getText().toString()));
}
}
/* JADX WARN: Multi-variable type inference failed */
@OnClick
public void onReviewButtonClick() {
C12525ezp c12525ezp;
int i;
C7871cwX c7871cwX = this.purchaseDepositInputPresenter;
String obj = this.noteEditText.mNoteEditText.getText().toString();
if (c7871cwX.f != 0) {
if (TextUtils.isEmpty(obj) || ((Boolean) C6583cXR.c(new Object[]{obj}, -1032102340, 1032102340, (int) System.currentTimeMillis())).booleanValue()) {
aN_();
y();
char c = 65535;
if (this.editAmount.getText() == null && ((i = (c12525ezp = this.g).b) < 0 || c12525ezp.getItemViewType(i) == 2 || c12525ezp.b == -1)) {
return;
}
double doubleValue = (this.d ? this.g.e() : C6583cXR.c(this.editAmount.getText().toString())).doubleValue();
this.c = doubleValue;
C7871cwX c7871cwX2 = this.purchaseDepositInputPresenter;
String str = this.i;
String obj2 = this.noteEditText.mNoteEditText.getText().toString();
VN vn = this.k;
String str2 = c7871cwX2.a.i;
str2.hashCode();
int hashCode = str2.hashCode();
if (hashCode != 2126) {
if (hashCode != 2560) {
if (hashCode != 2684) {
if (hashCode != 79006) {
if (hashCode != 79440) {
if (hashCode == 79564 && str2.equals("PTP")) {
c = 5;
}
} else if (str2.equals("PPP")) {
c = 4;
}
} else if (str2.equals("PBP")) {
c = 3;
}
} else if (str2.equals("TP")) {
c = 2;
}
} else if (str2.equals("PP")) {
c = 1;
}
} else if (str2.equals("BP")) {
c = 0;
}
if (c != 0) {
if (c != 1) {
if (c != 2) {
if (c != 3) {
if (c != 4) {
if (c != 5) {
return;
}
}
}
}
if (c7871cwX2.f != 0) {
C7869cwV c7869cwV = new C7869cwV();
if (c7871cwX2.f != 0) {
c7869cwV.e(c7871cwX2.f);
}
C1226Yl a = c7871cwX2.l.a(c7871cwX2.g);
C13080fQ c2 = C13080fQ.c();
c2.e = c7871cwX2.c.s;
c2.g = c7871cwX2.a.j;
c2.c = C15602gz.e(doubleValue);
c2.a = "TOPUP";
c2.b = Integer.parseInt(c7871cwX2.a.a);
c2.i = c7871cwX2.a.f8457o;
boolean b = gjJ.b((CharSequence) obj2);
V v = obj2;
if (b) {
v = 0;
}
c2.d.b = v;
c2.h = vn != null ? new NZv(vn.c, cXG.a(vn.b), cXG.a(vn.d), vn.e) : null;
c7871cwX2.m.b(c2);
tLY tly = c7871cwX2.m;
tly.d(tly.i, new C7871cwX.HBt(c7871cwX2, a, vn));
return;
}
return;
}
if (c7871cwX2.f != 0) {
C7869cwV c7869cwV2 = new C7869cwV();
if (c7871cwX2.f != 0) {
c7869cwV2.e(c7871cwX2.f);
}
PWw a2 = C7871cwX.a(C7871cwX.a(c7871cwX2.a.a));
C14589fw c14589fw = new C14589fw();
c14589fw.l = C6583cXR.d(qhK.PROMPTPAY);
c14589fw.b = c7871cwX2.c.s;
c14589fw.a = c7871cwX2.c.p.d();
c14589fw.h = (String) C6583cXR.c(new Object[]{a2}, 817056545, -817056542, (int) System.currentTimeMillis());
c14589fw.j = c7871cwX2.a.a;
c14589fw.c = C15602gz.e(doubleValue);
c14589fw.e.b = gjJ.b((CharSequence) obj2) ? 0 : obj2;
c7871cwX2.f8669o.d(c7871cwX2.f8669o.a.c(c14589fw), new C7871cwX.tOB(c7871cwX2, a2, c14589fw, str, obj2));
return;
}
return;
}
if (c7871cwX2.f != 0) {
C7869cwV c7869cwV3 = new C7869cwV();
if (c7871cwX2.f != 0) {
c7869cwV3.e(c7871cwX2.f);
}
SBO c3 = SBO.c();
c3.d = c7871cwX2.c.s;
c3.e = c7871cwX2.a.a;
c3.c = C15602gz.e(doubleValue);
c3.t = SBO.c(MBB.SCAN);
c3.j = "";
String str3 = c7871cwX2.a.j;
if (str3 == null) {
str3 = "";
}
c3.w = str3;
String str4 = c7871cwX2.a.l;
c3.y = str4 != null ? str4 : "";
c3.v = c7871cwX2.a.m;
c3.z = c7871cwX2.a.f8457o;
c3.a.b = gjJ.b((CharSequence) obj2) ? 0 : obj2;
c3.A = vn != null ? new NZv(vn.c, cXG.a(vn.b), cXG.a(vn.d), vn.e) : null;
c7871cwX2.b.d(c3);
REU reu = c7871cwX2.b;
reu.d(reu.i, new C7871cwX.Sts(c7871cwX2, c7871cwX2.a.j, c7871cwX2.a.l, c7871cwX2.a.m, vn, doubleValue, obj2));
return;
}
return;
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.cwS
@Override // o.ZI.IeS
public final void e(Object obj3) {
((InterfaceC8972dat.IeS) obj3).h();
}
};
if (c7871cwX.f != 0) {
ieS.e(c7871cwX.f);
}
}
}
@Override // o.InterfaceC8972dat.HBt
public final void c(String str) {
C12891fKc.azg_(getContext(), nMh.getDrawable(getContext(), R.drawable.biller_place_holder), this.imageIcon, str, getResources().getDimensionPixelOffset(R.dimen.f15222131165286), nMh.getColor(getContext(), R.color.f3412131099849));
}
@Override // o.InterfaceC8972dat.HBt
public final void f(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
this.textTitle.setText(str);
this.textTitle.setVisibility(0);
}
@Override // o.InterfaceC8972dat.HBt
public final void h(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
this.textNumber.setText(str);
this.textNumber.setVisibility(0);
}
@Override // o.InterfaceC8972dat.HBt
public final void b(String str) {
this.inputLayout.setVisibility(0);
this.editAmount.setText(str);
}
@Override // o.InterfaceC8972dat.HBt
public final void h() {
this.noteEditText.d();
}
@Override // o.InterfaceC8972dat.IeS
public final void b(String str, String str2, int i) {
this.imageIcon.setImageResource(i == 10 ? R.drawable.icon_prompt_pay_mobile : R.drawable.icon_prompt_pay_cid);
this.textNumber.setVisibility(0);
this.textNumber.setText(str);
this.inputLayout.setVisibility(0);
this.editAmount.setText(str2);
boolean z = str2 != null;
this.giftLayout.setVisibility(0);
this.customGiftingView.setLayoutEnabled(z);
}
@Override // o.InterfaceC8972dat.IeS
public final void a(C1193Xr c1193Xr) {
if (c1193Xr == null) {
return;
}
C12891fKc.azg_(getContext(), nMh.getDrawable(getContext(), R.drawable.biller_place_holder), this.imageIcon, c1193Xr.c(), getResources().getDimensionPixelOffset(R.dimen.f15222131165286), nMh.getColor(getContext(), R.color.f3412131099849));
this.textTitle.setVisibility(0);
this.textTitle.setText(c1193Xr.e());
this.textNumber.setVisibility(0);
this.textNumber.setText(c1193Xr.h);
this.billDetail.setVisibility(0);
this.contactAccount.setText(c1193Xr.F);
this.contactAccountNumber.setText(c1193Xr.K);
}
@Override // o.InterfaceC8972dat.IeS
public final void d(C1193Xr c1193Xr) {
this.refTwoLayout.setVisibility(0);
this.invoiceAccount.setText(c1193Xr.M);
this.invoiceAccountNumber.setText(c1193Xr.J);
}
@Override // o.InterfaceC8972dat.IeS
public final void e(C1193Xr c1193Xr) {
this.refThreeLayout.setVisibility(0);
this.refThreeLabel.setText(c1193Xr.L);
this.refThreeId.setText(c1193Xr.N);
}
@Override // o.InterfaceC8972dat.IeS
public final void b(boolean z) {
this.editAmount.setEnabled(z);
}
@Override // o.InterfaceC8972dat.IeS
public final void j() {
super.v();
d(false);
}
@Override // o.InterfaceC8972dat.IeS
public final void e() {
super.aq_();
}
@Override // o.InterfaceC8972dat.IeS
public final void b() {
this.textRemainingLimit.setText(R.string.limit_not_available);
d(true);
}
private void d(boolean z) {
this.remainingLimitLinearLayout.setVisibility(z ? 0 : 8);
this.remainingLimitError.setVisibility(z ? 8 : 0);
this.textRemainingLimit.setVisibility(z ? 0 : 8);
this.remainingLimit.setVisibility(z ? 0 : 8);
}
@Override // o.InterfaceC8972dat.IeS
public final void e(String str) {
this.i = str;
this.textRemainingLimit.setText(getString(R.string.remaining_transfer_limit, str));
d(true);
}
@Override // o.InterfaceC8972dat.IeS
public final void a(String str) {
this.i = str;
this.textRemainingLimit.setText(getString(R.string.limit_top_up_remaining, str));
d(true);
}
@Override // o.InterfaceC8972dat.IeS
public final void awW_(String str, String str2, DialogInterface.OnClickListener onClickListener) {
CustomDialog b = CustomDialog.b(getContext());
if (gjJ.a(str)) {
b.mTitleTextView.setVisibility(0);
b.mTitleTextView.setText(str);
}
if (gjJ.a(str2)) {
b.mTextTextView.setVisibility(0);
b.mTextTextView.setText(str2);
}
((CustomDialog) CustomDialog.e(new Object[]{b.aoT_(R.string.ok, onClickListener), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.fvZ
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
}})).show();
}
@Override // o.InterfaceC8972dat.IeS
public final void a(final C1189Xo c1189Xo) {
CustomDialog c = CustomDialog.b(getContext()).c(R.string.credit_card_alert_information_title);
String string = getString(R.string.credit_card_alert_information_description);
if (gjJ.a(string)) {
c.mTextTextView.setVisibility(0);
c.mTextTextView.setText(string);
}
((CustomDialog) CustomDialog.e(new Object[]{c.aoT_(R.string.ok, new DialogInterface.OnClickListener(this, c1189Xo) { // from class: o.fvW
private C1189Xo b;
private PurchaseDepositInputFragment d;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
this.d.c(this.b);
}
{
this.d = this;
this.b = c1189Xo;
}
}), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.fvY
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
}})).show();
}
@Override // o.InterfaceC8972dat.IeS
public final void e(C1225Yk c1225Yk, C1226Yl c1226Yl) {
b(c1225Yk, c1226Yl);
String str = c1226Yl.h;
if (!C6583cXR.q(str)) {
this.editAmount.setText(str);
}
if (c1226Yl.l) {
this.editAmount.setEnabled(C6583cXR.q(str));
}
}
@Override // o.InterfaceC8972dat.IeS
public final void a(C1189Xo c1189Xo, boolean z) {
String d = this.purchaseDepositInputPresenter.d(this.k, this.h, this.j);
c1189Xo.e(d);
String str = this.purchaseDepositInputPresenter.c.s;
c1189Xo.X = str;
C1189Xo a = c1189Xo.a(C6583cXR.b(str, z));
a.S = str;
a.Q = C6583cXR.VS_(getContext(), R.drawable.bankicon_scb);
a.t = this.textNumber.getText().toString();
C1168Xb.LWm lWm = new C1168Xb.LWm();
lWm.b = C6583cXR.c(NumberFormat.getCurrencyInstance()).format(this.c);
a.j = new C1168Xb(lWm, (byte) 0);
a.aH = this.noteEditText.mNoteEditText.getText().toString();
Intent intent = new Intent(getContext(), (Class<?>) TopUpReviewActivity.class);
intent.putExtra("com.scb.phone.EXTRA_REVIEW", c1189Xo);
if (d.equals("PURCHASE_TOPUP_FUNCTION")) {
intent.putExtra("com.scb.phone.TransferTabFragment.REVIEW_TITLE", getString(R.string.purchase_review_title));
}
intent.putExtra("com.scb.phone.analytics.KEY_EVENT_START", "purchase_review");
intent.putExtra("com.scb.phone.analytics.KEY_EVENT_FINISH", "purchase_slip");
intent.putExtra("subtype", "topup");
startActivity(intent);
}
@Override // o.InterfaceC8972dat.IeS
public final void c(List<Integer> list) {
this.mRecyclerView.setVisibility(0);
this.inputLayout.setVisibility(8);
this.d = true;
this.editAmount.setImeOptions(6);
getContext();
this.mRecyclerView.setLayoutManager(new LinearLayoutManager(0, false));
C12525ezp c12525ezp = new C12525ezp(list, Double.valueOf(this.purchaseDepositInputPresenter.c != null ? this.purchaseDepositInputPresenter.c.d.doubleValue() : 0.0d));
this.g = c12525ezp;
this.mRecyclerView.setAdapter(c12525ezp);
this.m = AbstractC13163fSk.interval(500L, TimeUnit.MILLISECONDS).subscribeOn(C13417fZt.c()).observeOn(fRR.e()).subscribe(new fSQ(this) { // from class: o.fwd
private PurchaseDepositInputFragment d;
@Override // o.fSQ
public final void c(Object obj) {
r0.buttonReview.setButtonEnabled(r2.g.e() != null ? r0.purchaseDepositInputPresenter.d(String.valueOf(this.d.g.e())) : false);
}
{
this.d = this;
}
}, new fSQ() { // from class: o.fwc
@Override // o.fSQ
public final void c(Object obj) {
guQ.a((Throwable) obj);
}
});
}
@OnClick
public void onGiftingClick() {
final C7871cwX c7871cwX = this.purchaseDepositInputPresenter;
final double doubleValue = C6583cXR.c(this.editAmount.getText().toString()).doubleValue();
ZI.IeS ieS = new ZI.IeS(c7871cwX, doubleValue) { // from class: o.cwW
private double b;
private C7871cwX d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7871cwX.e(this.d, this.b, (InterfaceC8972dat.IeS) obj);
}
{
this.d = c7871cwX;
this.b = doubleValue;
}
};
if (c7871cwX.f != 0) {
ieS.e(c7871cwX.f);
}
}
@Override // o.InterfaceC8972dat.IeS
public final void a() {
this.customGiftingView.setLayoutEnabled(true);
}
@Override // o.InterfaceC8972dat.IeS
public final void d() {
this.customGiftingView.setLayoutEnabled(false);
}
@Override // o.InterfaceC8972dat.IeS
public final void c() {
this.giftLayout.setVisibility(8);
}
@Override // o.InterfaceC8972dat.IeS
public final void a(C1249Yx c1249Yx) {
TransferGiftingInputActivity.d(getActivity(), c1249Yx);
}
@Override // o.InterfaceC12851fIz
public final void r() {
startActivityForResult(new Intent(getActivity(), (Class<?>) ScheduleLandingActivity.class), 100);
}
@Override // o.InterfaceC8972dat.IeS
public final void i() {
this.scheduleLayout.setVisibility(0);
}
@Override // o.InterfaceC8972dat.IeS
public final void c(boolean z) {
Bundle bundle = new Bundle();
bundle.putBoolean("com.scb.phone.IS_ISO20022", z);
requireActivity().getSupportFragmentManager().yM_("com.scb.phone.REQUEST_HANDLE_TAB_POINT_EVENT", bundle);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 100) {
if (i2 != -1) {
if (i2 == 1) {
if (this.f != null) {
this.textRemainingLimit.setText(getString(R.string.bill_payment_limit, this.i));
}
this.customScheduleView.d();
this.noteLayout.setVisibility(0);
this.k = null;
return;
}
return;
}
this.k = (VN) intent.getParcelableExtra("SCHEDULE_DETAIL");
if (this.noteLayout.getVisibility() == 0) {
this.noteLayout.setVisibility(8);
if (!this.noteEditText.mNoteEditText.getText().toString().isEmpty()) {
FragmentActivity activity = getActivity();
String string = getString(R.string.topup_input_010);
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
if (getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), activity, Integer.valueOf(R.id.fragment_container_bill_payment_tabs), string, enumC8951daY}, 855668825, -855668822, R.id.fragment_container_bill_payment_tabs);
}
this.noteEditText.mNoteEditText.setText("");
}
}
String str = this.f;
if (str != null) {
this.textRemainingLimit.setText(getString(R.string.schedule_bill_payment_limit, str));
}
this.customScheduleView.setScheduleView(this.k, true);
fLM flm = this.editAmount.a;
if (flm != null) {
flm.a(Double.MAX_VALUE);
}
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
super.onDestroy();
fSJ fsj = this.m;
if (fsj == null || fsj.isDisposed()) {
return;
}
this.m.dispose();
}
@Override // o.InterfaceC8972dat.IeS
public final void c(List<Integer> list, String str) {
c(list);
C12525ezp c12525ezp = this.g;
c12525ezp.b = c12525ezp.e.indexOf(Integer.valueOf(C6583cXR.c(str).intValue()));
c12525ezp.notifyDataSetChanged();
}
@Override // o.InterfaceC8972dat.IeS
public final void c(C1189Xo c1189Xo, qhK qhk) {
String d = this.purchaseDepositInputPresenter.d(this.k, this.h, this.j);
c1189Xo.e(d);
Intent intent = new Intent(getContext(), (Class<?>) TransferReviewActivity.class);
intent.putExtra("com.scb.phone.EXTRA_REVIEW", c1189Xo);
intent.putExtra("com.scb.phone.EXTRA_TRANSFER_TYPE", qhk);
if (d.equals("PURCHASE_TRANSFER_FUNCTION")) {
intent.putExtra("com.scb.phone.TransferTabFragment.REVIEW_TITLE", getString(R.string.purchase_review_title));
}
intent.putExtra("com.scb.phone.analytics.KEY_EVENT_START", "purchase_review");
intent.putExtra("com.scb.phone.analytics.KEY_EVENT_FINISH", "purchase_slip");
intent.putExtra("subtype", "transfer");
startActivity(intent);
}
@Override // o.InterfaceC8972dat.HBt
public final void c(C1189Xo c1189Xo) {
Intent intent = new Intent(getActivity(), (Class<?>) BillPaymentReviewActivity.class);
intent.putExtra("com.scb.phone.EXTRA_REVIEW", c1189Xo);
if (c1189Xo.j().equals("PURCHASE_BILL_PAYMENT_FUNCTION")) {
intent.putExtra("com.scb.phone.TransferTabFragment.REVIEW_TITLE", getString(R.string.purchase_review_title));
}
intent.putExtra("com.scb.phone.analytics.KEY_EVENT_START", "purchase_review");
intent.putExtra("com.scb.phone.analytics.KEY_EVENT_FINISH", "purchase_slip");
intent.putExtra("subtype", "billpay");
startActivity(intent);
}
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC6638cYp
public final void v() {
super.v();
this.inputContent.setVisibility(8);
}
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC6638cYp
public final void aq_() {
super.aq_();
this.inputContent.setVisibility(0);
}
public static /* synthetic */ void d(PurchaseDepositInputFragment purchaseDepositInputFragment, boolean z) {
if (z || !C6583cXR.q(purchaseDepositInputFragment.editAmount.getText().toString())) {
return;
}
purchaseDepositInputFragment.editAmount.setText("");
}
static /* synthetic */ void b(PurchaseDepositInputFragment purchaseDepositInputFragment, double d) {
purchaseDepositInputFragment.c = d;
purchaseDepositInputFragment.buttonReview.setButtonEnabled(purchaseDepositInputFragment.purchaseDepositInputPresenter.d(purchaseDepositInputFragment.editAmount.getText().toString()));
final C7871cwX c7871cwX = purchaseDepositInputFragment.purchaseDepositInputPresenter;
final String obj = purchaseDepositInputFragment.editAmount.getText().toString();
ZI.IeS ieS = new ZI.IeS(c7871cwX, obj) { // from class: o.cxb
private C7871cwX d;
private String e;
@Override // o.ZI.IeS
public final void e(Object obj2) {
C7871cwX.d(this.d, this.e, (InterfaceC8972dat.IeS) obj2);
}
{
this.d = c7871cwX;
this.e = obj;
}
};
if (c7871cwX.f != 0) {
ieS.e(c7871cwX.f);
}
}
@Override // o.InterfaceC8972dat.IeS
public final void b(C1225Yk c1225Yk, C1226Yl c1226Yl) {
this.d = false;
String str = c1225Yk.d;
this.inputLayout.setVisibility(0);
this.editAmount.setCustomHint(str, this.inputLayout);
this.editAmount.setHint(str);
this.editAmount.setOnFocusChangeListener(new View.OnFocusChangeListener(this) { // from class: o.fvV
private PurchaseDepositInputFragment e;
@Override // android.view.View.OnFocusChangeListener
public final void onFocusChange(View view, boolean z) {
PurchaseDepositInputFragment.d(this.e, z);
}
{
this.e = this;
}
});
fLM flm = new fLM(this.editAmount, this.inputLayout, c1225Yk.b.doubleValue(), this.purchaseDepositInputPresenter.c.d.doubleValue(), c1225Yk.c.doubleValue(), getResources().getString(R.string.error_limit), getResources().getString(R.string.not_enough_funds_on_selected_account), getResources().getString(R.string.invalid_amount_transfer_input));
this.l = flm;
this.editAmount.setCurrencyFormattingTextWatcher(flm);
if (!c1226Yl.a || C6583cXR.q(c1226Yl.h)) {
return;
}
this.editAmount.setText(c1226Yl.h);
}
public final void b(WW ww) {
this.purchaseDepositInputPresenter.c = ww;
this.buttonReview.setButtonEnabled(this.purchaseDepositInputPresenter.d(this.editAmount.getText().toString()));
fLM flm = this.l;
if (flm != null) {
flm.a(ww.d.doubleValue());
}
}
@Override // o.InterfaceC8972dat.IeS
public final void d(String str) {
this.f = str;
}
}