what-the-bank/sources/com/scb/phone/presentation/mapper/transferandpay/BaseAssetsDisplayMapper.java

156 lines
5.3 KiB
Java

package com.scb.phone.presentation.mapper.transferandpay;
import android.content.SharedPreferences;
import android.content.res.Resources;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.scb.phone.presentation.mapper.transferandpay.BaseAssetsDisplayMapper;
import java.util.function.Predicate;
import java.util.stream.Stream;
import o.C16157lj;
import o.C6583cXR;
import o.InterfaceC13391fZD;
import o.YIo;
import o.gjJ;
/* loaded from: classes3.dex */
public class BaseAssetsDisplayMapper extends C16157lj {
@InterfaceC13391fZD
public String baseAzureURL;
@InterfaceC13391fZD
public String baseCampaignURL;
private final String d;
@InterfaceC13391fZD
public BaseAssetsDisplayMapper(Resources resources, SharedPreferences sharedPreferences, String str) {
super(resources, sharedPreferences);
this.d = str;
}
public String b_(final String str) {
if (!gjJ.b((CharSequence) str) && !str.startsWith("http")) {
String str2 = (String) Stream.of((Object[]) new String[]{"PAYMENT", "TRANSFER"}).filter(new Predicate(str) { // from class: o.Db
private String b;
@Override // java.util.function.Predicate
public final boolean test(Object obj) {
return BaseAssetsDisplayMapper.f(this.b, (String) obj);
}
{
this.b = str;
}
}).findFirst().orElse("");
if (!str2.isEmpty()) {
return j(str, str2);
}
}
return C6583cXR.e(str, this.c.getString("BASE_ASSETS_URL", this.d));
}
public final String j(String str, String str2, String str3) {
if ("CAMPAIGN".equals(str2)) {
return C6583cXR.e(str, this.c.getString("BASE_CAMPAIGN_URL", str3));
}
return C6583cXR.e(str, "https://fasteasy.scbeasy.com:8888/portalserver/content/bbp/repositories/contentRepository?path=");
}
public static /* synthetic */ boolean f(String str, String str2) {
return !gjJ.b((CharSequence) str) && str.startsWith("/".concat(str2.concat("/")).toLowerCase());
}
private YIo g() {
try {
return (YIo) new Gson().fromJson(this.c.getString("ENABLE_FUNCTION", null), YIo.class);
} catch (JsonSyntaxException unused) {
return null;
}
}
/* JADX WARN: Removed duplicated region for block: B:15:0x004b */
/* JADX WARN: Removed duplicated region for block: B:19:0x005e */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.String j(java.lang.String r8, java.lang.String r9) {
/*
r7 = this;
boolean r0 = o.gjJ.b(r9)
if (r0 != 0) goto L79
java.lang.Boolean r0 = java.lang.Boolean.TRUE
o.YIo r1 = r7.g()
java.lang.Boolean r2 = java.lang.Boolean.FALSE
if (r1 != 0) goto L11
goto L64
L11:
r9.hashCode()
int r3 = r9.hashCode()
r4 = -68698650(0xfffffffffbe7bde6, float:-2.4065443E36)
r5 = 2
r6 = 1
if (r3 == r4) goto L3e
r4 = 79789481(0x4c17da9, float:4.5489483E-36)
if (r3 == r4) goto L34
r4 = 2063509483(0x7afea7eb, float:6.611246E35)
if (r3 == r4) goto L2a
goto L48
L2a:
java.lang.String r3 = "TRANSFER"
boolean r9 = r9.equals(r3)
if (r9 == 0) goto L48
r9 = r5
goto L49
L34:
java.lang.String r3 = "THEME"
boolean r9 = r9.equals(r3)
if (r9 == 0) goto L48
r9 = r6
goto L49
L3e:
java.lang.String r3 = "PAYMENT"
boolean r9 = r9.equals(r3)
if (r9 == 0) goto L48
r9 = 0
goto L49
L48:
r9 = -1
L49:
if (r9 == 0) goto L5e
if (r9 == r6) goto L57
if (r9 == r5) goto L50
goto L64
L50:
boolean r9 = r1.ac
java.lang.Boolean r2 = java.lang.Boolean.valueOf(r9)
goto L64
L57:
boolean r9 = r1.ab
java.lang.Boolean r2 = java.lang.Boolean.valueOf(r9)
goto L64
L5e:
boolean r9 = r1.U
java.lang.Boolean r2 = java.lang.Boolean.valueOf(r9)
L64:
boolean r9 = r0.equals(r2)
if (r9 == 0) goto L79
java.lang.String r9 = r7.baseAzureURL
boolean r9 = o.gjJ.a(r9)
if (r9 == 0) goto L79
java.lang.String r9 = r7.baseAzureURL
java.lang.String r8 = o.C6583cXR.e(r8, r9)
return r8
L79:
android.content.SharedPreferences r9 = r7.c
java.lang.String r0 = "BASE_ASSETS_URL"
java.lang.String r1 = r7.d
java.lang.String r9 = r9.getString(r0, r1)
java.lang.String r8 = o.C6583cXR.e(r8, r9)
return r8
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.presentation.mapper.transferandpay.BaseAssetsDisplayMapper.j(java.lang.String, java.lang.String):java.lang.String");
}
}