492 lines
15 KiB
Java
492 lines
15 KiB
Java
|
package com.scb.phone.view.fragment.ccrredemption.ecoupon;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.os.Bundle;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.Button;
|
||
|
import android.widget.TextView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import butterknife.OnClick;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.cardmanagement.CreditCardTermsAndConditionsActivity;
|
||
|
import com.scb.phone.view.activity.ccrredemption.ecoupon.ECouponSuccessfulActivity;
|
||
|
import com.scb.phone.view.custom.cardmanagement.TermsAndConditionsView;
|
||
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource;
|
||
|
import java.math.BigDecimal;
|
||
|
import java.text.NumberFormat;
|
||
|
import java.util.Locale;
|
||
|
import o.C0367Fb;
|
||
|
import o.C0461Hb;
|
||
|
import o.C0463Hc;
|
||
|
import o.C0477Hl;
|
||
|
import o.C0489Ht;
|
||
|
import o.C0491Hv;
|
||
|
import o.C14957gcv;
|
||
|
import o.C3192asq;
|
||
|
import o.C3324avR;
|
||
|
import o.C6583cXR;
|
||
|
import o.InterfaceC10303eAL;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC9040dcH;
|
||
|
import o.InterfaceC9058dcZ;
|
||
|
import o.ZI;
|
||
|
import o.eAO;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class ECouponReviewFragment extends Hilt_ECouponReviewFragment implements InterfaceC10303eAL, eAO, InterfaceC9040dcH.IeS, InterfaceC9058dcZ {
|
||
|
public static final Sts d = new Sts(0);
|
||
|
|
||
|
@BindView
|
||
|
public Button btnConfirm;
|
||
|
private C0367Fb c;
|
||
|
|
||
|
@BindView
|
||
|
public CustomTransferAndPaySource cardView;
|
||
|
private C0491Hv f;
|
||
|
private C0463Hc g;
|
||
|
private String h;
|
||
|
|
||
|
@BindView
|
||
|
public CustomTransferAndPaySource itemView;
|
||
|
private C0489Ht j;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C3192asq reviewPresenter;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C3324avR reviewRedemptionPresenter;
|
||
|
|
||
|
@BindView
|
||
|
public TermsAndConditionsView tcView;
|
||
|
|
||
|
@BindView
|
||
|
public TextView tvPoint;
|
||
|
|
||
|
@BindView
|
||
|
public TextView txtRemark;
|
||
|
|
||
|
@Override // o.InterfaceC9058dcZ
|
||
|
public final void g() {
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9058dcZ
|
||
|
public final void h() {
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9058dcZ
|
||
|
public final void i() {
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static final class Sts {
|
||
|
private Sts() {
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ Sts(byte b) {
|
||
|
this();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
C14957gcv.e(layoutInflater, "");
|
||
|
return layoutInflater.inflate(R.layout.2131559583, viewGroup, false);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final void onViewCreated(View view, Bundle bundle) {
|
||
|
C14957gcv.e(view, "");
|
||
|
super.onViewCreated(view, bundle);
|
||
|
ButterKnife.c(this, view);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final void onCreate(Bundle bundle) {
|
||
|
super.onCreate(bundle);
|
||
|
Bundle arguments = getArguments();
|
||
|
if (arguments != null) {
|
||
|
C0367Fb c0367Fb = (C0367Fb) arguments.getParcelable("EXTRA_CREDIT_CARD_DISPLAY_KEY");
|
||
|
if (c0367Fb != null) {
|
||
|
C14957gcv.c(c0367Fb, "");
|
||
|
this.c = c0367Fb;
|
||
|
}
|
||
|
C0463Hc c0463Hc = (C0463Hc) arguments.getParcelable("EXTRA_PRODUCT_DISPLAY_MODEL_KEY");
|
||
|
if (c0463Hc != null) {
|
||
|
C14957gcv.c(c0463Hc, "");
|
||
|
this.g = c0463Hc;
|
||
|
}
|
||
|
C0489Ht c0489Ht = (C0489Ht) arguments.getParcelable("EXTRA_E_COUPON_QUOTA_LIMIT_KEY");
|
||
|
if (c0489Ht != null) {
|
||
|
C14957gcv.c(c0489Ht, "");
|
||
|
this.j = c0489Ht;
|
||
|
}
|
||
|
C0491Hv c0491Hv = (C0491Hv) arguments.getParcelable("EXTRA_E_COUPON_QUANTITY_KEY");
|
||
|
if (c0491Hv != null) {
|
||
|
C14957gcv.c(c0491Hv, "");
|
||
|
this.f = c0491Hv;
|
||
|
}
|
||
|
C0367Fb c0367Fb2 = this.c;
|
||
|
if (c0367Fb2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0367Fb2 = null;
|
||
|
}
|
||
|
String str = c0367Fb2.ab;
|
||
|
C14957gcv.c((Object) str, "");
|
||
|
this.h = str;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final void onStart() {
|
||
|
super.onStart();
|
||
|
C3192asq c3192asq = this.reviewPresenter;
|
||
|
C3324avR c3324avR = null;
|
||
|
if (c3192asq == null) {
|
||
|
C14957gcv.a("");
|
||
|
c3192asq = null;
|
||
|
}
|
||
|
ECouponReviewFragment eCouponReviewFragment = this;
|
||
|
c3192asq.e((C3192asq) eCouponReviewFragment);
|
||
|
C3192asq c3192asq2 = this.reviewPresenter;
|
||
|
if (c3192asq2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c3192asq2 = null;
|
||
|
}
|
||
|
C0367Fb c0367Fb = this.c;
|
||
|
if (c0367Fb == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0367Fb = null;
|
||
|
}
|
||
|
String str = c0367Fb.g;
|
||
|
C14957gcv.c((Object) str, "");
|
||
|
C0367Fb c0367Fb2 = this.c;
|
||
|
if (c0367Fb2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0367Fb2 = null;
|
||
|
}
|
||
|
String str2 = c0367Fb2.q;
|
||
|
C14957gcv.c((Object) str2, "");
|
||
|
C0367Fb c0367Fb3 = this.c;
|
||
|
if (c0367Fb3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0367Fb3 = null;
|
||
|
}
|
||
|
String str3 = c0367Fb3.W;
|
||
|
C14957gcv.c((Object) str3, "");
|
||
|
C0463Hc c0463Hc = this.g;
|
||
|
if (c0463Hc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0463Hc = null;
|
||
|
}
|
||
|
C0491Hv c0491Hv = this.f;
|
||
|
if (c0491Hv == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0491Hv = null;
|
||
|
}
|
||
|
C14957gcv.e(str, "");
|
||
|
C14957gcv.e(str2, "");
|
||
|
C14957gcv.e(str3, "");
|
||
|
C14957gcv.e(c0463Hc, "");
|
||
|
C14957gcv.e(c0491Hv, "");
|
||
|
c3192asq2.a = c0463Hc;
|
||
|
c3192asq2.c = c0491Hv;
|
||
|
c3192asq2.d = str;
|
||
|
c3192asq2.b = str2;
|
||
|
c3192asq2.e = str3;
|
||
|
final C3192asq c3192asq3 = this.reviewPresenter;
|
||
|
if (c3192asq3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c3192asq3 = null;
|
||
|
}
|
||
|
ZI.IeS ieS = new ZI.IeS(c3192asq3) { // from class: o.aso
|
||
|
private C3192asq b;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C3192asq.d(this.b, (InterfaceC9040dcH.IeS) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = c3192asq3;
|
||
|
}
|
||
|
};
|
||
|
if (c3192asq3.f != 0) {
|
||
|
ieS.e(c3192asq3.f);
|
||
|
}
|
||
|
C3324avR c3324avR2 = this.reviewRedemptionPresenter;
|
||
|
if (c3324avR2 != null) {
|
||
|
c3324avR = c3324avR2;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
c3324avR.e((C3324avR) eCouponReviewFragment);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void c() {
|
||
|
v("ecoupon_review");
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC10303eAL
|
||
|
public final void j() {
|
||
|
Context context = getContext();
|
||
|
if (context != null) {
|
||
|
CreditCardTermsAndConditionsActivity.LWm lWm = CreditCardTermsAndConditionsActivity.b;
|
||
|
C0463Hc c0463Hc = this.g;
|
||
|
if (c0463Hc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0463Hc = null;
|
||
|
}
|
||
|
String str = c0463Hc.u;
|
||
|
C14957gcv.e(context, "");
|
||
|
Intent putExtra = new Intent(context, (Class<?>) CreditCardTermsAndConditionsActivity.class).putExtra("EXTRA_URL_TERM_AND_CONDITIONS", str);
|
||
|
C14957gcv.c(putExtra, "");
|
||
|
context.startActivity(putExtra);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.eAO
|
||
|
public final void c(final boolean z) {
|
||
|
C3192asq c3192asq = this.reviewPresenter;
|
||
|
if (c3192asq == null) {
|
||
|
C14957gcv.a("");
|
||
|
c3192asq = null;
|
||
|
}
|
||
|
ZI.IeS ieS = new ZI.IeS(z) { // from class: o.asn
|
||
|
private boolean d;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9040dcH.IeS) obj).a(this.d);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = z;
|
||
|
}
|
||
|
};
|
||
|
if (c3192asq.f != 0) {
|
||
|
ieS.e(c3192asq.f);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void e() {
|
||
|
CustomTransferAndPaySource customTransferAndPaySource = this.cardView;
|
||
|
C0367Fb c0367Fb = null;
|
||
|
if (customTransferAndPaySource == null) {
|
||
|
C14957gcv.a("");
|
||
|
customTransferAndPaySource = null;
|
||
|
}
|
||
|
customTransferAndPaySource.setText(getString(R.string.e_coupon_review_card_title));
|
||
|
C0367Fb c0367Fb2 = this.c;
|
||
|
if (c0367Fb2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0367Fb2 = null;
|
||
|
}
|
||
|
customTransferAndPaySource.setSourceName(c0367Fb2.S);
|
||
|
C0367Fb c0367Fb3 = this.c;
|
||
|
if (c0367Fb3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
c0367Fb = c0367Fb3;
|
||
|
}
|
||
|
customTransferAndPaySource.setAccountNumber(c0367Fb.q);
|
||
|
customTransferAndPaySource.b();
|
||
|
customTransferAndPaySource.setDivider(true);
|
||
|
customTransferAndPaySource.setDividerLeftPadding((int) getResources().getDimension(R.dimen.f16672131165433));
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void a() {
|
||
|
CustomTransferAndPaySource customTransferAndPaySource = this.itemView;
|
||
|
C0491Hv c0491Hv = null;
|
||
|
if (customTransferAndPaySource == null) {
|
||
|
C14957gcv.a("");
|
||
|
customTransferAndPaySource = null;
|
||
|
}
|
||
|
customTransferAndPaySource.setText(getString(R.string.e_coupon_review_item_title));
|
||
|
C0463Hc c0463Hc = this.g;
|
||
|
if (c0463Hc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0463Hc = null;
|
||
|
}
|
||
|
customTransferAndPaySource.setSourceName(c0463Hc.m);
|
||
|
Object[] objArr = new Object[2];
|
||
|
C0463Hc c0463Hc2 = this.g;
|
||
|
if (c0463Hc2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0463Hc2 = null;
|
||
|
}
|
||
|
objArr[0] = c0463Hc2.f8197o;
|
||
|
C0491Hv c0491Hv2 = this.f;
|
||
|
if (c0491Hv2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
c0491Hv = c0491Hv2;
|
||
|
}
|
||
|
String a = C6583cXR.a(new BigDecimal(String.valueOf(c0491Hv.d)));
|
||
|
C14957gcv.c((Object) a, "");
|
||
|
objArr[1] = a;
|
||
|
customTransferAndPaySource.setAccountNumber(getString(R.string.e_coupon_review_item_code_qty, objArr));
|
||
|
customTransferAndPaySource.b();
|
||
|
customTransferAndPaySource.setDivider(true);
|
||
|
customTransferAndPaySource.setDividerLeftPadding((int) getResources().getDimension(R.dimen.f16672131165433));
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void b() {
|
||
|
TextView textView = this.tvPoint;
|
||
|
C0491Hv c0491Hv = null;
|
||
|
if (textView == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView = null;
|
||
|
}
|
||
|
C0463Hc c0463Hc = this.g;
|
||
|
if (c0463Hc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0463Hc = null;
|
||
|
}
|
||
|
Integer num = c0463Hc.q;
|
||
|
C14957gcv.c(num, "");
|
||
|
int intValue = num.intValue();
|
||
|
C0491Hv c0491Hv2 = this.f;
|
||
|
if (c0491Hv2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
c0491Hv = c0491Hv2;
|
||
|
}
|
||
|
BigDecimal valueOf = BigDecimal.valueOf(intValue * ((int) c0491Hv.d));
|
||
|
C14957gcv.c(valueOf, "");
|
||
|
String a = C6583cXR.a(valueOf);
|
||
|
C14957gcv.c((Object) a, "");
|
||
|
textView.setText(a);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void f() {
|
||
|
TermsAndConditionsView termsAndConditionsView = this.tcView;
|
||
|
TermsAndConditionsView termsAndConditionsView2 = null;
|
||
|
if (termsAndConditionsView == null) {
|
||
|
C14957gcv.a("");
|
||
|
termsAndConditionsView = null;
|
||
|
}
|
||
|
termsAndConditionsView.setTermsAndConditionsListener(this);
|
||
|
TermsAndConditionsView termsAndConditionsView3 = this.tcView;
|
||
|
if (termsAndConditionsView3 != null) {
|
||
|
termsAndConditionsView2 = termsAndConditionsView3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
termsAndConditionsView2.setTermsCheckboxListener(this);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void d() {
|
||
|
TextView textView = this.txtRemark;
|
||
|
C0463Hc c0463Hc = null;
|
||
|
if (textView == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView = null;
|
||
|
}
|
||
|
Object[] objArr = new Object[1];
|
||
|
C0463Hc c0463Hc2 = this.g;
|
||
|
if (c0463Hc2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
c0463Hc = c0463Hc2;
|
||
|
}
|
||
|
objArr[0] = c0463Hc.e == null ? "" : NumberFormat.getInstance(Locale.getDefault()).format(c0463Hc.e);
|
||
|
String string = getString(R.string.e_coupon_detail_time_warning, objArr);
|
||
|
C14957gcv.c((Object) string, "");
|
||
|
textView.setText(string);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void a(boolean z) {
|
||
|
Button button = this.btnConfirm;
|
||
|
if (button == null) {
|
||
|
C14957gcv.a("");
|
||
|
button = null;
|
||
|
}
|
||
|
button.setEnabled(z);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9040dcH.IeS
|
||
|
public final void d(C0477Hl c0477Hl) {
|
||
|
C14957gcv.e(c0477Hl, "");
|
||
|
C3324avR c3324avR = this.reviewRedemptionPresenter;
|
||
|
if (c3324avR == null) {
|
||
|
C14957gcv.a("");
|
||
|
c3324avR = null;
|
||
|
}
|
||
|
c3324avR.d = c0477Hl;
|
||
|
c3324avR.c();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9058dcZ
|
||
|
public final void a(C0461Hb c0461Hb) {
|
||
|
Context context = getContext();
|
||
|
if (context == null || c0461Hb == null) {
|
||
|
return;
|
||
|
}
|
||
|
ECouponSuccessfulActivity.LWm lWm = ECouponSuccessfulActivity.b;
|
||
|
C0367Fb c0367Fb = this.c;
|
||
|
C0463Hc c0463Hc = null;
|
||
|
if (c0367Fb == null) {
|
||
|
C14957gcv.a("");
|
||
|
c0367Fb = null;
|
||
|
}
|
||
|
String str = c0367Fb.g;
|
||
|
C14957gcv.c((Object) str, "");
|
||
|
String str2 = c0461Hb.t;
|
||
|
C14957gcv.c((Object) str2, "");
|
||
|
String str3 = c0461Hb.w;
|
||
|
C14957gcv.c((Object) str3, "");
|
||
|
C0463Hc c0463Hc2 = this.g;
|
||
|
if (c0463Hc2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
} else {
|
||
|
c0463Hc = c0463Hc2;
|
||
|
}
|
||
|
C14957gcv.e(context, "");
|
||
|
C14957gcv.e(str, "");
|
||
|
C14957gcv.e(str2, "");
|
||
|
C14957gcv.e(str3, "");
|
||
|
C14957gcv.e(c0463Hc, "");
|
||
|
Intent intent = new Intent(context, (Class<?>) ECouponSuccessfulActivity.class);
|
||
|
intent.putExtra("EXTRA_PRODUCT_DISPLAY_MODEL_KEY", c0463Hc);
|
||
|
intent.putExtra("EXTRA_CARD_REF_NO_KEY", str);
|
||
|
intent.putExtra("EXTRA_REF_ID_KEY", str2);
|
||
|
intent.putExtra("EXTRA_SLIP_REF_ID_KEY", str3);
|
||
|
context.startActivity(intent);
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public final void onNextClick() {
|
||
|
final C3192asq c3192asq = this.reviewPresenter;
|
||
|
if (c3192asq == null) {
|
||
|
C14957gcv.a("");
|
||
|
c3192asq = null;
|
||
|
}
|
||
|
ZI.IeS ieS = new ZI.IeS(c3192asq) { // from class: o.asm
|
||
|
private C3192asq b;
|
||
|
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
C3192asq.e(this.b, (InterfaceC9040dcH.IeS) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = c3192asq;
|
||
|
}
|
||
|
};
|
||
|
if (c3192asq.f != 0) {
|
||
|
ieS.e(c3192asq.f);
|
||
|
}
|
||
|
}
|
||
|
}
|