package com.scb.phone.view.fragment.investment.purchase; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import androidx.fragment.app.FragmentActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.scb.phone.R; import com.scb.phone.view.activity.BaseActivity; import java.util.List; import o.C11795emA; import o.C12279evH; import o.C14866gag; import o.C14957gcv; import o.C15720hy; import o.C15751iLP; import o.C16060koA; import o.InterfaceC12864fJh; import o.InterfaceC13391fZD; import o.PY; import o.gjJ; /* loaded from: classes5.dex */ public final class SearchFundTabFragment extends Hilt_SearchFundTabFragment implements InterfaceC12864fJh { public static final LWm c = new LWm(0); private C12279evH f; private C11795emA g; @InterfaceC13391fZD public C15720hy investmentDisplayCache; private boolean j; private String h = ""; public String d = ""; @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); C11795emA QW_ = C11795emA.QW_(getLayoutInflater()); this.g = QW_; C14957gcv.e(QW_); RelativeLayout relativeLayout = QW_.d; C14957gcv.c(relativeLayout, ""); return relativeLayout; } /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */ /* JADX WARN: Removed duplicated region for block: B:12:0x0067 */ /* JADX WARN: Removed duplicated region for block: B:15:0x0075 */ /* JADX WARN: Removed duplicated region for block: B:18:0x0084 */ /* JADX WARN: Removed duplicated region for block: B:20:0x0122 */ /* JADX WARN: Removed duplicated region for block: B:26:0x0141 */ /* JADX WARN: Removed duplicated region for block: B:28:0x0087 */ /* JADX WARN: Removed duplicated region for block: B:32:0x00a1 */ /* JADX WARN: Removed duplicated region for block: B:36:0x00ba */ /* JADX WARN: Removed duplicated region for block: B:40:0x00d5 */ /* JADX WARN: Removed duplicated region for block: B:44:0x00ee */ /* JADX WARN: Removed duplicated region for block: B:48:0x0107 */ @Override // androidx.fragment.app.Fragment /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void onViewCreated(android.view.View r9, android.os.Bundle r10) { /* Method dump skipped, instructions count: 380 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.fragment.investment.purchase.SearchFundTabFragment.onViewCreated(android.view.View, android.os.Bundle):void"); } public final void c(List list) { C14866gag c14866gag; C14957gcv.e(list, ""); if (!list.isEmpty()) { C11795emA c11795emA = this.g; C14957gcv.e(c11795emA); RelativeLayout relativeLayout = c11795emA.b.d; C14957gcv.c(relativeLayout, ""); RelativeLayout relativeLayout2 = relativeLayout; C14957gcv.e(relativeLayout2, ""); relativeLayout2.setVisibility(8); TextView textView = c11795emA.a; C14957gcv.c(textView, ""); TextView textView2 = textView; C14957gcv.e(textView2, ""); textView2.setVisibility(8); RecyclerView recyclerView = c11795emA.e; C14957gcv.c(recyclerView, ""); RecyclerView recyclerView2 = recyclerView; C14957gcv.e(recyclerView2, ""); recyclerView2.setVisibility(0); C12279evH c12279evH = this.f; if (c12279evH != null) { C14957gcv.e(list, ""); c12279evH.d = list; c12279evH.notifyDataSetChanged(); c14866gag = C14866gag.c; } else { c14866gag = null; } if (c14866gag == null) { b(list); return; } return; } String string = getResources().getString(R.string.fund_search_no_results); C14957gcv.c((Object) string, ""); c(string); } private final void b(List list) { this.f = new C12279evH(list, this, this.j); C11795emA c11795emA = this.g; C14957gcv.e(c11795emA); RecyclerView recyclerView = c11795emA.e; recyclerView.getContext(); recyclerView.setLayoutManager(new LinearLayoutManager(1, false)); recyclerView.setNestedScrollingEnabled(false); recyclerView.setAdapter(this.f); } private final void d() { C11795emA c11795emA = this.g; C14957gcv.e(c11795emA); C15751iLP c15751iLP = c11795emA.b; c15751iLP.b.setText(getResources().getString(R.string.custom_empty_title)); c15751iLP.e.setText(getResources().getString(R.string.custom_empty_description)); RelativeLayout relativeLayout = c15751iLP.d; C14957gcv.c(relativeLayout, ""); RelativeLayout relativeLayout2 = relativeLayout; C14957gcv.e(relativeLayout2, ""); relativeLayout2.setVisibility(0); ImageView imageView = c15751iLP.c; C14957gcv.c(imageView, ""); ImageView imageView2 = imageView; C14957gcv.e(imageView2, ""); imageView2.setVisibility(0); C11795emA c11795emA2 = this.g; C14957gcv.e(c11795emA2); TextView textView = c11795emA2.a; C14957gcv.c(textView, ""); TextView textView2 = textView; C14957gcv.e(textView2, ""); textView2.setVisibility(8); C11795emA c11795emA3 = this.g; C14957gcv.e(c11795emA3); RecyclerView recyclerView = c11795emA3.e; C14957gcv.c(recyclerView, ""); RecyclerView recyclerView2 = recyclerView; C14957gcv.e(recyclerView2, ""); recyclerView2.setVisibility(8); } @Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC6638cYp public final void v() { C11795emA c11795emA = this.g; C14957gcv.e(c11795emA); RelativeLayout relativeLayout = c11795emA.b.d; C14957gcv.c(relativeLayout, ""); RelativeLayout relativeLayout2 = relativeLayout; C14957gcv.e(relativeLayout2, ""); relativeLayout2.setVisibility(8); TextView textView = c11795emA.a; C14957gcv.c(textView, ""); TextView textView2 = textView; C14957gcv.e(textView2, ""); textView2.setVisibility(8); RecyclerView recyclerView = c11795emA.e; C14957gcv.c(recyclerView, ""); RecyclerView recyclerView2 = recyclerView; C14957gcv.e(recyclerView2, ""); recyclerView2.setVisibility(8); super.v(); } private final void c(String str) { C11795emA c11795emA = this.g; C14957gcv.e(c11795emA); C15751iLP c15751iLP = c11795emA.b; TextView textView = c15751iLP.b; C14957gcv.c(textView, ""); TextView textView2 = textView; C14957gcv.e(textView2, ""); textView2.setVisibility(8); TextView textView3 = c15751iLP.a; C14957gcv.c(textView3, ""); TextView textView4 = textView3; C14957gcv.e(textView4, ""); textView4.setVisibility(0); TextView textView5 = c15751iLP.e; C14957gcv.c(textView5, ""); TextView textView6 = textView5; C14957gcv.e(textView6, ""); textView6.setVisibility(8); RelativeLayout relativeLayout = c15751iLP.d; C14957gcv.c(relativeLayout, ""); RelativeLayout relativeLayout2 = relativeLayout; C14957gcv.e(relativeLayout2, ""); relativeLayout2.setVisibility(0); ImageView imageView = c15751iLP.c; C14957gcv.c(imageView, ""); ImageView imageView2 = imageView; C14957gcv.e(imageView2, ""); imageView2.setVisibility(8); c15751iLP.a.setText(str); C11795emA c11795emA2 = this.g; C14957gcv.e(c11795emA2); TextView textView7 = c11795emA2.a; C14957gcv.c(textView7, ""); TextView textView8 = textView7; C14957gcv.e(textView8, ""); textView8.setVisibility(8); C11795emA c11795emA3 = this.g; C14957gcv.e(c11795emA3); RecyclerView recyclerView = c11795emA3.e; C14957gcv.c(recyclerView, ""); RecyclerView recyclerView2 = recyclerView; C14957gcv.e(recyclerView2, ""); recyclerView2.setVisibility(8); } @Override // o.InterfaceC12864fJh public final void c(PY py) { String str; C14957gcv.e(py, ""); C16060koA c16060koA = new C16060koA(); String str2 = this.h; String str3 = this.d; if (gjJ.a(py.a)) { str = py.a; } else { str = py.e; } c16060koA.d("fund", str); c16060koA.d("keyword", str3); c16060koA.d("tab", str2); C16060koA c16060koA2 = c16060koA; if (getActivity() != null) { c16060koA2.c(((BaseActivity) getActivity()).scbAnalytics, "mfsearchpurchase_fundclicked"); } Intent intent = new Intent(); intent.putExtra("com.scb.phone.PURCHASE_FUND_SEARCH_SELECTED", py); FragmentActivity activity = getActivity(); if (activity != null) { activity.setResult(-1, intent); activity.finish(); } } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroyView() { this.g = null; super.onDestroyView(); } /* loaded from: classes5.dex */ public static final class LWm { private LWm() { } public /* synthetic */ LWm(byte b) { this(); } } }