package com.scb.phone.view.fragment.sme.gifting; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.activity.sme.gifting.GiftingTransferLandingActivity; import com.scb.phone.view.adapter.sme.gifting.MoneyPresentAdapter; import java.util.ArrayList; import java.util.List; import o.InterfaceC13391fZD; import o.InterfaceC6673cZp; import o.WM; import o.ZI; import o.cKN; /* loaded from: classes5.dex */ public class GiftSelectionFragment extends Hilt_GiftSelectionFragment implements InterfaceC6673cZp.CeN, MoneyPresentAdapter.Sts { @BindView LinearLayout errorLayout; @BindView RecyclerView moneyPresentRecyclerView; @BindView TextView moneyPresentText; @InterfaceC13391fZD public cKN moneyPresentsPresenter; public static GiftSelectionFragment c(List list, String str) { Bundle bundle = new Bundle(); bundle.putParcelableArrayList("GIFTS_LIST_DISPLAY", (ArrayList) list); bundle.putString("GIFTS_CHOOSE_TEXT", str); GiftSelectionFragment giftSelectionFragment = new GiftSelectionFragment(); giftSelectionFragment.setArguments(bundle); return giftSelectionFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559680, viewGroup, false); ButterKnife.c(this, inflate); this.moneyPresentsPresenter.e((cKN) this); cKN ckn = this.moneyPresentsPresenter; final ArrayList parcelableArrayList = getArguments().getParcelableArrayList("GIFTS_LIST_DISPLAY"); final String string = getArguments().getString("GIFTS_CHOOSE_TEXT"); if (ckn.f != 0 && parcelableArrayList != null && string != null) { if (parcelableArrayList.isEmpty()) { ZI.IeS ieS = new ZI.IeS() { // from class: o.cKU @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6673cZp.CeN) obj).e(); } }; if (ckn.f != 0) { ieS.e(ckn.f); } } else { ZI.IeS ieS2 = new ZI.IeS(parcelableArrayList, string) { // from class: o.cKR private String b; private List e; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6673cZp.CeN) obj).a(this.e, this.b); } { this.e = parcelableArrayList; this.b = string; } }; if (ckn.f != 0) { ieS2.e(ckn.f); } } } return inflate; } @Override // o.InterfaceC6673cZp.CeN public final void a(List list, String str) { this.moneyPresentText.setText(str); MoneyPresentAdapter moneyPresentAdapter = new MoneyPresentAdapter(list, this); getContext(); this.moneyPresentRecyclerView.setLayoutManager(new LinearLayoutManager(1, false)); this.moneyPresentRecyclerView.setAdapter(moneyPresentAdapter); } @Override // o.InterfaceC6673cZp.CeN public final void e() { this.errorLayout.setVisibility(0); this.moneyPresentRecyclerView.setVisibility(8); } @Override // com.scb.phone.view.adapter.sme.gifting.MoneyPresentAdapter.Sts public final void b(WM wm) { GiftingTransferLandingActivity.c(new Object[]{getContext(), wm}, 1898676737, -1898676737, (int) System.currentTimeMillis()); } }