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.Collections; import java.util.Iterator; import java.util.List; import o.C15715hv; import o.EW; import o.QG; import o.QK; import o.QN; import o.QR; import o.YO; import o.YP; import org.threeten.bp.OffsetDateTime; /* renamed from: o.oM, reason: case insensitive filesystem */ /* loaded from: classes3.dex */ public final class C16430oM extends BaseAssetsDisplayMapper { private final String b; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @InterfaceC13391fZD public C16430oM(Resources resources, SharedPreferences sharedPreferences, String str) { super(resources, sharedPreferences, str); C14957gcv.e(resources, ""); C14957gcv.e(sharedPreferences, ""); C14957gcv.e(str, ""); this.b = str; } public final EW d(gkG gkg) { EnumC1276Zl enumC1276Zl; EnumC1276Zl enumC1276Zl2; QL ql; QR qr; List list; QN qn; C14957gcv.e(gkg, ""); ArrayList arrayList = new ArrayList(); EnumC1276Zl enumC1276Zl3 = EnumC1276Zl.DEFAULT; new C0527It(); luP lup = gkg.b; if (lup != null) { C14957gcv.e(lup, ""); C0521Ip c0521Ip = new C0521Ip(lup.e, lup.c, lup.d, lup.a, lup.b); C14957gcv.e(c0521Ip, ""); if (c0521Ip.e.length() > 0) { QN.HBt a = QN.a(); a.f = c0521Ip.d; a.h = m(c0521Ip.b); a.a = c(C15715hv.tOB.ref_id, c0521Ip.c); a.c = c0521Ip.e; a.d = C15715hv.IeS.ic_check_circle_black_48dp; qn = new QN(a, YD.REVAMP_SUCCESS_HEADER, (byte) 0); C14957gcv.c(qn, ""); } else { QN.HBt a2 = QN.a(); a2.f = c0521Ip.d; a2.a = m(c0521Ip.b); a2.c = c(C15715hv.tOB.ref_id, c0521Ip.c); a2.d = C15715hv.IeS.ic_check_circle_black_48dp; qn = new QN(a2, YD.REVAMP_SUCCESS_HEADER, (byte) 0); C14957gcv.c(qn, ""); } arrayList.add(qn); } List list2 = gkg.e; if (list2 != null) { C14957gcv.e(list2, ""); List list3 = list2; C14957gcv.e(list3, ""); ArrayList arrayList2 = new ArrayList(list3 instanceof Collection ? list3.size() : 10); Iterator it = list3.iterator(); while (it.hasNext()) { lWG lwg = (lWG) it.next(); C14957gcv.e(lwg, ""); boolean z = lwg.a; YP.IeS ieS = YP.c; EnumC1268Zh b = YP.IeS.b(lwg.j); YP.IeS ieS2 = YP.c; EnumC1268Zh b2 = YP.IeS.b(lwg.g); YO.RVV rvv = YO.c; EnumC1265Zg c = YO.RVV.c(lwg.f); String str = lwg.b; String str2 = lwg.h; List list4 = lwg.e; C14957gcv.e(list4, ""); StringBuilder sb = new StringBuilder(""); EnumC1276Zl enumC1276Zl4 = enumC1276Zl3; int size = list4.size(); Iterator it2 = it; int i = 0; while (i < size) { if (list4.get(i).length() > 0) { list = list4; sb.append(list4.get(i)); if (i < size - 1) { sb.append("\n"); } } else { list = list4; } i++; list4 = list; } String obj = sb.toString(); C14957gcv.c((Object) obj, ""); String b_ = b_(lwg.c); C14957gcv.c((Object) b_, ""); arrayList2.add(new C0516Ik(z, b, b2, c, str, str2, obj, b_, lwg.i, lwg.d)); enumC1276Zl3 = enumC1276Zl4; it = it2; } enumC1276Zl = enumC1276Zl3; ArrayList arrayList3 = arrayList2; C14957gcv.e(arrayList3, ""); ArrayList arrayList4 = new ArrayList(); for (C0516Ik c0516Ik : arrayList3) { if (c0516Ik.e && c0516Ik.j != EnumC1265Zg.UNKNOWN) { arrayList4.add(new QQ(true)); } if (c0516Ik.j == EnumC1265Zg.TEXT_TWO_COLUMNS) { C14957gcv.e(c0516Ik, ""); QK.LWm e = QK.e(); e.g = c0516Ik.a; e.h = c0516Ik.f; if (c0516Ik.b.length() > 0) { e.c = c0516Ik.b; } if (c0516Ik.c.length() > 0) { e.a = c0516Ik.c; } if (c0516Ik.g == EnumC1268Zh.SMALL) { e.k = true; } if (c0516Ik.h == EnumC1268Zh.SMALL) { e.l = true; } if (c0516Ik.d) { e.m = true; } QK qk = new QK(e, (byte) 0); C14957gcv.c(qk, ""); arrayList4.add(qk); } else if (c0516Ik.j == EnumC1265Zg.TEXT) { C14957gcv.e(c0516Ik, ""); if (c0516Ik.f.length() > 0) { QR.LWm b3 = QR.b(); b3.g = c0516Ik.a; b3.e = c0516Ik.f; b3.c = C15715hv.LWm.gray; if (c0516Ik.d) { b3.i = true; } if (c0516Ik.h == EnumC1268Zh.SMALL) { b3.j = true; } if (c0516Ik.g == EnumC1268Zh.SMALL) { b3.h = true; } qr = new QR(b3, (byte) 0); } else { qr = null; } if (qr != null) { arrayList4.add(qr); } } else if (c0516Ik.j == EnumC1265Zg.MINI_QR) { C14957gcv.e(c0516Ik, ""); QG.RVV a3 = QG.a(); List singletonList = Collections.singletonList(new XL(c0516Ik.j.toString(), c0516Ik.a, null, null, null, c0516Ik.i)); C14957gcv.c(singletonList, ""); a3.e = singletonList; QG qg = new QG((QG.RVV) a3); C14957gcv.c(qg, ""); arrayList4.add(qg); } } arrayList.addAll(arrayList4); } else { enumC1276Zl = enumC1276Zl3; } try { enumC1276Zl2 = EnumC1276Zl.valueOf(gkg.h); } catch (IllegalArgumentException unused) { enumC1276Zl2 = enumC1276Zl; } EW.LWm b4 = EW.b(arrayList, "slip"); List list5 = gkg.a; if (list5 != null) { C14957gcv.e(list5, ""); ArrayList arrayList5 = new ArrayList(); for (zQA zqa : list5) { C14957gcv.e(zqa, ""); YD k = k(zqa.e); if (((k == YD.FOOTER_CONTENT || k == YD.FOOTER_REMARK) && zqa.a.length() == 0) || (k == YD.FOOTER_IMAGE && zqa.b.length() == 0)) { ql = null; } else { String str3 = zqa.a; YD k2 = k(zqa.e); String b_2 = b_(zqa.b); C14957gcv.c((Object) b_2, ""); ql = new QL(str3, k2, b_2); } if (ql != null) { arrayList5.add(ql); } } b4.b = arrayList5; } String str4 = gkg.c.a; if (str4 == null) { str4 = ""; } b4.k = str4; String str5 = gkg.c.b; if (str5 == null) { str5 = ""; } b4.m = str5; String str6 = gkg.c.d; if (str6 == null) { str6 = ""; } b4.f8147o = str6; b4.l = enumC1276Zl2; b4.t = gkg.g; b4.j = gkg.d; EW c2 = b4.c(); C14957gcv.c(c2, ""); return c2; } private String m(String str) { C14957gcv.e(str, ""); if (str.length() == 0) { return str; } String d = d(OffsetDateTime.parse(cXG.a(str))); C14957gcv.c((Object) d, ""); return d; } private static YD k(String str) { C14957gcv.e(str, ""); String d = C2974aoj.d(str); int hashCode = d.hashCode(); if (hashCode != -911436124) { if (hashCode != -314580553) { if (hashCode == 1670366677 && d.equals("footer_content")) { return YD.FOOTER_CONTENT; } } else if (d.equals("footer_image")) { return YD.FOOTER_IMAGE; } } else if (d.equals("footer_remark")) { return YD.FOOTER_REMARK; } return YD.FOOTER_CONTENT; } }