what-the-bank/sources/com/scb/phone/view/fragment/bulktransfer/BulkTransferGroupsFragment....

191 lines
6.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.bulktransfer;
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.core.view.ViewCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.bulktransfer.BulkTransferInputActivity;
import com.scb.phone.view.activity.bulktransfer.CreateRecipientGroupActivity;
import com.scb.phone.view.adapter.bulktransfer.BulkTransferGroupAdapter;
import com.scb.phone.view.custom.common.DefaultButton;
import com.scb.phone.view.fragment.bulktransfer.BulkTransferGroupsFragment;
import java.util.List;
import o.C2692ajR;
import o.FL;
import o.FO;
import o.InterfaceC13391fZD;
import o.InterfaceC6636cYn;
import o.ZI;
/* loaded from: classes5.dex */
public class BulkTransferGroupsFragment extends Hilt_BulkTransferGroupsFragment implements InterfaceC6636cYn.LWm {
@InterfaceC13391fZD
public C2692ajR bulkTransferGroupsPresenter;
@BindView
TextView counterRecipientsTextView;
@BindView
DefaultButton createRecipientButton;
@BindView
RecyclerView groupsRecyclerView;
public static BulkTransferGroupsFragment c(FL fl) {
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.EXTRA_GROUPS", fl);
BulkTransferGroupsFragment bulkTransferGroupsFragment = new BulkTransferGroupsFragment();
bulkTransferGroupsFragment.setArguments(bundle);
return bulkTransferGroupsFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559473, viewGroup, false);
ButterKnife.c(this, inflate);
this.bulkTransferGroupsPresenter.e((C2692ajR) this);
if (getArguments() != null) {
C2692ajR c2692ajR = this.bulkTransferGroupsPresenter;
final FL fl = (FL) getArguments().getParcelable("com.scb.phone.EXTRA_GROUPS");
if (c2692ajR.f != 0 && fl != null) {
final List<FO> list = fl.a;
ZI.IeS ieS = new ZI.IeS(list) { // from class: o.ajU
private List b;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6636cYn.LWm) obj).b((List<FO>) this.b);
}
{
this.b = list;
}
};
if (c2692ajR.f != 0) {
ieS.e(c2692ajR.f);
}
ZI.IeS ieS2 = new ZI.IeS(fl) { // from class: o.ajX
private FL a;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6636cYn.LWm) obj).b(this.a.c);
}
{
this.a = fl;
}
};
if (c2692ajR.f != 0) {
ieS2.e(c2692ajR.f);
}
ZI.IeS ieS3 = new ZI.IeS(fl) { // from class: o.ajY
private FL c;
@Override // o.ZI.IeS
public final void e(Object obj) {
FL fl2 = this.c;
((InterfaceC6636cYn.LWm) obj).e(!fl2.d);
}
{
this.c = fl;
}
};
if (c2692ajR.f != 0) {
ieS3.e(c2692ajR.f);
}
}
}
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
super.onDestroy();
this.bulkTransferGroupsPresenter.w_();
}
@Override // o.InterfaceC6636cYn.LWm
public final void b(List<FO> list) {
getContext();
this.groupsRecyclerView.setLayoutManager(new LinearLayoutManager(1, false));
ViewCompat.d((View) this.groupsRecyclerView, false);
this.groupsRecyclerView.setAdapter(new BulkTransferGroupAdapter(list, new BulkTransferGroupAdapter.LWm(this) { // from class: o.eHQ
private BulkTransferGroupsFragment e;
@Override // com.scb.phone.view.adapter.bulktransfer.BulkTransferGroupAdapter.LWm
public final void c(String str) {
BulkTransferGroupsFragment.d(this.e, str);
}
{
this.e = this;
}
}));
}
@Override // o.InterfaceC6636cYn.LWm
public final void b(String str) {
this.counterRecipientsTextView.setText(str);
}
@Override // o.InterfaceC6636cYn.LWm
public final void d() {
startActivity(new Intent(getContext(), (Class<?>) CreateRecipientGroupActivity.class));
}
@Override // o.InterfaceC6636cYn.LWm
public final void a(String str) {
BulkTransferInputActivity.d(getContext(), str);
}
@Override // o.InterfaceC6636cYn.LWm
public final void e(boolean z) {
this.createRecipientButton.setButtonEnabled(z);
}
public static /* synthetic */ void d(BulkTransferGroupsFragment bulkTransferGroupsFragment, final String str) {
C2692ajR c2692ajR = bulkTransferGroupsFragment.bulkTransferGroupsPresenter;
ZI.IeS ieS = new ZI.IeS(str) { // from class: o.ajS
private String d;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6636cYn.LWm) obj).a(this.d);
}
{
this.d = str;
}
};
if (c2692ajR.f != 0) {
ieS.e(c2692ajR.f);
}
}
@OnClick
public void createButtonClicked() {
C2692ajR c2692ajR = this.bulkTransferGroupsPresenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.ajT
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6636cYn.LWm) obj).d();
}
};
if (c2692ajR.f != 0) {
ieS.e(c2692ajR.f);
}
}
}