what-the-bank/sources/o/C17326vo.java

151 lines
5.4 KiB
Java

package o;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.text.TextUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import o.C15715hv;
/* renamed from: o.vo, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C17326vo extends C16157lj {
private int a;
@InterfaceC13391fZD
public C17326vo(Resources resources, SharedPreferences sharedPreferences) {
super(resources, sharedPreferences);
}
public final List<PH> d(List<IJP> list) {
String string;
int i;
this.a = 0;
ArrayList arrayList = new ArrayList();
for (IJP ijp : list) {
int i2 = ijp.l;
if (i2 == 0) {
String str = ijp.m;
String str2 = ijp.d;
String str3 = TextUtils.isEmpty(str) ? (String) C6583cXR.c(new Object[]{str2}, -1613428710, 1613428726, (int) System.currentTimeMillis()) : str;
String str4 = TextUtils.isEmpty(str) ? "" : (String) C6583cXR.c(new Object[]{str2}, -1613428710, 1613428726, (int) System.currentTimeMillis());
String string2 = this.e.getString(C15715hv.tOB.investment_number_of_funds, Integer.valueOf(ijp.l));
if (ijp.k == 0) {
string = this.e.getString(C15715hv.tOB.investment_details_client_no_tax);
} else {
string = this.e.getString(C15715hv.tOB.investment_details_client_tax);
}
PN pn = new PN();
pn.c = str2;
pn.f = str3;
pn.b = str4;
pn.a = string2;
pn.e = string;
this.a++;
pn.d = "MY_FUNDS_GROUP_VIEW_TYPE_NO_FUND";
arrayList.add(pn);
} else if (i2 == 1) {
PK c = c(ijp);
List<ThO> list2 = ijp.e;
PI b = b((list2 == null || list2.isEmpty()) ? null : list2.get(0));
PM pm = new PM();
pm.a = c;
pm.b = b;
this.a++;
pm.d = "MY_FUNDS_GROUP_VIEW_TYPE_SINGLE";
arrayList.add(pm);
} else {
ArrayList arrayList2 = new ArrayList();
for (ThO thO : ijp.e) {
PG pg = new PG();
pg.b = b(thO);
this.a++;
arrayList2.add(pg);
}
PK c2 = c(ijp);
PF pf = new PF();
pf.b = c2;
pf.e = arrayList2;
pf.c = false;
this.a++;
pf.d = "MY_FUNDS_VIEW_TYPE_EXPANDABLE";
arrayList.add(pf);
double d = ijp.h;
String c3 = c(Double.valueOf(ijp.s));
String format = String.format("%s (%s%%)", e(Double.valueOf(d)), e(Double.valueOf(ijp.i)));
int b2 = b(d);
if (d == 0.0d) {
i = 0;
} else {
i = d > 0.0d ? C15715hv.IeS.ic_arrow_up : C15715hv.IeS.ic_arrow_down;
}
PJ pj = new PJ();
pj.c = c3;
pj.a = format;
pj.b = b2;
pj.e = i;
this.a++;
pj.d = "MY_FUNDS_GROUP_VIEW_TYPE_FOOTER";
arrayList.add(pj);
}
}
return arrayList;
}
private PI b(ThO thO) {
int i = 0;
if (thO == null) {
PI pi = new PI();
pi.c = "";
pi.e = "";
pi.i = "";
pi.d = "";
pi.b = "";
pi.h = b(0.0d);
pi.a = 0;
return pi;
}
double d = thO.m;
String string = this.e.getString(C15715hv.tOB.investment_details_nav, String.format(Locale.US, "%.4f", Double.valueOf(thO.f8378o)));
String string2 = thO.l != null ? this.e.getString(C15715hv.tOB.investment_details_navDate, a(thO.l)) : "";
String c = c(Double.valueOf(thO.t));
String format = String.format("%s (%s%%)", e(Double.valueOf(d)), e(Double.valueOf(thO.k)));
int b = b(d);
if (d != 0.0d) {
i = d > 0.0d ? C15715hv.IeS.ic_arrow_up : C15715hv.IeS.ic_arrow_down;
}
PI pi2 = new PI();
pi2.e = thO.b;
pi2.c = thO.j;
pi2.i = string;
pi2.j = string2;
pi2.d = c;
pi2.b = format;
pi2.h = b;
pi2.a = i;
return pi2;
}
private PK c(IJP ijp) {
String string;
String str = ijp.m;
String str2 = ijp.d;
String str3 = TextUtils.isEmpty(str) ? (String) C6583cXR.c(new Object[]{str2}, -1613428710, 1613428726, (int) System.currentTimeMillis()) : str;
String str4 = TextUtils.isEmpty(str) ? "" : (String) C6583cXR.c(new Object[]{str2}, -1613428710, 1613428726, (int) System.currentTimeMillis());
String string2 = this.e.getString(C15715hv.tOB.investment_number_of_funds, Integer.valueOf(ijp.l));
if (ijp.k == 0) {
string = this.e.getString(C15715hv.tOB.investment_details_client_no_tax);
} else {
string = this.e.getString(C15715hv.tOB.investment_details_client_tax);
}
PK pk = new PK();
pk.c = str2;
pk.e = str3;
pk.a = str4;
pk.d = string2;
pk.b = string;
return pk;
}
}