package com.scb.phone.view.fragment.transferandpay.transfer; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.SystemClock; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.adapter.transferandpay.transfer.TransferToMeStep1Adapter; import com.scb.phone.view.fragment.BaseFragment; import com.scb.phone.view.fragment.transferandpay.transfer.TransferToMeAccountFragment; import java.util.List; import o.AbstractC1237Yr; import o.AbstractC13163fSk; import o.AbstractC14961gcz; import o.C10457eEr; import o.C1233Yp; import o.C14866gag; import o.C14957gcv; import o.GEP; import o.InterfaceC13391fZD; import o.InterfaceC14894gbR; import o.InterfaceC9010dbe; import o.Jel; import o.YKU; import o.ZI; import o.cWC; import o.fSJ; import o.fSQ; import o.glR; import o.guQ; import o.yGw; import o.zEQ; /* loaded from: classes5.dex */ public final class TransferToMeAccountFragment extends Hilt_TransferToMeAccountFragment implements InterfaceC9010dbe.WNf, TransferToMeStep1Adapter.IeS { public static final HBt c = new HBt(0); private TransferToMeStep1Adapter d; private fSJ f; private long g; private boolean h; private fSJ i; @InterfaceC13391fZD public cWC presenter; @BindView public RecyclerView recyclerView; @BindView public ViewGroup viewGroupNoTargets; /* loaded from: classes5.dex */ public static final class HBt { private HBt() { } public /* synthetic */ HBt(byte b) { this(); } } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); View inflate = layoutInflater.inflate(R.layout.2131559969, viewGroup, false); ((BaseFragment) this).a = ButterKnife.c(this, inflate); return inflate; } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { C14957gcv.e(view, ""); super.onViewCreated(view, bundle); cWC cwc = this.presenter; if (cwc == null) { C14957gcv.a(""); cwc = null; } cwc.e((cWC) this); RecyclerView recyclerView = this.recyclerView; if (recyclerView == null) { C14957gcv.a(""); recyclerView = null; } recyclerView.setNestedScrollingEnabled(false); cWC cwc2 = this.presenter; if (cwc2 == null) { C14957gcv.a(""); cwc2 = null; } Bundle arguments = getArguments(); String string = arguments != null ? arguments.getString("account_source") : null; cwc2.e(string != null ? string : ""); } @Override // androidx.fragment.app.Fragment public final void onStart() { super.onStart(); if (this.h) { return; } AbstractC13163fSk Ge_ = glR.Ge_(getContext(), new IntentFilter("FAVORITE")); final RVV rvv = new RVV(this); fSQ fsq = new fSQ(rvv) { // from class: o.fHj private InterfaceC14894gbR b; @Override // o.fSQ public final void c(Object obj) { TransferToMeAccountFragment.d(this.b, obj); } { this.b = rvv; } }; final Sts sts = Sts.d; this.f = Ge_.subscribe(fsq, new fSQ(sts) { // from class: o.fHo private InterfaceC14894gbR d; @Override // o.fSQ public final void c(Object obj) { TransferToMeAccountFragment.e(this.d, obj); } { this.d = sts; } }); AbstractC13163fSk Ge_2 = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_BANK_RECEIVED")); final IeS ieS = new IeS(this); fSQ fsq2 = new fSQ(ieS) { // from class: o.fHp private InterfaceC14894gbR e; @Override // o.fSQ public final void c(Object obj) { TransferToMeAccountFragment.c(this.e, obj); } { this.e = ieS; } }; final LWm lWm = LWm.b; this.i = Ge_2.subscribe(fsq2, new fSQ(lWm) { // from class: o.fHm private InterfaceC14894gbR a; @Override // o.fSQ public final void c(Object obj) { TransferToMeAccountFragment.a(this.a, obj); } { this.a = lWm; } }); } @Override // androidx.fragment.app.Fragment public final void onStop() { fSJ fsj = this.f; if (fsj != null && !fsj.isDisposed()) { fsj.dispose(); } fSJ fsj2 = this.i; if (fsj2 != null && !fsj2.isDisposed()) { fsj2.dispose(); } super.onStop(); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroy() { cWC cwc = this.presenter; if (cwc == null) { C14957gcv.a(""); cwc = null; } cwc.w_(); super.onDestroy(); } /* JADX WARN: Multi-variable type inference failed */ @Override // o.InterfaceC9010dbe.WNf public final void b(List list) { C14957gcv.e(list, ""); RecyclerView recyclerView = null; if (list.isEmpty()) { ViewGroup viewGroup = this.viewGroupNoTargets; if (viewGroup == null) { C14957gcv.a(""); viewGroup = null; } viewGroup.setVisibility(0); RecyclerView recyclerView2 = this.recyclerView; if (recyclerView2 != null) { recyclerView = recyclerView2; } else { C14957gcv.a(""); } recyclerView.setVisibility(8); return; } ViewGroup viewGroup2 = this.viewGroupNoTargets; if (viewGroup2 == null) { C14957gcv.a(""); viewGroup2 = null; } viewGroup2.setVisibility(8); RecyclerView recyclerView3 = this.recyclerView; if (recyclerView3 == null) { C14957gcv.a(""); recyclerView3 = null; } recyclerView3.setVisibility(0); TransferToMeStep1Adapter transferToMeStep1Adapter = this.d; if (transferToMeStep1Adapter != null) { if (transferToMeStep1Adapter != null) { transferToMeStep1Adapter.d = list; transferToMeStep1Adapter.notifyDataSetChanged(); return; } return; } TransferToMeStep1Adapter transferToMeStep1Adapter2 = new TransferToMeStep1Adapter(list, (byte) 0); this.d = transferToMeStep1Adapter2; transferToMeStep1Adapter2.c = this; RecyclerView recyclerView4 = this.recyclerView; if (recyclerView4 != null) { recyclerView = recyclerView4; } else { C14957gcv.a(""); } recyclerView.setAdapter(this.d); } @Override // o.InterfaceC9010dbe.WNf public final void e(C1233Yp c1233Yp) { C14957gcv.e(c1233Yp, ""); a(c1233Yp, true); this.h = true; } @Override // o.InterfaceC9010dbe.WNf public final void a(AbstractC1237Yr abstractC1237Yr, boolean z) { Intent intent; C14957gcv.e(abstractC1237Yr, ""); if (z) { intent = new Intent("com.scb.phone/BROADCAST_TRANSFER_NEXT_FAVOURITE_STEP"); } else { intent = new Intent("com.scb.phone/BROADCAST_TRANSFER_NEXT_STEP"); } intent.putExtra("com.scb.phone.EXTRA_TRANSFER_TARGET_DATA", abstractC1237Yr); C10457eEr.aqd_(this, intent); } @Override // com.scb.phone.view.adapter.transferandpay.transfer.TransferToMeStep1Adapter.IeS public final void b(C1233Yp c1233Yp) { C14957gcv.e(c1233Yp, ""); a(c1233Yp, false); } private void a(C1233Yp c1233Yp, boolean z) { C14957gcv.e(c1233Yp, ""); if (SystemClock.elapsedRealtime() - this.g < 300) { return; } this.g = SystemClock.elapsedRealtime(); cWC cwc = this.presenter; if (cwc == null) { C14957gcv.a(""); cwc = null; } cwc.c(c1233Yp, z); } /* loaded from: classes5.dex */ static final class RVV extends AbstractC14961gcz implements InterfaceC14894gbR { private TransferToMeAccountFragment d; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Intent intent) { TransferToMeAccountFragment.b(this.d); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ RVV(TransferToMeAccountFragment transferToMeAccountFragment) { super(1); this.d = transferToMeAccountFragment; } } /* loaded from: classes5.dex */ static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR { public static final Sts d = new Sts(); @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Throwable th) { guQ.a(th); return C14866gag.c; } Sts() { super(1); } } /* loaded from: classes5.dex */ static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR { private TransferToMeAccountFragment e; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Intent intent) { TransferToMeAccountFragment.c(this.e); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ IeS(TransferToMeAccountFragment transferToMeAccountFragment) { super(1); this.e = transferToMeAccountFragment; } } /* loaded from: classes5.dex */ static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR { public static final LWm b = new LWm(); @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Throwable th) { guQ.a(th); return C14866gag.c; } LWm() { super(1); } } public static /* synthetic */ void a(InterfaceC14894gbR interfaceC14894gbR, Object obj) { C14957gcv.e(interfaceC14894gbR, ""); interfaceC14894gbR.invoke(obj); } public static /* synthetic */ void e(InterfaceC14894gbR interfaceC14894gbR, Object obj) { C14957gcv.e(interfaceC14894gbR, ""); interfaceC14894gbR.invoke(obj); } public static /* synthetic */ void c(InterfaceC14894gbR interfaceC14894gbR, Object obj) { C14957gcv.e(interfaceC14894gbR, ""); interfaceC14894gbR.invoke(obj); } public static /* synthetic */ void d(InterfaceC14894gbR interfaceC14894gbR, Object obj) { C14957gcv.e(interfaceC14894gbR, ""); interfaceC14894gbR.invoke(obj); } public static final /* synthetic */ void c(TransferToMeAccountFragment transferToMeAccountFragment) { cWC cwc = transferToMeAccountFragment.presenter; if (cwc == null) { C14957gcv.a(""); cwc = null; } String W = transferToMeAccountFragment.W(); C14957gcv.c((Object) W, ""); C14957gcv.e(W, ""); cwc.e.e(W); yGw ygw = cwc.e; ygw.d(ygw.i, new cWC.LWm(cwc)); } public static final /* synthetic */ void b(TransferToMeAccountFragment transferToMeAccountFragment) { cWC cwc = transferToMeAccountFragment.presenter; final zEQ zeq = null; if (cwc == null) { C14957gcv.a(""); cwc = null; } List list = cwc.d; if (list != null) { YKU yku = new YKU(list); final cWC.HBt hBt = new cWC.HBt(cwc); YKU yku2 = new YKU(yku.a, new GEP(yku.b, new Jel(hBt) { // from class: o.cWF private InterfaceC14894gbR a; @Override // o.Jel public final boolean e(Object obj) { return cWC.b(this.a, obj); } { this.a = hBt; } })); if (yku2.b.hasNext()) { zeq = zEQ.a(yku2.b.next()); } else { zeq = zEQ.d(); } } if (zeq == null || zeq.d == 0) { return; } ZI.IeS ieS = new ZI.IeS(zeq) { // from class: o.cWJ private zEQ d; @Override // o.ZI.IeS public final void e(Object obj) { cWC.b(this.d, (InterfaceC9010dbe.WNf) obj); } { this.d = zeq; } }; if (cwc.f != 0) { ieS.e(cwc.f); } } }