what-the-bank/sources/com/scb/phone/view/fragment/closeaccount/CloseAccountSelectionOwnSel...

164 lines
5.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.closeaccount;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.closeaccount.CloseAccountReviewActivity;
import o.C0690Mh;
import o.C12891fKc;
import o.C16413oD;
import o.C3547azc;
import o.InterfaceC13391fZD;
import o.InterfaceC9130dds;
import o.TPf;
import o.ZI;
import o.iyt;
import o.nMh;
import o.pug;
import o.wRi;
/* loaded from: classes5.dex */
public class CloseAccountSelectionOwnSelectedFragment extends Hilt_CloseAccountSelectionOwnSelectedFragment implements InterfaceC9130dds {
private RVV d;
@InterfaceC13391fZD
public C3547azc presenter;
@BindView
Button reviewButton;
@BindView
ImageView startIcon;
@BindView
TextView subtitle;
@BindView
TextView title;
/* loaded from: classes5.dex */
public interface RVV {
void h();
}
public static CloseAccountSelectionOwnSelectedFragment j() {
return new CloseAccountSelectionOwnSelectedFragment();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.closeaccount.Hilt_CloseAccountSelectionOwnSelectedFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public void onAttach(Context context) {
if (getParentFragment() instanceof RVV) {
this.d = (RVV) getParentFragment();
} else if (context instanceof RVV) {
this.d = (RVV) context;
} else {
StringBuilder sb = new StringBuilder();
sb.append(context.toString());
sb.append(" must implement AccountTargetSelectionListener");
throw new ClassCastException(sb.toString());
}
super.onAttach(context);
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559508, viewGroup, false);
ButterKnife.c(this, inflate);
this.presenter.e((C3547azc) this);
C3547azc c3547azc = this.presenter;
c3547azc.a.d(c3547azc.a.a(), new C3547azc.AnonymousClass1(c3547azc));
return inflate;
}
@Override // o.InterfaceC9130dds
public final void a(C16413oD c16413oD) {
this.title.setText(c16413oD.c());
TextView textView = this.subtitle;
System.identityHashCode(c16413oD);
textView.setText((String) C16413oD.d(new Object[]{c16413oD}));
C12891fKc.azg_(getContext(), nMh.getDrawable(getContext(), R.drawable.bankicon_place_holder), this.startIcon, c16413oD.b(), getResources().getDimensionPixelOffset(R.dimen.f15222131165286), nMh.getColor(getContext(), R.color.f3412131099849));
}
@Override // o.InterfaceC9130dds
public final void b() {
this.d.h();
}
@OnClick
public void onReviewButtonClick() {
c("close_acct_input", new pug("subtype", "own"));
final C3547azc c3547azc = this.presenter;
if (c3547azc.f != 0) {
c3547azc.f.y();
}
c3547azc.b.c(c3547azc.e.a, "OWN");
iyt iytVar = c3547azc.b;
iytVar.d(iytVar.i, new wRi.LWm<TPf>(c3547azc) { // from class: o.azc.5
private C3547azc b;
{
this.b = c3547azc;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
C3547azc.a(this.b);
C3547azc c3547azc2 = this.b;
ZI.IeS ieS = new ZI.IeS() { // from class: o.azd
@Override // o.ZI.IeS
public final void e(Object obj2) {
((InterfaceC9130dds) obj2).d();
}
};
if (c3547azc2.f != 0) {
ieS.e(c3547azc2.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
if (this.b.i(th)) {
return;
}
C3547azc.a(this.b, th, C0690Mh.IeS.JUST_DISMISS);
}
});
}
@Override // o.InterfaceC9130dds
public final void d() {
CloseAccountReviewActivity.e(getContext(), "CLOSE_ACCOUNT_OWN_FRAGMENT");
c("close_acct_review", new pug("source", "select_receiving_account"));
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
this.presenter.w_();
super.onDestroy();
}
@OnClick
public void onCloseIconClick() {
C3547azc c3547azc = this.presenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.ayZ
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9130dds) obj).b();
}
};
if (c3547azc.f != 0) {
ieS.e(c3547azc.f);
}
}
}