what-the-bank/sources/com/scb/phone/view/fragment/closeaccount/CloseAccountAmountDetailsFr...

144 lines
5.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.closeaccount;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.adapter.closeaccount.AmountDetailsAdapter;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import o.AbstractC13163fSk;
import o.C0512Ii;
import o.C15715hv;
import o.C16408oA;
import o.C3505ayn;
import o.InterfaceC13391fZD;
import o.InterfaceC9122ddk;
import o.QO;
import o.TPf;
import o.XOD;
import o.fSS;
/* loaded from: classes5.dex */
public class CloseAccountAmountDetailsFragment extends Hilt_CloseAccountAmountDetailsFragment implements InterfaceC9122ddk {
@InterfaceC13391fZD
public C3505ayn presenter;
@BindView
RecyclerView recyclerView;
public static Fragment d() {
return new CloseAccountAmountDetailsFragment();
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559506, viewGroup, false);
ButterKnife.c(this, inflate);
this.presenter.e((C3505ayn) this);
C3505ayn c3505ayn = this.presenter;
XOD xod = c3505ayn.c;
AbstractC13163fSk<R> map = xod.b().map(new fSS() { // from class: o.ayo
@Override // o.fSS
public final Object a(Object obj) {
List list;
list = ((TPf) obj).d;
return list;
}
});
final C16408oA c16408oA = c3505ayn.a;
Objects.requireNonNull(c16408oA);
xod.d(map.map(new fSS(c16408oA) { // from class: o.ayv
private C16408oA d;
@Override // o.fSS
public final Object a(Object obj) {
C16408oA c16408oA2 = this.d;
List<TPf.IeS> list = (List) obj;
C14957gcv.e(list, "");
NumberFormat c = C6583cXR.c();
ArrayList arrayList = new ArrayList();
for (TPf.IeS ieS : list) {
c16408oA2.a = new ArrayList();
QO.IeS d = QO.d();
d.g = c16408oA2.e(C15715hv.tOB.close_account_details_date);
d.h = c16408oA2.a(ieS.c);
d.n = true;
c16408oA2.a.add(d.d());
c16408oA2.a.add(new QQ());
QO.IeS d2 = QO.d();
d2.g = c16408oA2.e(C15715hv.tOB.close_account_details_amount);
d2.h = c.format(ieS.b);
d2.n = true;
c16408oA2.a.add(d2.d());
c16408oA2.a.add(new QQ());
QO.IeS d3 = QO.d();
d3.g = c16408oA2.e(C15715hv.tOB.close_account_details_interest);
d3.h = c.format(ieS.a);
d3.n = true;
c16408oA2.a.add(d3.d());
c16408oA2.a.add(new QQ());
QO.IeS d4 = QO.d();
d4.g = c16408oA2.e(C15715hv.tOB.close_account_details_interest_rate);
d4.h = C16408oA.f(Double.valueOf(ieS.e));
d4.n = true;
c16408oA2.a.add(d4.d());
c16408oA2.a.add(new QQ());
QO.IeS d5 = QO.d();
d5.g = c16408oA2.e(C15715hv.tOB.close_account_details_maturity_issue);
d5.h = c16408oA2.a(ieS.d);
d5.n = true;
c16408oA2.a.add(d5.d());
c16408oA2.a.add(new QQ());
QO.IeS d6 = QO.d();
d6.g = c16408oA2.e(C15715hv.tOB.close_account_details_withholding);
double d7 = ieS.h;
if (d7 > 0.0d) {
d7 = -d7;
}
d6.h = c.format(d7);
d6.n = true;
c16408oA2.a.add(d6.d());
c16408oA2.a.add(new QQ());
QO.IeS d8 = QO.d();
d8.g = c16408oA2.e(C15715hv.tOB.close_account_details_total_amount);
d8.h = c.format(ieS.g);
d8.n = true;
QO d9 = d8.d();
List<EM> list2 = c16408oA2.a;
C14957gcv.c(list2, "");
List d10 = C14881gav.d((Iterable) list2);
String str = ieS.f;
C14957gcv.c(d9, "");
arrayList.add(new C0512Ii(str, d10, d9));
}
return arrayList;
}
{
this.d = c16408oA;
}
}), new C3505ayn.AnonymousClass5(c3505ayn));
return inflate;
}
@Override // o.InterfaceC9122ddk
public final void e(List<C0512Ii> list) {
this.recyclerView.setAdapter(new AmountDetailsAdapter(list));
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
this.presenter.w_();
super.onDestroyView();
}
}