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

126 lines
4.4 KiB
Java

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.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.adapter.sme.gifting.GiftSelectRecipientFromFavouriteAdapter;
import com.scb.phone.view.fragment.sme.gifting.GiftRecipientFromFavouriteFragment;
import java.util.List;
import o.C1182Xi;
import o.C16124lSp;
import o.C6154cKe;
import o.InterfaceC13391fZD;
import o.InterfaceC6673cZp;
import o.WG;
import o.ZI;
/* loaded from: classes5.dex */
public class GiftRecipientFromFavouriteFragment extends Hilt_GiftRecipientFromFavouriteFragment implements InterfaceC6673cZp.IeS {
@BindView
View emptyCard;
@BindView
TextView favouriteSuggestion;
@BindView
RecyclerView recyclerView;
@InterfaceC13391fZD
public C6154cKe selectRecipientFromFavouritePresenter;
public static GiftRecipientFromFavouriteFragment d() {
return new GiftRecipientFromFavouriteFragment();
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
byte b = 0;
View inflate = layoutInflater.inflate(R.layout.2131559677, viewGroup, false);
ButterKnife.c(this, inflate);
this.selectRecipientFromFavouritePresenter.e((C6154cKe) this);
C6154cKe c6154cKe = this.selectRecipientFromFavouritePresenter;
if (c6154cKe.f != 0) {
c6154cKe.f.y();
}
c6154cKe.a.e();
C16124lSp c16124lSp = c6154cKe.a;
c16124lSp.d(c16124lSp.i, new C6154cKe.RVV(c6154cKe, b));
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
super.onDestroy();
this.selectRecipientFromFavouritePresenter.w_();
}
@Override // o.InterfaceC6673cZp.IeS
public final void b(List<C1182Xi> list) {
this.emptyCard.setVisibility(8);
this.recyclerView.setVisibility(0);
GiftSelectRecipientFromFavouriteAdapter giftSelectRecipientFromFavouriteAdapter = new GiftSelectRecipientFromFavouriteAdapter(list, new GiftSelectRecipientFromFavouriteAdapter.HBt(this) { // from class: o.fBx
private GiftRecipientFromFavouriteFragment c;
@Override // com.scb.phone.view.adapter.sme.gifting.GiftSelectRecipientFromFavouriteAdapter.HBt
public final void c(C1182Xi c1182Xi) {
GiftRecipientFromFavouriteFragment.b(this.c, c1182Xi);
}
{
this.c = this;
}
});
RecyclerView recyclerView = this.recyclerView;
getContext();
recyclerView.setLayoutManager(new GridLayoutManager(4, (byte) 0));
this.recyclerView.setAdapter(giftSelectRecipientFromFavouriteAdapter);
}
@Override // o.InterfaceC6673cZp.IeS
public final void c() {
this.favouriteSuggestion.setText(R.string.favorite_add_suggestion_gifting);
this.emptyCard.setVisibility(0);
this.recyclerView.setVisibility(8);
}
@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();
}
public static /* synthetic */ void b(GiftRecipientFromFavouriteFragment giftRecipientFromFavouriteFragment, final C1182Xi c1182Xi) {
final C6154cKe c6154cKe = giftRecipientFromFavouriteFragment.selectRecipientFromFavouritePresenter;
if (c6154cKe.f != 0) {
ZI.IeS ieS = new ZI.IeS(c6154cKe, c1182Xi) { // from class: o.cKd
private C6154cKe b;
private C1182Xi c;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6154cKe.e(this.b, this.c, (InterfaceC6673cZp.IeS) obj);
}
{
this.b = c6154cKe;
this.c = c1182Xi;
}
};
if (c6154cKe.f != 0) {
ieS.e(c6154cKe.f);
}
}
}
}