what-the-bank/sources/com/scb/phone/view/fragment/sme/gifting/GiftRecipientFromOthersFrag...

103 lines
3.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.sme.gifting;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.DefaultButton;
import com.scb.phone.view.fragment.sme.gifting.GiftRecipientFromOthersFragment;
import java.util.concurrent.TimeUnit;
import o.AbstractC13163fSk;
import o.C12891fKc;
import o.C13417fZt;
import o.C16124lSp;
import o.C6158cKi;
import o.InterfaceC13391fZD;
import o.InterfaceC6673cZp;
import o.WG;
import o.fRR;
import o.fSJ;
import o.fSQ;
import o.nMh;
/* loaded from: classes5.dex */
public class GiftRecipientFromOthersFragment extends Hilt_GiftRecipientFromOthersFragment implements InterfaceC6673cZp.tOB {
@BindView
EditText accountNumber;
@BindView
ImageView bankIcon;
private fSJ c;
@BindView
protected DefaultButton confirmButton;
@InterfaceC13391fZD
public C6158cKi selectRecipientFromOtherPresenter;
public static GiftRecipientFromOthersFragment d() {
return new GiftRecipientFromOthersFragment();
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559678, viewGroup, false);
ButterKnife.c(this, inflate);
this.selectRecipientFromOtherPresenter.e((C6158cKi) this);
this.c = AbstractC13163fSk.interval(1L, TimeUnit.SECONDS).subscribeOn(C13417fZt.c()).observeOn(fRR.e()).subscribe(new fSQ(this) { // from class: o.fBy
private GiftRecipientFromOthersFragment b;
@Override // o.fSQ
public final void c(Object obj) {
this.b.confirmButton.setButtonEnabled(r2.accountNumber.getText().length() >= 10);
}
{
this.b = this;
}
}, new fSQ() { // from class: o.fBG
@Override // o.fSQ
public final void c(Object obj) {
guQ.a((Throwable) obj);
}
});
C12891fKc.azh_(nMh.getDrawable(getContext(), R.drawable.bankicon_scb), this.bankIcon, R.drawable.bankicon_scb, getContext().getResources().getDimensionPixelOffset(R.dimen.f15212131165285));
return inflate;
}
@OnClick
public void buttonConfirmClick() {
C6158cKi c6158cKi = this.selectRecipientFromOtherPresenter;
String obj = this.accountNumber.getText().toString();
c6158cKi.b.b(W());
C16124lSp c16124lSp = c6158cKi.b;
c16124lSp.d(c16124lSp.i, new C6158cKi.RVV(c6158cKi, obj));
}
@Override // o.InterfaceC6673cZp.jbe
public final void d(WG wg) {
Intent intent = new Intent();
intent.putExtra("GIFT_RECIPIENT_INFO", wg);
getActivity().setResult(-1, intent);
getActivity().finish();
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
super.onDestroyView();
fSJ fsj = this.c;
if (fsj != null && !fsj.isDisposed()) {
this.c.dispose();
}
this.selectRecipientFromOtherPresenter.w_();
}
}