what-the-bank/sources/com/scb/phone/view/fragment/easycash/EasycashReferralSendDfwFrag...

117 lines
5.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.easycash;
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 butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.custom.common.InputText;
import com.scb.phone.view.custom.easycash.CustomPhone;
import com.scb.phone.view.fragment.easycash.EasycashReferralSendDfwFragment;
import o.C1916aRw;
import o.C6583cXR;
import o.InterfaceC13391fZD;
import o.InterfaceC6621cYR;
import o.LW;
import o.Lld;
import o.ZI;
/* loaded from: classes5.dex */
public class EasycashReferralSendDfwFragment extends Hilt_EasycashReferralSendDfwFragment implements InterfaceC6621cYR.dAO {
@InterfaceC13391fZD
public C1916aRw easycashReferralSendDfwPresenter;
public static EasycashReferralSendDfwFragment c(LW lw) {
EasycashReferralSendDfwFragment easycashReferralSendDfwFragment = new EasycashReferralSendDfwFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.EXTRA_REFERRAL", lw);
easycashReferralSendDfwFragment.setArguments(bundle);
return easycashReferralSendDfwFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559610, viewGroup, false);
ButterKnife.c(this, inflate);
this.easycashReferralSendDfwPresenter.e((C1916aRw) this);
b(this.easycashReferralSendDfwPresenter);
this.easycashReferralSendDfwPresenter.a((LW) getArguments().getParcelable("com.scb.phone.EXTRA_REFERRAL"));
this.tracker.r("DFWYN");
Lld lld = this.tracker;
if (getActivity() != null) {
lld.c(((BaseActivity) getActivity()).scbAnalytics, "apply_loan_referral_input");
}
return inflate;
}
@Override // com.scb.phone.view.fragment.easycash.BaseEasycashReferralSendFragment, com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
super.onDestroy();
this.easycashReferralSendDfwPresenter.w_();
}
@Override // com.scb.phone.view.fragment.easycash.BaseEasycashReferralSendFragment, o.InterfaceC6621cYR.jNh
public final void a() {
super.a();
this.loansDetails.setOnFocusChangeListener(new InputText.RVV(this) { // from class: o.eTD
private EasycashReferralSendDfwFragment a;
@Override // com.scb.phone.view.custom.common.InputText.RVV
public final void b(String str) {
this.a.easycashReferralSendDfwPresenter.d(str);
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC6621cYR.dAO
public final void m() {
this.loansDetails.b(getResources().getString(R.string.easycash_invalid_amount_transfer_input));
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.scb.phone.view.fragment.easycash.BaseEasycashReferralSendFragment
public final void n() {
C1916aRw c1916aRw = this.easycashReferralSendDfwPresenter;
String obj = this.amountEditText.getText().toString();
String obj2 = this.loansDetails.inputEditText.getText().toString();
c1916aRw.b(this.buttonSend.isEnabled() != (c1916aRw.d(TextUtils.isEmpty(obj) ? -1.0d : C6583cXR.c(obj).doubleValue()) && c1916aRw.c && this.phoneEditText.a && !TextUtils.isEmpty(obj2) && ((Boolean) C6583cXR.c(new Object[]{obj2}, -1032102340, 1032102340, (int) System.currentTimeMillis())).booleanValue()), new ZI.IeS() { // from class: o.aRE
@Override // o.ZI.IeS
public final void e(Object obj3) {
((InterfaceC6621cYR.dAO) obj3).o();
}
});
}
/* JADX INFO: Access modifiers changed from: package-private */
@OnClick
public void onSendButtonClick() {
C1916aRw c1916aRw = this.easycashReferralSendDfwPresenter;
String obj = this.amountEditText.getText().toString();
String obj2 = this.loansDetails.inputEditText.getText().toString();
CustomPhone customPhone = this.phoneEditText;
c1916aRw.d(obj, obj2, TextUtils.isEmpty(customPhone.d) ? "" : customPhone.d, this.name.getText().toString());
}
@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 (i2 == -1 && i == 7134) {
C1916aRw c1916aRw = this.easycashReferralSendDfwPresenter;
String obj = this.amountEditText.getText().toString();
String obj2 = this.loansDetails.inputEditText.getText().toString();
CustomPhone customPhone = this.phoneEditText;
c1916aRw.c(obj, obj2, TextUtils.isEmpty(customPhone.d) ? "" : customPhone.d, this.name.getText().toString());
}
}
}