package o; import com.scb.phone.data.entity.transfer.SingleDataEntity; import com.scb.phone.data.network.service.csent.CSentService; import com.scb.phone.domain.entity.mwpartner.EntityMappingException; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; /* loaded from: classes3.dex */ public final class CbT implements YDg { final Wyh b; private final CSentService c; final C0976StH d; @InterfaceC13391fZD public CbT(CSentService cSentService, C0976StH c0976StH, Wyh wyh) { C14957gcv.e(cSentService, ""); C14957gcv.e(c0976StH, ""); C14957gcv.e(wyh, ""); this.c = cSentService; this.d = c0976StH; this.b = wyh; } /* loaded from: classes3.dex */ static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR>, List> { public static final LWm e = new LWm(); @Override // o.InterfaceC14894gbR public final /* synthetic */ List invoke(SingleDataEntity> singleDataEntity) { Iterator it; String str; ArrayList arrayList; List data = singleDataEntity.getData(); String str2 = ""; C14957gcv.c(data, ""); List list = data; C14957gcv.e(list, ""); ArrayList arrayList2 = new ArrayList(list instanceof Collection ? list.size() : 10); Iterator it2 = list.iterator(); while (it2.hasNext()) { GFb gFb = (GFb) it2.next(); String str3 = gFb.a; String str4 = gFb.e; Number number = gFb.i; Integer valueOf = number != null ? Integer.valueOf(number.intValue()) : null; String str5 = gFb.c; if (str5 == null) { throw new EntityMappingException("consentType can not be null"); } String str6 = gFb.b; String str7 = gFb.d; String str8 = gFb.g; pAE pae = gFb.f; XFI xfi = pae != null ? new XFI(pae.d, pae.a, pae.b) : null; List list2 = gFb.h; if (list2 != null) { List list3 = list2; C14957gcv.e(list3, str2); ArrayList arrayList3 = new ArrayList(list3 instanceof Collection ? list3.size() : 10); for (pAf paf : list3) { arrayList3.add(new C4191bSp(paf.a, paf.d, paf.b)); it2 = it2; str2 = str2; } it = it2; str = str2; arrayList = arrayList3; } else { it = it2; str = str2; arrayList = null; } String str9 = gFb.j; if (str9 != null) { arrayList2.add(new C13968fkN(str3, str4, valueOf, str5, str6, str7, str8, xfi, arrayList, str9)); it2 = it; str2 = str; } else { throw new EntityMappingException("label can not be null"); } } return arrayList2; } LWm() { super(1); } } @Override // o.YDg public final AbstractC13175fSw> e(C6498cUp c6498cUp) { C14957gcv.e(c6498cUp, ""); AbstractC13175fSw>> postPrivacyConsentInquiry = this.c.postPrivacyConsentInquiry(c6498cUp); final LWm lWm = LWm.e; C13372fYk c13372fYk = new C13372fYk(postPrivacyConsentInquiry, new fSS(lWm) { // from class: o.MNH private InterfaceC14894gbR d; @Override // o.fSS public final Object a(Object obj) { InterfaceC14894gbR interfaceC14894gbR = this.d; C14957gcv.e(interfaceC14894gbR, ""); return (List) interfaceC14894gbR.invoke(obj); } { this.d = lWm; } }); C14957gcv.c(c13372fYk, ""); return c13372fYk; } /* loaded from: classes3.dex */ static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR>, Boolean> { public static final Sts b = new Sts(); @Override // o.InterfaceC14894gbR public final /* bridge */ /* synthetic */ Boolean invoke(SingleDataEntity> singleDataEntity) { return Boolean.TRUE; } Sts() { super(1); } } @Override // o.YDg public final AbstractC13175fSw b(C6498cUp c6498cUp) { C14957gcv.e(c6498cUp, ""); AbstractC13175fSw>> updatePrivacyConsent = this.c.updatePrivacyConsent(c6498cUp); final Sts sts = Sts.b; C13372fYk c13372fYk = new C13372fYk(updatePrivacyConsent, new fSS(sts) { // from class: o.Ypt private InterfaceC14894gbR d; @Override // o.fSS public final Object a(Object obj) { InterfaceC14894gbR interfaceC14894gbR = this.d; C14957gcv.e(interfaceC14894gbR, ""); return (Boolean) interfaceC14894gbR.invoke(obj); } { this.d = sts; } }); C14957gcv.c(c13372fYk, ""); return c13372fYk; } @Override // o.YDg public final fRY c(Ush ush) { C14957gcv.e(ush, ""); fRY e = fRY.e(this.c.postGeneralConsent(ush)); C14957gcv.c(e, ""); return e; } @Override // o.YDg public final fRY d(Ush ush) { C14957gcv.e(ush, ""); fRY e = fRY.e(this.c.postCardXGeneralConsentCreate(ush)); C14957gcv.c(e, ""); return e; } /* loaded from: classes3.dex */ static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR, C15848jBq> { private CbT e; @Override // o.InterfaceC14894gbR public final /* synthetic */ C15848jBq invoke(SingleDataEntity singleDataEntity) { Wyh wyh = this.e.b; VWp data = singleDataEntity.getData(); C14957gcv.c(data, ""); VWp vWp = data; C14957gcv.e(vWp, ""); String str = vWp.e; if (str == null) { str = ""; } List list = vWp.c; C14851gaI c14851gaI = null; if (list != null) { List list2 = list; C14957gcv.e(list2, ""); ArrayList arrayList = new ArrayList(list2 instanceof Collection ? list2.size() : 10); for (HNR hnr : list2) { String str2 = hnr.a; String str3 = str2 == null ? "" : str2; String str4 = hnr.e; String str5 = hnr.c; String str6 = str5 == null ? "" : str5; String str7 = hnr.h; String str8 = hnr.b; String str9 = hnr.d; String str10 = str9 == null ? "" : str9; iKp ikp = hnr.j; String str11 = ikp != null ? ikp.b : null; if (str11 == null) { str11 = ""; } iKp ikp2 = hnr.j; String str12 = ikp2 != null ? ikp2.a : null; if (str12 == null) { str12 = ""; } arrayList.add(new C10128dws(str3, str4, str6, str7, str8, str10, new Hub(str11, str12))); } c14851gaI = arrayList; } if (c14851gaI == null) { c14851gaI = C14851gaI.c; } return new C15848jBq(str, c14851gaI); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ HBt(CbT cbT) { super(1); this.e = cbT; } } @Override // o.YDg public final AbstractC13175fSw a(UWr uWr) { C14957gcv.e(uWr, ""); AbstractC13175fSw> postEkycPrivacyConsent = this.c.postEkycPrivacyConsent(uWr); final HBt hBt = new HBt(this); C13372fYk c13372fYk = new C13372fYk(postEkycPrivacyConsent, new fSS(hBt) { // from class: o.oFI private InterfaceC14894gbR a; @Override // o.fSS public final Object a(Object obj) { InterfaceC14894gbR interfaceC14894gbR = this.a; C14957gcv.e(interfaceC14894gbR, ""); return (C15848jBq) interfaceC14894gbR.invoke(obj); } { this.a = hBt; } }); C14957gcv.c(c13372fYk, ""); return c13372fYk; } /* loaded from: classes3.dex */ static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR, Rzc> { private CbT a; @Override // o.InterfaceC14894gbR public final /* synthetic */ Rzc invoke(SingleDataEntity singleDataEntity) { C0976StH c0976StH = this.a.d; C16312nOF data = singleDataEntity.getData(); C14957gcv.c(data, ""); return C0976StH.b(data); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ IeS(CbT cbT) { super(1); this.a = cbT; } } @Override // o.YDg public final AbstractC13175fSw e() { AbstractC13175fSw> postPrivacyConsentsCardXInitiate = this.c.postPrivacyConsentsCardXInitiate(); final IeS ieS = new IeS(this); C13372fYk c13372fYk = new C13372fYk(postPrivacyConsentsCardXInitiate, new fSS(ieS) { // from class: o.ork private InterfaceC14894gbR e; @Override // o.fSS public final Object a(Object obj) { InterfaceC14894gbR interfaceC14894gbR = this.e; C14957gcv.e(interfaceC14894gbR, ""); return (Rzc) interfaceC14894gbR.invoke(obj); } { this.e = ieS; } }); C14957gcv.c(c13372fYk, ""); return c13372fYk; } @Override // o.YDg public final fRY e(String str, C7309clp c7309clp) { C14957gcv.e(str, ""); C14957gcv.e(c7309clp, ""); fRY e = fRY.e(this.c.postEKYCConsentStatus(str, c7309clp)); C14957gcv.c(e, ""); return e; } }