163 lines
5.1 KiB
Java
163 lines
5.1 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.SharedPreferences;
|
||
|
import android.content.res.Resources;
|
||
|
import android.text.TextUtils;
|
||
|
import com.scb.phone.presentation.mapper.transferandpay.BaseAssetsDisplayMapper;
|
||
|
import java.util.ArrayList;
|
||
|
import o.C15715hv;
|
||
|
import o.ES;
|
||
|
import o.QK;
|
||
|
import o.QM;
|
||
|
import o.QO;
|
||
|
import o.QR;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public final class CC extends C16181lx {
|
||
|
private final BaseAssetsDisplayMapper d;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public CC(Resources resources, SharedPreferences sharedPreferences, BaseAssetsDisplayMapper baseAssetsDisplayMapper) {
|
||
|
super(resources, sharedPreferences);
|
||
|
this.d = baseAssetsDisplayMapper;
|
||
|
}
|
||
|
|
||
|
public final ES b(VJd vJd, EKc eKc, BHL bhl, String str, eWY ewy, mKA mka, boolean z, boolean z2) {
|
||
|
String str2;
|
||
|
String str3;
|
||
|
String str4;
|
||
|
this.a = new ArrayList();
|
||
|
ES.IeS a = ES.a();
|
||
|
QK.LWm e = QK.e();
|
||
|
e.g = e(C15715hv.tOB.from);
|
||
|
e.h = b(eKc);
|
||
|
e.a = c(vJd.b, z);
|
||
|
e.c = C6583cXR.VR_(C15715hv.IeS.bankicon_scb).toString();
|
||
|
QK.LWm e2 = QK.e();
|
||
|
e2.g = e(C15715hv.tOB.to);
|
||
|
if (str.equals("th")) {
|
||
|
str2 = mka.j;
|
||
|
} else {
|
||
|
str2 = mka.g;
|
||
|
}
|
||
|
e2.h = str2;
|
||
|
String str5 = mka.a;
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(c(C15715hv.tOB.biller_id, str5));
|
||
|
sb.append("\n");
|
||
|
if (str.equals("th")) {
|
||
|
str3 = mka.A;
|
||
|
} else {
|
||
|
str3 = mka.B;
|
||
|
}
|
||
|
sb.append(c(str3, bhl.i));
|
||
|
sb.append("\n");
|
||
|
if (str.equals("th")) {
|
||
|
str4 = mka.C;
|
||
|
} else {
|
||
|
str4 = mka.D;
|
||
|
}
|
||
|
sb.append(c(str4, bhl.f));
|
||
|
e2.a = sb.toString();
|
||
|
e2.c = this.d.b_(mka.i);
|
||
|
if (z2) {
|
||
|
e.e = true;
|
||
|
e2.e = true;
|
||
|
e2.k = true;
|
||
|
this.a.add(new QK(e, (byte) 0));
|
||
|
this.a.add(new QK(e2, (byte) 0));
|
||
|
this.a.add(new QQ(true));
|
||
|
QO.IeS a2 = QO.a();
|
||
|
a2.g = e(C15715hv.tOB.amount);
|
||
|
a2.h = c(Double.valueOf(Double.parseDouble(bhl.c)));
|
||
|
QO.IeS a3 = QO.a();
|
||
|
a3.g = e(C15715hv.tOB.deals_buy_deal_fee);
|
||
|
a3.h = ewy.r;
|
||
|
a2.l = true;
|
||
|
this.a.add(a2.d());
|
||
|
a3.k = true;
|
||
|
if (((Double) C15602gz.b(new Object[]{ewy.r}, 108298166, -108298165, (int) System.currentTimeMillis())).doubleValue() <= 0.0d) {
|
||
|
a3.m = true;
|
||
|
}
|
||
|
this.a.add(a3.d());
|
||
|
this.a.add(new QQ(true));
|
||
|
} else {
|
||
|
this.a.add(new QK(e, (byte) 0));
|
||
|
this.a.add(new QQ());
|
||
|
this.a.add(new QK(e2, (byte) 0));
|
||
|
this.a.add(new QQ());
|
||
|
QO.IeS d = QO.d();
|
||
|
d.g = e(C15715hv.tOB.amount);
|
||
|
d.h = c(Double.valueOf(Double.parseDouble(bhl.c)));
|
||
|
QO.IeS d2 = QO.d();
|
||
|
d2.g = e(C15715hv.tOB.deals_buy_deal_fee);
|
||
|
d2.h = ewy.r;
|
||
|
this.a.add(d.d());
|
||
|
this.a.add(new QQ());
|
||
|
this.a.add(d2.d());
|
||
|
this.a.add(new QQ());
|
||
|
}
|
||
|
if (bhl.j != null && !bhl.j.isEmpty()) {
|
||
|
QM.IeS b = QM.b();
|
||
|
b.g = e(C15715hv.tOB.deals_buy_deal_item_details);
|
||
|
b.h = bhl.b;
|
||
|
b.c = bhl.e;
|
||
|
b.d = this.d.b_(bhl.j);
|
||
|
this.a.add(new QM(b, (byte) 0));
|
||
|
this.a.add(new QQ(z2));
|
||
|
} else {
|
||
|
QR.LWm b2 = QR.b();
|
||
|
b2.g = e(C15715hv.tOB.deals_buy_deal_item_details);
|
||
|
b2.e = bhl.b;
|
||
|
b2.b = bhl.e;
|
||
|
if (z2) {
|
||
|
b2.n = true;
|
||
|
}
|
||
|
if (!TextUtils.isEmpty(vJd.c)) {
|
||
|
this.a.add(new QR(b2, (byte) 0));
|
||
|
this.a.add(new QQ(z2));
|
||
|
} else {
|
||
|
this.a.add(new QR(b2, (byte) 0));
|
||
|
}
|
||
|
}
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
if (ewy.f8959o != null && !ewy.f8959o.isEmpty()) {
|
||
|
String str6 = ewy.f8959o.get(0);
|
||
|
if (!str6.isEmpty()) {
|
||
|
QK.LWm e3 = QK.e();
|
||
|
e3.g = e(C15715hv.tOB.deals_buy_deal_ship_to);
|
||
|
e3.h = str6;
|
||
|
e3.a = TextUtils.join("\n", ewy.f8959o.subList(1, ewy.f8959o.size()));
|
||
|
arrayList.add(new QK(e3, (byte) 0));
|
||
|
}
|
||
|
}
|
||
|
if (!TextUtils.isEmpty(bhl.n.b)) {
|
||
|
QO.IeS d3 = QO.d();
|
||
|
d3.g = e(C15715hv.tOB.deals_buy_deal_email);
|
||
|
d3.h = bhl.n.b;
|
||
|
arrayList.add(d3.d());
|
||
|
}
|
||
|
if (!TextUtils.isEmpty(vJd.c)) {
|
||
|
QR.LWm b3 = QR.b();
|
||
|
b3.g = e(C15715hv.tOB.note);
|
||
|
b3.e = vJd.c;
|
||
|
b3.n = true;
|
||
|
arrayList.add(new QR(b3, (byte) 0));
|
||
|
}
|
||
|
a(arrayList, z2);
|
||
|
a.c = this.a;
|
||
|
return new ES(a, (byte) 0);
|
||
|
}
|
||
|
|
||
|
private static String c(String str, String str2) {
|
||
|
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
|
||
|
return "";
|
||
|
}
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(str);
|
||
|
sb.append(": ");
|
||
|
sb.append(str2);
|
||
|
return sb.toString();
|
||
|
}
|
||
|
}
|