127 lines
4.5 KiB
Java
127 lines
4.5 KiB
Java
package o;
|
|
|
|
import android.content.Context;
|
|
import android.util.Base64;
|
|
import androidx.fragment.app.Fragment;
|
|
import com.scb.phone.view.fragment.transferandpay.billpaymenttab.ebilltabsfragment.EBillAmountFragment;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.text.NumberFormat;
|
|
|
|
/* renamed from: o.ezD, reason: case insensitive filesystem */
|
|
/* loaded from: classes5.dex */
|
|
public final class C12487ezD extends MoT implements EBillAmountFragment.HBt {
|
|
private static byte k = 6;
|
|
private static int m = 1;
|
|
|
|
/* renamed from: o, reason: collision with root package name */
|
|
private static int f9090o;
|
|
public boolean a;
|
|
private Context b;
|
|
private XB c;
|
|
public Double d;
|
|
public int e;
|
|
private EBillAmountFragment f;
|
|
private int[] g;
|
|
private String h;
|
|
private Double i;
|
|
private Double j;
|
|
|
|
private void l(String str, Object[] objArr) {
|
|
byte[] decode = Base64.decode(str, 0);
|
|
byte[] bArr = new byte[decode.length];
|
|
for (int i = 0; i < decode.length; i++) {
|
|
bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ k);
|
|
}
|
|
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
|
|
}
|
|
|
|
public C12487ezD(yRS yrs, Context context, XB xb, boolean z) {
|
|
super(yrs);
|
|
this.g = new int[]{com.scb.phone.R.string.full_amount, com.scb.phone.R.string.minimum_amount, com.scb.phone.R.string.specify_amount};
|
|
this.j = Double.valueOf(0.0d);
|
|
this.e = -1;
|
|
this.b = context;
|
|
this.c = xb;
|
|
this.a = z;
|
|
if (z) {
|
|
this.g[1] = com.scb.phone.R.string.paid_off_amount;
|
|
this.d = C6583cXR.c(xb.w);
|
|
this.i = C6583cXR.c(xb.x);
|
|
this.h = C6583cXR.c(NumberFormat.getCurrencyInstance()).format(this.d);
|
|
}
|
|
}
|
|
|
|
@Override // o.MoT
|
|
public final Fragment b(int i) {
|
|
if (i == 0) {
|
|
return EBillAmountFragment.d(this.c.x, "", "", this.a);
|
|
}
|
|
if (i == 1) {
|
|
return EBillAmountFragment.d("", this.c.w, "", this.a);
|
|
}
|
|
if (i != 2) {
|
|
return null;
|
|
}
|
|
EBillAmountFragment d = EBillAmountFragment.d("", "", C6583cXR.c(NumberFormat.getCurrencyInstance()).format(this.j), this.a);
|
|
this.f = d;
|
|
d.d = this;
|
|
return this.f;
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public final int getCount() {
|
|
return this.g.length;
|
|
}
|
|
|
|
@Override // o.WYJ
|
|
public final CharSequence getPageTitle(int i) {
|
|
String string;
|
|
int i2 = 2 % 2;
|
|
int i3 = f9090o + 95;
|
|
m = i3 % 128;
|
|
if (i3 % 2 == 0) {
|
|
string = this.b.getString(this.g[i]);
|
|
int i4 = 31 / 0;
|
|
if (!string.startsWith(",*,)")) {
|
|
return string;
|
|
}
|
|
} else {
|
|
string = this.b.getString(this.g[i]);
|
|
if (!string.startsWith(",*,)")) {
|
|
return string;
|
|
}
|
|
}
|
|
Object[] objArr = new Object[1];
|
|
l(string.substring(4), objArr);
|
|
String intern = ((String) objArr[0]).intern();
|
|
int i5 = m + 57;
|
|
f9090o = i5 % 128;
|
|
int i6 = i5 % 2;
|
|
return intern;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.transferandpay.billpaymenttab.ebilltabsfragment.EBillAmountFragment.HBt
|
|
public final void c(double d) {
|
|
if (this.a && this.f != null) {
|
|
if (d > this.d.doubleValue()) {
|
|
this.f.a(com.scb.phone.R.string.greater_than_paidoff_message, true, this.h);
|
|
} else if (this.i.doubleValue() != 0.0d && d > this.i.doubleValue()) {
|
|
this.f.a(com.scb.phone.R.string.greater_than_fullpay_message, false, C6583cXR.c(NumberFormat.getCurrencyInstance()).format(d - this.i.doubleValue()));
|
|
} else if (this.i.doubleValue() != 0.0d && d < this.i.doubleValue()) {
|
|
this.f.a(com.scb.phone.R.string.less_than_fullpay_message, false, C6583cXR.c(NumberFormat.getCurrencyInstance()).format(this.i.doubleValue() - d));
|
|
} else if (this.i.doubleValue() == 0.0d && d > this.i.doubleValue() && (this.c.J == null || this.c.J.isEmpty())) {
|
|
this.f.a(com.scb.phone.R.string.no_bill_with_payoff_and_full, false, C6583cXR.c(NumberFormat.getCurrencyInstance()).format(d - this.i.doubleValue()));
|
|
}
|
|
}
|
|
this.j = Double.valueOf(d);
|
|
}
|
|
|
|
public final Double c() {
|
|
int i = this.e;
|
|
if (i != 1) {
|
|
return i != 2 ? C6583cXR.c(this.c.x) : this.j;
|
|
}
|
|
return C6583cXR.c(this.c.w);
|
|
}
|
|
}
|