what-the-bank/sources/com/scb/phone/view/fragment/pointx/PointXPaymentOptionPointOnl...

320 lines
11 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.pointx;
import android.content.Context;
import android.graphics.LinearGradient;
import android.graphics.Shader;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.scb.phone.R;
import com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment;
import com.scb.phone.view.fragment.pointx.PointXPointPurchaseFragment;
import java.util.ArrayList;
import java.util.Arrays;
import o.C0367Fb;
import o.C1202Xx;
import o.C14957gcv;
import o.C6583cXR;
import o.C7287clT;
import o.C7293clZ;
import o.C7359cmm;
import o.InterfaceC13391fZD;
import o.InterfaceC16541pFg;
import o.InterfaceC9539dle;
import o.InterfaceC9547dlm;
import o.TZ;
import o.WW;
import o.gcH;
import o.gcV;
import o.nMh;
/* loaded from: classes5.dex */
public final class PointXPaymentOptionPointOnlyFragment extends Hilt_PointXPaymentOptionPointOnlyFragment implements InterfaceC9539dle, PointXPointPurchaseFragment.LWm {
public static final HBt d = new HBt(0);
@InterfaceC13391fZD
public C7287clT pointOnlyPresenter;
/* loaded from: classes5.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
@Override // com.scb.phone.view.fragment.pointx.Hilt_PointXPaymentOptionPointOnlyFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public final void onAttach(Context context) {
C14957gcv.e(context, "");
super.onAttach(context);
if (getParentFragment() instanceof PointXPaymentOptionFragment.RVV) {
InterfaceC16541pFg parentFragment = getParentFragment();
C14957gcv.d(parentFragment, "");
b((PointXPaymentOptionFragment.RVV) parentFragment);
}
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void C() {
C7287clT c7287clT = this.pointOnlyPresenter;
if (c7287clT == null) {
C14957gcv.a("");
c7287clT = null;
}
c7287clT.e((C7287clT) this);
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void D() {
InterfaceC16541pFg parentFragment = getParentFragment();
if (parentFragment == null || !(parentFragment instanceof InterfaceC9547dlm.HBt)) {
return;
}
C7293clZ c7293clZ = this.presenter;
if (c7293clZ == null) {
C14957gcv.a("");
c7293clZ = null;
}
c7293clZ.D = ((InterfaceC9547dlm.HBt) parentFragment).l();
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void K() {
s().w.setText("");
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void E() {
gcV s = s();
LinearLayout linearLayout = s.j;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(8);
TextView textView = s.q;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(8);
LinearLayout linearLayout3 = s.b;
C14957gcv.c(linearLayout3, "");
LinearLayout linearLayout4 = linearLayout3;
C14957gcv.e(linearLayout4, "");
linearLayout4.setVisibility(0);
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void z() {
gcV s = s();
LinearLayout linearLayout = s.k;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(0);
LinearLayout linearLayout3 = s.m;
C14957gcv.c(linearLayout3, "");
LinearLayout linearLayout4 = linearLayout3;
C14957gcv.e(linearLayout4, "");
linearLayout4.setVisibility(8);
LinearLayout linearLayout5 = s.i;
C14957gcv.c(linearLayout5, "");
LinearLayout linearLayout6 = linearLayout5;
C14957gcv.e(linearLayout6, "");
linearLayout6.setVisibility(8);
ConstraintLayout constraintLayout = s.a;
C14957gcv.c(constraintLayout, "");
ConstraintLayout constraintLayout2 = constraintLayout;
C14957gcv.e(constraintLayout2, "");
constraintLayout2.setVisibility(0);
TextView textView = s.l;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(8);
TextView textView3 = s.D;
C14957gcv.c(textView3, "");
TextView textView4 = textView3;
C14957gcv.e(textView4, "");
textView4.setVisibility(8);
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void a(double d2) {
TextView textView = s().q;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(0);
textView.getPaint().setShader(null);
gcH gch = gcH.d;
String string = getString(R.string.point_exchange_rate);
C14957gcv.c((Object) string, "");
String format = String.format(string, Arrays.copyOf(new Object[]{(String) C6583cXR.c(new Object[]{Double.valueOf(d2)}, 1329802197, -1329802186, (int) System.currentTimeMillis())}, 1));
C14957gcv.c((Object) format, "");
textView.setText(format);
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void b(double d2) {
TextView textView = s().q;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(0);
textView.getPaint().setShader(new LinearGradient(1.0f, 1.0f, textView.getMeasuredWidth(), textView.getTextSize(), new int[]{nMh.getColor(requireContext(), R.color.f2902131099797), nMh.getColor(requireContext(), R.color.f2892131099796), nMh.getColor(requireContext(), R.color.f2882131099795)}, (float[]) null, Shader.TileMode.CLAMP));
gcH gch = gcH.d;
String string = getString(R.string.point_event_exchange_rate);
C14957gcv.c((Object) string, "");
String format = String.format(string, Arrays.copyOf(new Object[]{(String) C6583cXR.c(new Object[]{Double.valueOf(d2)}, 1329802197, -1329802186, (int) System.currentTimeMillis())}, 1));
C14957gcv.c((Object) format, "");
textView.setText(format);
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void I() {
TextView textView = s().q;
C14957gcv.c(textView, "");
TextView textView2 = textView;
C14957gcv.e(textView2, "");
textView2.setVisibility(8);
}
@Override // o.InterfaceC12863fJg
public final void d(double d2) {
C7293clZ c7293clZ = this.presenter;
if (c7293clZ == null) {
C14957gcv.a("");
c7293clZ = null;
}
c7293clZ.a = d2;
C7359cmm c7359cmm = new C7359cmm(c7293clZ);
if (c7293clZ.f != 0) {
c7359cmm.e(c7293clZ.f);
}
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void a(boolean z, boolean z2, double d2, int i, double d3, double d4, boolean z3, WW ww, C0367Fb c0367Fb, boolean z4, boolean z5, double d5, String str) {
C14957gcv.e(str, "");
C7287clT c7287clT = this.pointOnlyPresenter;
if (c7287clT == null) {
C14957gcv.a("");
c7287clT = null;
}
c7287clT.c(z, z2, d2, i, z3, ww, c0367Fb, z4, z5, d5, str);
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void a(boolean z, WW ww, C0367Fb c0367Fb, String str, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
PointXPaymentOptionFragment.RVV A = A();
if (A != null) {
A.b(z, ww, c0367Fb, str, str2);
}
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void d(boolean z, boolean z2, ArrayList<WW> arrayList, ArrayList<C0367Fb> arrayList2) {
C14957gcv.e(arrayList, "");
C14957gcv.e(arrayList2, "");
PointXPaymentOptionFragment.RVV A = A();
if (A != null) {
A.e(z, z2, arrayList, arrayList2);
}
}
@Override // o.InterfaceC12863fJg
public final void b(boolean z, WW ww, C0367Fb c0367Fb, String str, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
C7293clZ c7293clZ = this.presenter;
if (c7293clZ == null) {
C14957gcv.a("");
c7293clZ = null;
}
c7293clZ.c(z, ww, c0367Fb, str, str2);
}
@Override // o.InterfaceC12863fJg
public final void a(boolean z, boolean z2, ArrayList<WW> arrayList, ArrayList<C0367Fb> arrayList2) {
C14957gcv.e(arrayList, "");
C14957gcv.e(arrayList2, "");
C7293clZ c7293clZ = this.presenter;
if (c7293clZ == null) {
C14957gcv.a("");
c7293clZ = null;
}
c7293clZ.d(z, z2, arrayList, arrayList2);
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void d(boolean z, String str, C1202Xx c1202Xx, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
PointXPaymentOptionFragment.RVV A = A();
if (A != null) {
A.e(z, str, c1202Xx);
A.n(str2);
}
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void G() {
PointXPaymentOptionFragment.RVV A = A();
if (A != null) {
A.I();
}
}
@Override // o.InterfaceC9539dle
public final void e(TZ tz) {
C14957gcv.e(tz, "");
C7293clZ c7293clZ = this.presenter;
if (c7293clZ == null) {
C14957gcv.a("");
c7293clZ = null;
}
PointXPaymentOptionFragment.RVV A = A();
if (A != null) {
A.e(c7293clZ.w, c7293clZ.h, tz);
}
}
@Override // o.InterfaceC9539dle
public final void b() {
PointXPaymentOptionFragment.RVV A = A();
if (A != null) {
C7293clZ c7293clZ = this.presenter;
if (c7293clZ == null) {
C14957gcv.a("");
c7293clZ = null;
}
A.e(c7293clZ.w, false, (TZ) null);
}
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment, com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C7287clT c7287clT = this.pointOnlyPresenter;
if (c7287clT == null) {
C14957gcv.a("");
c7287clT = null;
}
c7287clT.w_();
super.onDestroyView();
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void F() {
s().w.setText("");
}
@Override // com.scb.phone.view.fragment.pointx.PointXPaymentOptionFragment
public final void H() {
s().w.setText("");
}
}