package o; import android.content.res.Resources; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import o.C0690Mh; import o.C15715hv; import o.Hft; import o.InterfaceC9281dgl; import o.LhO; import o.MK; import o.ZI; /* renamed from: o.bkn */ /* loaded from: classes4.dex */ public final class C5002bkn extends ZI { private final C15756iN a; public final KJS b; private final C16142lc c; private final C17064te d; public QJg e; private final C12374ewx g; private final Resources h; private final C0295Dk i; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @InterfaceC13391fZD public C5002bkn(C16903sI c16903sI, Resources resources, C12374ewx c12374ewx, KJS kjs, C15756iN c15756iN, C16142lc c16142lc, C17064te c17064te, C0295Dk c0295Dk) { super(c16903sI); C14957gcv.e(c16903sI, ""); C14957gcv.e(resources, ""); C14957gcv.e(c12374ewx, ""); C14957gcv.e(kjs, ""); C14957gcv.e(c15756iN, ""); C14957gcv.e(c16142lc, ""); C14957gcv.e(c17064te, ""); C14957gcv.e(c0295Dk, ""); this.h = resources; this.g = c12374ewx; this.b = kjs; this.a = c15756iN; this.c = c16142lc; this.d = c17064te; this.i = c0295Dk; } /* renamed from: o.bkn$IeS */ /* loaded from: classes4.dex */ public static final class IeS { private IeS() { } public /* synthetic */ IeS(byte b) { this(); } } public final void d(QJg qJg) { C14957gcv.e(qJg, ""); List a = this.d.a(qJg); List e = this.d.e(qJg); String b = this.d.b(qJg); ArrayList arrayList = new ArrayList(); if (c(qJg)) { arrayList.add(new MK.IeS(a)); } if (e(qJg)) { arrayList.add(new MK.HBt(b)); arrayList.add(new MK.Sts(e)); } ZI.IeS ieS = new ZI.IeS(arrayList) { // from class: o.bko private List b; @Override // o.ZI.IeS public final void e(Object obj) { C5002bkn.e(this.b, (InterfaceC9281dgl.IeS) obj); } { this.b = arrayList; } }; if (this.f != 0) { ieS.e(this.f); } if (this.f != 0) { this.f.ar_(); } } public final boolean c() { QJg d = this.g.d(626L, true); this.e = d; return d != null && c(d); } public final void b() { if (this.a.e()) { if (this.f != 0) { this.f.y(); } this.c.c(new RVV(this), new HBt(this), new Hft.RVV("FINANCIALMALL_LANDING", "BANNER")); return; } C5005bkq c5005bkq = new C5005bkq(); if (this.f != 0) { c5005bkq.e(this.f); } if (this.f != 0) { this.f.ar_(); } } /* renamed from: o.bkn$HBt */ /* loaded from: classes4.dex */ public static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR { private C5002bkn d; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Throwable th) { C14957gcv.e(th, ""); C5002bkn.b(this.d); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ HBt(C5002bkn c5002bkn) { super(1); this.d = c5002bkn; } } /* renamed from: o.bkn$RVV */ /* loaded from: classes4.dex */ public final /* synthetic */ class RVV extends C14954gcs implements InterfaceC14894gbR { @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(zHg zhg) { zHg zhg2 = zhg; C14957gcv.e(zhg2, ""); C5002bkn.c((C5002bkn) this.f, zhg2); return C14866gag.c; } RVV(Object obj) { super(1, obj, C5002bkn.class, "getAdsSuccess", "getAdsSuccess(Lcom/scb/phone/domain/entity/transferandpay/SlipAds;)V"); } } public static /* synthetic */ void d(InterfaceC9281dgl.IeS ieS) { ieS.d(); ieS.b(); } public static /* synthetic */ void a(C5002bkn c5002bkn) { C14957gcv.e(c5002bkn, ""); c5002bkn.d(); } public static /* synthetic */ void e(List list, InterfaceC9281dgl.IeS ieS) { C14957gcv.e(list, ""); ieS.e((List) list); } public static /* synthetic */ void d(List list, InterfaceC9281dgl.IeS ieS) { C14957gcv.e(list, ""); if (!list.isEmpty()) { ieS.a(list); } ieS.b(); } public static /* synthetic */ void d(C5002bkn c5002bkn) { C14957gcv.e(c5002bkn, ""); if (!c5002bkn.c()) { c5002bkn.d(); return; } QJg qJg = c5002bkn.e; if (qJg != null) { c5002bkn.d(qJg); c5002bkn.b(); } } public static final /* synthetic */ void c(C5002bkn c5002bkn, zHg zhg) { List list = zhg.e; ArrayList arrayList = new ArrayList(); for (Object obj : list) { if (((LhO) obj).j == LhO.RVV.IMAGE) { arrayList.add(obj); } } ZI.IeS ieS = new ZI.IeS(c5002bkn.i.c(new zHg(C14881gav.c(arrayList, 5)), false)) { // from class: o.bkp private List c; @Override // o.ZI.IeS public final void e(Object obj2) { C5002bkn.d(this.c, (InterfaceC9281dgl.IeS) obj2); } { this.c = r1; } }; if (c5002bkn.f != 0) { ieS.e(c5002bkn.f); } if (c5002bkn.f != 0) { c5002bkn.f.ar_(); } } public static final /* synthetic */ void b(C5002bkn c5002bkn) { C5005bkq c5005bkq = new C5005bkq(); if (c5002bkn.f != 0) { c5005bkq.e(c5002bkn.f); } if (c5002bkn.f != 0) { c5002bkn.f.ar_(); } } public final void d() { if (this.f != 0) { this.f.ar_(); } d(this.h.getString(C15715hv.tOB.financial_mall_error_title), this.h.getString(C15715hv.tOB.financial_mall_error_detail), C0690Mh.IeS.NAVIGATE_BACK); } private static boolean c(QJg qJg) { boolean z; List list; List list2; Object obj; List list3 = null; if (qJg != null && (list2 = qJg.M) != null) { Iterator it = list2.iterator(); while (true) { if (!it.hasNext()) { obj = null; break; } obj = it.next(); if (((QJg) obj).A == 627) { break; } } QJg qJg2 = (QJg) obj; if (qJg2 != null) { list3 = qJg2.M; } } List list4 = list3; boolean z2 = list4 == null || list4.isEmpty(); if (qJg != null && (list = qJg.M) != null) { List list5 = list; if (!(list5 instanceof Collection) || !list5.isEmpty()) { for (QJg qJg3 : list5) { if (qJg3.A == 627 && C14957gcv.b((Object) qJg3.L, (Object) "GROUP") && C14957gcv.b((Object) qJg3.F, (Object) "ICON_TILE")) { z = true; break; } } } } z = false; return (z2 ^ true) && z; } private static boolean e(QJg qJg) { boolean z; List list; List list2; Object obj; List list3 = null; if (qJg != null && (list2 = qJg.M) != null) { Iterator it = list2.iterator(); while (true) { if (!it.hasNext()) { obj = null; break; } obj = it.next(); if (((QJg) obj).A == 633) { break; } } QJg qJg2 = (QJg) obj; if (qJg2 != null) { list3 = qJg2.M; } } List list4 = list3; boolean z2 = list4 == null || list4.isEmpty(); if (qJg != null && (list = qJg.M) != null) { List list5 = list; if (!(list5 instanceof Collection) || !list5.isEmpty()) { for (QJg qJg3 : list5) { if (qJg3.A == 633 && C14957gcv.b((Object) qJg3.L, (Object) "GROUP") && C14957gcv.b((Object) qJg3.F, (Object) "CARD_TILE_VERTICAL")) { z = true; break; } } } } z = false; return (z2 ^ true) && z; } static { new IeS((byte) 0); } }