package o; import android.content.SharedPreferences; import android.content.res.Resources; import com.scb.phone.presentation.mapper.transferandpay.BaseAssetsDisplayMapper; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import o.C15715hv; import org.threeten.bp.OffsetDateTime; /* renamed from: o.ly, reason: case insensitive filesystem */ /* loaded from: classes3.dex */ public final class C16184ly extends BaseAssetsDisplayMapper { private List b; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @InterfaceC13391fZD public C16184ly(Resources resources, SharedPreferences sharedPreferences, String str) { super(resources, sharedPreferences, str); C14957gcv.e(resources, ""); C14957gcv.e(sharedPreferences, ""); C14957gcv.e(str, ""); this.b = C14851gaI.c; } private final boolean m(String str) { return (this.b.isEmpty() ^ true) && this.b.contains(str); } public final List e(List list) { C14957gcv.e(list, ""); List list2 = list; C14957gcv.e(list2, ""); ArrayList arrayList = new ArrayList(list2 instanceof Collection ? list2.size() : 10); Iterator it = list2.iterator(); while (it.hasNext()) { arrayList.add(a((Dzn) it.next(), new qXn((byte) 0), false)); } return arrayList; } public final List e(List list, qXn qxn, boolean z, boolean z2) { C14957gcv.e(list, ""); C14957gcv.e(qxn, ""); if (z) { List list2 = list; C14957gcv.e(list2, ""); ArrayList arrayList = new ArrayList(list2 instanceof Collection ? list2.size() : 10); Iterator it = list2.iterator(); while (it.hasNext()) { arrayList.add(a((Dzn) it.next(), qxn, z2)); } ArrayList arrayList2 = new ArrayList(); for (Object obj : arrayList) { if (((C0367Fb) obj).c.contains("MUTUALFUND_SOURCE")) { arrayList2.add(obj); } } return arrayList2; } List list3 = list; C14957gcv.e(list3, ""); ArrayList arrayList3 = new ArrayList(list3 instanceof Collection ? list3.size() : 10); Iterator it2 = list3.iterator(); while (it2.hasNext()) { arrayList3.add(a((Dzn) it2.next(), qxn, z2)); } return arrayList3; } private static String c(String str, String str2) { if (str == null) { return str2; } String str3 = str; if (str3.length() == 0) { str3 = str2; } String str4 = str3; return str4 == null ? str2 : str4; } public static List d(List list) { C14957gcv.e(list, ""); List list2 = list; C14957gcv.e(list2, ""); ArrayList arrayList = new ArrayList(list2 instanceof Collection ? list2.size() : 10); for (gPE gpe : list2) { arrayList.add(new IB(gpe.c, gpe.a)); } return arrayList; } /* renamed from: o.ly$Sts */ /* loaded from: classes3.dex */ public static final class Sts { private Sts() { } public /* synthetic */ Sts(byte b) { this(); } } private C0367Fb a(Dzn dzn, qXn qxn, boolean z) { String e; String e2; String e3; int i; String substring; String substring2; String substring3; String str; C14957gcv.e(dzn, ""); C14957gcv.e(qxn, ""); C14851gaI c14851gaI = dzn.c; if (c14851gaI == null) { c14851gaI = C14851gaI.c; } this.b = c14851gaI; C0367Fb d = C0367Fb.d(); d.e = c(dzn); d.g = dzn.j; OffsetDateTime offsetDateTime = dzn.L; String str2 = "-"; if (offsetDateTime == null) { e = "-"; } else { e = e(offsetDateTime); C14957gcv.c((Object) e, ""); } d.al = e; OffsetDateTime offsetDateTime2 = dzn.x; if (offsetDateTime2 == null) { e2 = "-"; } else { e2 = e(offsetDateTime2); C14957gcv.c((Object) e2, ""); } d.R = e2; d.am = c(dzn.N); d.B = c(dzn.q); d.X = dzn.F; d.d = c(dzn.a); d.v = c(dzn.s); d.w = c(dzn.r); Double d2 = dzn.r; d.D = d2 != null ? d2.doubleValue() : 0.0d; d.Q = c(dzn.y); Integer d3 = d(dzn.r, dzn.s); C14957gcv.c(d3, ""); d.y = d3.intValue(); String str3 = dzn.v; String str4 = dzn.D; if (str4 == null) { str4 = ""; } d.S = c(str3, str4); d.O = c(dzn.v, ""); if (dzn.u != VMt.PARTIAL) { e3 = e(C15715hv.tOB.amount_due); } else { e3 = e(C15715hv.tOB.remaining_due); } d.N = e3; VMt vMt = dzn.u; if (vMt != VMt.PAID && vMt != VMt.OVERPAID) { i = C15715hv.IeS.ic_bill_credit_card; } else { i = C15715hv.IeS.ic_check_circle_black_48dp; } d.E = i; d.L = dzn.u == VMt.PAID || dzn.u == VMt.OVERPAID; String str5 = dzn.m; if (!(str5 == null || gdZ.d((CharSequence) str5))) { String str6 = dzn.m; if (str6 != null) { String str7 = dzn.m; substring = str6.substring(str7 != null ? str7.length() - 4 : 0); C14957gcv.c((Object) substring, ""); } substring = null; } else { String str8 = dzn.j; if (str8 != null) { String str9 = dzn.j; substring = str8.substring(str9 != null ? str9.length() - 4 : 0); C14957gcv.c((Object) substring, ""); } substring = null; } d.r = substring; String str10 = dzn.m; if (!(str10 == null || gdZ.d((CharSequence) str10))) { String str11 = dzn.m; if (str11 != null) { substring2 = str11.substring(0, 4); C14957gcv.c((Object) substring2, ""); } substring2 = null; } else { String str12 = dzn.j; if (str12 != null) { substring2 = str12.substring(0, 4); C14957gcv.c((Object) substring2, ""); } substring2 = null; } d.s = substring2; String str13 = dzn.m; if (!(str13 == null || gdZ.d((CharSequence) str13))) { String str14 = dzn.m; if (str14 != null) { substring3 = str14.substring(4, 6); C14957gcv.c((Object) substring3, ""); } substring3 = null; } else { String str15 = dzn.j; if (str15 != null) { substring3 = str15.substring(4, 6); C14957gcv.c((Object) substring3, ""); } substring3 = null; } d.t = substring3; d.q = b(dzn.j, dzn.m); d.p = b_(dzn.n); d.V = dzn.z; d.U = dzn.B; d.T = dzn.C; d.f8169o = dzn.h; d.M = 1 == dzn.E; String str16 = dzn.l; if (!(!(str16 == null || gdZ.d((CharSequence) str16)))) { str = "NORMAL"; } else { str = dzn.l; } d.u = str; d.an = dzn.K; d.W = dzn.D; d.ai = c(Double.valueOf(dzn.M)); d.H = dzn.t; d.P = dzn.A; d.x = dzn.p; d.ap = dzn.Q; d.ar = c(dzn.O); d.ao = dzn.S != null ? a(dzn.S) : null; d.aa = m("DEEJUNG_INSTALLMENT") || m("DEEJUNG_INSTALLMENT_DISABLED"); d.F = m("DEEJUNG_INSTALLMENT_DISABLED"); d.Y = m("DEEJUNG_TRANSFER") || m("DEEJUNG_TRANSFER_DISABLED"); d.G = m("DEEJUNG_TRANSFER_DISABLED"); d.ah = m("TEMP_CREDIT_LIMIT") || m("TEMP_CREDIT_LIMIT_DISABLED"); d.I = m("TEMP_CREDIT_LIMIT_DISABLED"); d.ad = m("E_STATEMENT_EMAIL"); d.ae = m("E_STATEMENT_CHANNEL"); d.ag = m("REWARD_REDEMPTION"); d.af = m("POINT_2_PAY"); d.m = dzn.g; d.c = dzn.c; OffsetDateTime offsetDateTime3 = dzn.H; if (offsetDateTime3 != null) { str2 = e(offsetDateTime3); C14957gcv.c((Object) str2, ""); } d.aj = str2; d.z = b_(dzn.k); d.h = dzn.f; d.b = dzn.b; d.a = dzn.d; d.ac = dzn.I; d.A = b_(dzn.f8141o); d.Z = dzn.G; d.l = qxn.d; d.k = qxn.a; d.n = qxn.c; d.ak = dzn.J; d.K = z; d.J = dzn.w; C14957gcv.c(d, ""); return d; } static { new Sts((byte) 0); } }