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.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import kotlin.NoWhenBranchMatchedException; import o.LhO; /* renamed from: o.Dk, reason: case insensitive filesystem */ /* loaded from: classes3.dex */ public final class C0295Dk extends BaseAssetsDisplayMapper { private final yGw b; private final String d; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @InterfaceC13391fZD public C0295Dk(yGw ygw, Resources resources, SharedPreferences sharedPreferences, String str, String str2) { super(resources, sharedPreferences, str); C14957gcv.e(ygw, ""); C14957gcv.e(resources, ""); C14957gcv.e(sharedPreferences, ""); C14957gcv.e(str, ""); C14957gcv.e(str2, ""); this.b = ygw; this.d = str2; } public final List c(zHg zhg, boolean z) { C14957gcv.e(zhg, ""); boolean z2 = !b(); if (z) { Set g = this.b.a.g(); List list = zhg.e; C14957gcv.e(list, ""); ArrayList arrayList = new ArrayList(list instanceof Collection ? list.size() : 10); Iterator it = list.iterator(); while (it.hasNext()) { arrayList.add(((LhO) it.next()).a); } List d = C14881gav.d((Iterable) arrayList); C14957gcv.c(g, ""); ArrayList arrayList2 = new ArrayList(); for (Object obj : g) { if (d.contains((String) obj)) { arrayList2.add(obj); } } List d2 = C14881gav.d((Iterable) arrayList2); List list2 = zhg.e; ArrayList arrayList3 = new ArrayList(); for (Object obj2 : list2) { if (!d2.contains(((LhO) obj2).a)) { arrayList3.add(obj2); } } this.b.a.a(new HashSet(d2)); ArrayList arrayList4 = arrayList3; C14957gcv.e(arrayList4, ""); ArrayList arrayList5 = new ArrayList(arrayList4.size()); Iterator it2 = arrayList4.iterator(); while (it2.hasNext()) { arrayList5.add(d((LhO) it2.next(), z2, z)); } return arrayList5; } List list3 = zhg.e; C14957gcv.e(list3, ""); ArrayList arrayList6 = new ArrayList(list3 instanceof Collection ? list3.size() : 10); Iterator it3 = list3.iterator(); while (it3.hasNext()) { arrayList6.add(d((LhO) it3.next(), z2, z)); } return arrayList6; } private final C0375Fe d(LhO lhO, boolean z, boolean z2) { String str; String str2; String str3; String str4; String str5; EnumC0378Fg enumC0378Fg; String str6; String str7; String str8 = lhO.a; String str9 = lhO.b; TfH tfH = lhO.f; if (z) { str = tfH.d; } else { str = tfH.c; } String j = j(str, lhO.h, this.d); C14957gcv.c((Object) j, ""); TfH tfH2 = lhO.e; if (z) { str2 = tfH2.d; } else { str2 = tfH2.c; } C14957gcv.c((Object) str2, ""); TfH tfH3 = lhO.i; if (tfH3 != null) { if (z) { str7 = tfH3.d; } else { str7 = tfH3.c; } str3 = str7; } else { str3 = null; } TfH tfH4 = lhO.d; if (tfH4 != null) { if (z) { str6 = tfH4.d; } else { str6 = tfH4.c; } str4 = str6; } else { str4 = null; } TfH tfH5 = lhO.c; if (tfH5 == null) { str5 = null; } else if (z) { str5 = tfH5.d; } else { str5 = tfH5.c; } int i = IeS.e[lhO.j.ordinal()]; if (i == 1) { enumC0378Fg = EnumC0378Fg.IMAGE; } else { if (i != 2) { throw new NoWhenBranchMatchedException(); } enumC0378Fg = EnumC0378Fg.TEXT; } return new C0375Fe(str8, str9, j, str2, str3, str4, str5, enumC0378Fg, z2, lhO.h); } /* renamed from: o.Dk$IeS */ /* loaded from: classes3.dex */ public final /* synthetic */ class IeS { public static final int[] e; static { int[] iArr = new int[LhO.RVV.values().length]; try { iArr[LhO.RVV.IMAGE.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { iArr[LhO.RVV.TEXT.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } e = iArr; } } }