what-the-bank/sources/o/DH.java

169 lines
6.5 KiB
Java

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.List;
import o.C15715hv;
import o.PRA;
/* loaded from: classes3.dex */
public final class DH extends BaseAssetsDisplayMapper {
@InterfaceC13391fZD
public DH(Resources resources, SharedPreferences sharedPreferences, String str) {
super(resources, sharedPreferences, str);
}
public final C1191Xp d(DpR dpR, C1189Xo c1189Xo, SBO sbo, String str) {
String c;
String c2;
String c3;
if ("BNPL_PAYMENT".equals(c1189Xo.j())) {
c1189Xo.a(C6583cXR.e(c1189Xo.c(), true));
c1189Xo.v = c(c1189Xo.v, true);
} else {
c1189Xo.a(i(c1189Xo.S));
}
if ("B2K".equals(sbo.j) || (str != null && str.equals(c1189Xo.r))) {
c1189Xo.s = c1189Xo.t.replaceFirst(c1189Xo.aj, "[CREDITCARD_MASK]").replace("[CREDITCARD_MASK]", g(c1189Xo.aj));
}
String e = e(c1189Xo.at == null ? C15715hv.tOB.review_success_bill_payment : C15715hv.tOB.billpayment_successful_001);
if ("PURCHASE_TRANSFER_FUNCTION".equalsIgnoreCase(c1189Xo.j()) || "PURCHASE_TOPUP_FUNCTION".equalsIgnoreCase(c1189Xo.j()) || "PURCHASE_BILL_PAYMENT_FUNCTION".equalsIgnoreCase(c1189Xo.j()) || "PURCHASE_CREDIT_CARD_FUNCTION".equalsIgnoreCase(c1189Xo.j())) {
e = e(C15715hv.tOB.successful_purchase_payment);
}
String str2 = "";
if (dpR.k) {
if (gjJ.b((CharSequence) dpR.r)) {
c = "";
} else {
c = c(C15715hv.tOB.ebill_selected_reference, c1189Xo.ad, dpR.r);
}
if (gjJ.b((CharSequence) dpR.s)) {
c2 = "";
} else {
c2 = c(C15715hv.tOB.ebill_selected_reference, c1189Xo.ah, dpR.s);
}
if (gjJ.b((CharSequence) dpR.q)) {
c3 = "";
} else {
c3 = c(C15715hv.tOB.ebill_selected_reference, c1189Xo.ag, dpR.q);
}
c1189Xo.t = C6583cXR.e(c1189Xo.h, c, c2, c3);
c1189Xo.s = C6583cXR.e(c1189Xo.h, c, c2, c3);
}
if (c1189Xo.N) {
e = e(C15715hv.tOB.Level_up_succesful_label);
}
C1191Xp c1191Xp = new C1191Xp();
if (dpR.x != null) {
str2 = d(dpR.x);
}
c1191Xp.f = str2;
c1191Xp.l = dpR.n;
c1191Xp.r = String.format(e(C15715hv.tOB.reference_id), dpR.n);
c1191Xp.s = e;
c1191Xp.t = c(dpR.u);
c1191Xp.p = c1189Xo;
c1191Xp.g = sbo.j;
c1191Xp.n = dpR.t;
c1191Xp.i = dpR.g;
c1191Xp.j = a(dpR.e, c1189Xo.aa, c1189Xo.G);
c1191Xp.f8452o = c1189Xo.N;
return c1191Xp;
}
public final C1191Xp b(MjP mjP, C1189Xo c1189Xo, SBO sbo, String str) {
String e;
XU xu;
if ("BNPL_PAYMENT".equals(c1189Xo.j())) {
c1189Xo.a(C6583cXR.e(c1189Xo.c(), true));
c1189Xo.v = c(c1189Xo.v, true);
} else {
c1189Xo.a(i(c1189Xo.S));
}
if ("B2K".equals(sbo.j) || (str != null && str.equals(c1189Xo.r))) {
c1189Xo.s = c1189Xo.t.replaceFirst(c1189Xo.aj, "[CREDITCARD_MASK]").replace("[CREDITCARD_MASK]", g(c1189Xo.aj));
}
String e2 = e(c1189Xo.at == null ? C15715hv.tOB.review_success_bill_payment : C15715hv.tOB.billpayment_successful_001);
if ("PURCHASE_TRANSFER_FUNCTION".equalsIgnoreCase(c1189Xo.j()) || "PURCHASE_TOPUP_FUNCTION".equalsIgnoreCase(c1189Xo.j()) || "PURCHASE_BILL_PAYMENT_FUNCTION".equalsIgnoreCase(c1189Xo.j()) || "PURCHASE_CREDIT_CARD_FUNCTION".equalsIgnoreCase(c1189Xo.j())) {
e2 = e(C15715hv.tOB.successful_purchase_payment);
}
String c = gjJ.b((CharSequence) mjP.n) ? "" : c(C15715hv.tOB.ebill_selected_reference, c1189Xo.ad, mjP.n);
String c2 = gjJ.b((CharSequence) mjP.k) ? "" : c(C15715hv.tOB.ebill_selected_reference, c1189Xo.ah, mjP.k);
String c3 = gjJ.b((CharSequence) mjP.l) ? "" : c(C15715hv.tOB.ebill_selected_reference, c1189Xo.ag, mjP.l);
if (c1189Xo.P != null) {
e = C6583cXR.e(c, c2);
} else {
e = C6583cXR.e(c1189Xo.f(), c1189Xo.h, c, c2, c3);
}
c1189Xo.t = e;
if (c1189Xo.N) {
e2 = e(C15715hv.tOB.Level_up_succesful_label);
}
ruq ruqVar = mjP.s;
if (ruqVar == null) {
xu = new XU("", "", "");
} else {
xu = new XU(gjJ.b((CharSequence) ruqVar.c) ? "" : ruqVar.c, gjJ.b((CharSequence) ruqVar.e) ? "" : ruqVar.e, gjJ.b((CharSequence) ruqVar.a) ? "" : ruqVar.a);
}
C1191Xp c1191Xp = new C1191Xp();
c1191Xp.f = mjP.g != null ? d(mjP.g) : "";
c1191Xp.l = mjP.h;
c1191Xp.r = String.format(e(C15715hv.tOB.reference_id), mjP.h);
c1191Xp.s = e2;
c1191Xp.t = c(mjP.m);
c1191Xp.p = c1189Xo;
c1191Xp.g = sbo.j;
c1191Xp.n = null;
c1191Xp.j = a(mjP.c, c1189Xo.aa, c1189Xo.G);
c1191Xp.f8452o = c1189Xo.N;
c1191Xp.x = xu;
return c1191Xp;
}
public static C1191Xp a(C1188Xn c1188Xn) {
C1191Xp c1191Xp = new C1191Xp();
c1191Xp.k = c1188Xn;
return c1191Xp;
}
private static TO a(Jky jky, List<XL> list, boolean z) {
if (z && list != null && !list.isEmpty()) {
if (jky != null && !jky.e.isEmpty()) {
list.addAll(d(jky.e));
}
return new TO(list);
}
if (jky != null && !jky.e.isEmpty()) {
return a(jky);
}
return new TO(new ArrayList());
}
public static TO a(Jky jky) {
if (jky == null) {
return new TO(new ArrayList());
}
return new TO(d(jky.e));
}
private static List<XL> d(List<jSX> list) {
if (list == null) {
return new ArrayList();
}
YKU yku = new YKU(list);
return (List) new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw() { // from class: o.DE
@Override // o.InterfaceC1244Ytw
public final Object d(Object obj) {
return DH.c((jSX) obj);
}
})).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8()));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ XL c(jSX jsx) {
return new XL(jsx.f, jsx.i, jsx.d, jsx.c, jsx.e, jsx.b, jsx.a);
}
}