283 lines
9.7 KiB
Java
283 lines
9.7 KiB
Java
package com.scb.phone.view.fragment.ccrredemption.pointtopay;
|
|
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.TextView;
|
|
import androidx.appcompat.widget.AppCompatSeekBar;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.ccrredemption.pointtopay.PointToPayReviewActivity;
|
|
import com.scb.phone.view.custom.ccrredemption.pointtopay.CustomDeltaSliderLongPressed;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import java.math.BigDecimal;
|
|
import o.C0367Fb;
|
|
import o.C14957gcv;
|
|
import o.C3218atP;
|
|
import o.C6583cXR;
|
|
import o.HD;
|
|
import o.IS;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC9046dcN;
|
|
import o.ZI;
|
|
import o.fSJ;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class PointToPayAdjustPointFragment extends Hilt_PointToPayAdjustPointFragment implements InterfaceC9046dcN.Sts, CustomDeltaSliderLongPressed.Sts {
|
|
public static final RVV d = new RVV(0);
|
|
private String c;
|
|
|
|
@BindView
|
|
public CustomDeltaSliderLongPressed customDeltaSlideLongPress;
|
|
private String h = "";
|
|
private HD i;
|
|
|
|
@InterfaceC13391fZD
|
|
public C3218atP presenter;
|
|
|
|
@BindView
|
|
public TextView tvCashBack;
|
|
|
|
@BindView
|
|
public TextView tvPointRedeemed;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class RVV {
|
|
private RVV() {
|
|
}
|
|
|
|
public /* synthetic */ RVV(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
v("point2pay_adjust");
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
this.i = (HD) arguments.getParcelable("EXTRA_TRANSACTION_DATA_DISPLAY_KEY");
|
|
this.c = arguments.getString("EXTRA_DEEP_LINK_CHANNEL_KEY");
|
|
String string = arguments.getString("EXTRA_TERM_AND_CONDITION_URL");
|
|
if (string == null) {
|
|
string = "";
|
|
}
|
|
this.h = string;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View inflate = layoutInflater.inflate(R.layout.2131559813, viewGroup, false);
|
|
((BaseFragment) this).a = ButterKnife.c(this, inflate);
|
|
return inflate;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onViewCreated(View view, Bundle bundle) {
|
|
C14957gcv.e(view, "");
|
|
super.onViewCreated(view, bundle);
|
|
C3218atP c3218atP = this.presenter;
|
|
C3218atP c3218atP2 = null;
|
|
if (c3218atP == null) {
|
|
C14957gcv.a("");
|
|
c3218atP = null;
|
|
}
|
|
c3218atP.e((C3218atP) this);
|
|
HD hd = this.i;
|
|
if (hd != null) {
|
|
int i = hd.f8190o;
|
|
int i2 = hd.g;
|
|
int i3 = hd.n;
|
|
CustomDeltaSliderLongPressed customDeltaSliderLongPressed = this.customDeltaSlideLongPress;
|
|
if (customDeltaSliderLongPressed == null) {
|
|
C14957gcv.a("");
|
|
customDeltaSliderLongPressed = null;
|
|
}
|
|
IS is = new IS(i, i2, i3, 1.0d);
|
|
PointToPayAdjustPointFragment pointToPayAdjustPointFragment = this;
|
|
C14957gcv.e(is, "");
|
|
C14957gcv.e(pointToPayAdjustPointFragment, "");
|
|
customDeltaSliderLongPressed.b = pointToPayAdjustPointFragment;
|
|
int i4 = (int) is.a;
|
|
customDeltaSliderLongPressed.c = i4;
|
|
TextView textView = customDeltaSliderLongPressed.tvMinValueLabel;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
BigDecimal valueOf = BigDecimal.valueOf(i4);
|
|
C14957gcv.c(valueOf, "");
|
|
textView.setText(C6583cXR.a(valueOf));
|
|
int i5 = (int) is.b;
|
|
customDeltaSliderLongPressed.a = i5;
|
|
TextView textView2 = customDeltaSliderLongPressed.tvMaxValueLabel;
|
|
if (textView2 == null) {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
BigDecimal valueOf2 = BigDecimal.valueOf(i5);
|
|
C14957gcv.c(valueOf2, "");
|
|
textView2.setText(C6583cXR.a(valueOf2));
|
|
AppCompatSeekBar appCompatSeekBar = customDeltaSliderLongPressed.acSbSlider;
|
|
if (appCompatSeekBar == null) {
|
|
C14957gcv.a("");
|
|
appCompatSeekBar = null;
|
|
}
|
|
appCompatSeekBar.setMax(100);
|
|
customDeltaSliderLongPressed.e((int) C6583cXR.c(is.c, customDeltaSliderLongPressed.c, customDeltaSliderLongPressed.a));
|
|
customDeltaSliderLongPressed.setDelta((int) is.d);
|
|
CustomDeltaSliderLongPressed.Sts sts = customDeltaSliderLongPressed.b;
|
|
if (sts == null) {
|
|
C14957gcv.a("");
|
|
sts = null;
|
|
}
|
|
AppCompatSeekBar appCompatSeekBar2 = customDeltaSliderLongPressed.acSbSlider;
|
|
if (appCompatSeekBar2 == null) {
|
|
C14957gcv.a("");
|
|
appCompatSeekBar2 = null;
|
|
}
|
|
appCompatSeekBar2.setOnSeekBarChangeListener(new CustomDeltaSliderLongPressed.LWm(customDeltaSliderLongPressed, sts));
|
|
customDeltaSliderLongPressed.d();
|
|
CustomDeltaSliderLongPressed.Sts sts2 = customDeltaSliderLongPressed.b;
|
|
if (sts2 == null) {
|
|
C14957gcv.a("");
|
|
sts2 = null;
|
|
}
|
|
sts2.d(customDeltaSliderLongPressed.d);
|
|
}
|
|
HD hd2 = this.i;
|
|
if (hd2 != null) {
|
|
C3218atP c3218atP3 = this.presenter;
|
|
if (c3218atP3 != null) {
|
|
c3218atP2 = c3218atP3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
if (hd2 != null) {
|
|
c3218atP2.b = hd2;
|
|
}
|
|
c3218atP2.a(hd2.n);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onDestroyView() {
|
|
C3218atP c3218atP = null;
|
|
this.i = null;
|
|
CustomDeltaSliderLongPressed customDeltaSliderLongPressed = this.customDeltaSlideLongPress;
|
|
if (customDeltaSliderLongPressed == null) {
|
|
C14957gcv.a("");
|
|
customDeltaSliderLongPressed = null;
|
|
}
|
|
fSJ fsj = customDeltaSliderLongPressed.e;
|
|
if (fsj != null && !fsj.isDisposed()) {
|
|
fsj.dispose();
|
|
}
|
|
C3218atP c3218atP2 = this.presenter;
|
|
if (c3218atP2 != null) {
|
|
c3218atP = c3218atP2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
c3218atP.w_();
|
|
super.onDestroyView();
|
|
}
|
|
|
|
@Override // o.InterfaceC9046dcN.Sts
|
|
public final void c(String str) {
|
|
C14957gcv.e(str, "");
|
|
TextView textView = this.tvPointRedeemed;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(str);
|
|
}
|
|
|
|
@Override // o.InterfaceC9046dcN.Sts
|
|
public final void b(String str) {
|
|
C14957gcv.e(str, "");
|
|
TextView textView = this.tvCashBack;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(str);
|
|
}
|
|
|
|
@Override // o.InterfaceC9046dcN.Sts
|
|
public final void e(HD hd) {
|
|
C14957gcv.e(hd, "");
|
|
FragmentActivity activity = getActivity();
|
|
if (activity != null) {
|
|
PointToPayReviewActivity.IeS ieS = PointToPayReviewActivity.l;
|
|
FragmentActivity fragmentActivity = activity;
|
|
Bundle arguments = getArguments();
|
|
C0367Fb c0367Fb = arguments != null ? (C0367Fb) arguments.getParcelable("EXTRA_CREDIT_CARD_DISPLAY_KEY") : null;
|
|
Bundle arguments2 = getArguments();
|
|
activity.startActivity(PointToPayReviewActivity.IeS.ZV_(fragmentActivity, c0367Fb, arguments2 != null ? arguments2.getParcelableArrayList("EXTRA_CREDIT_CARD_DISPLAY_LIST_KEY") : null, hd, this.c, this.h));
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public final void onNextClick() {
|
|
final C3218atP c3218atP = this.presenter;
|
|
if (c3218atP == null) {
|
|
C14957gcv.a("");
|
|
c3218atP = null;
|
|
}
|
|
ZI.IeS ieS = new ZI.IeS(c3218atP) { // from class: o.atN
|
|
private C3218atP a;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C3218atP.c(this.a, (InterfaceC9046dcN.Sts) obj);
|
|
}
|
|
|
|
{
|
|
this.a = c3218atP;
|
|
}
|
|
};
|
|
if (c3218atP.f != 0) {
|
|
ieS.e(c3218atP.f);
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.ccrredemption.pointtopay.CustomDeltaSliderLongPressed.Sts
|
|
public final void d(double d2) {
|
|
C3218atP c3218atP = this.presenter;
|
|
if (c3218atP == null) {
|
|
C14957gcv.a("");
|
|
c3218atP = null;
|
|
}
|
|
c3218atP.a(d2);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.ccrredemption.pointtopay.CustomDeltaSliderLongPressed.Sts
|
|
public final void b(double d2) {
|
|
C3218atP c3218atP = this.presenter;
|
|
if (c3218atP == null) {
|
|
C14957gcv.a("");
|
|
c3218atP = null;
|
|
}
|
|
c3218atP.a(d2);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.ccrredemption.pointtopay.CustomDeltaSliderLongPressed.Sts
|
|
public final void a(double d2) {
|
|
C3218atP c3218atP = this.presenter;
|
|
if (c3218atP == null) {
|
|
C14957gcv.a("");
|
|
c3218atP = null;
|
|
}
|
|
c3218atP.a(d2);
|
|
}
|
|
}
|