190 lines
6.3 KiB
Java
190 lines
6.3 KiB
Java
package com.scb.phone.view.fragment.ccrredemption.mileage;
|
|
|
|
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.ImageView;
|
|
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.CCTermsAndConditionsActivity;
|
|
import com.scb.phone.view.activity.cardmanagement.CreditCardTermsAndConditionsActivity;
|
|
import com.scb.phone.view.activity.ccrredemption.categories.RewardsHomeActivity;
|
|
import com.scb.phone.view.activity.ccrredemption.mileage.MileageConfirmRedemptionActivity;
|
|
import com.scb.phone.view.custom.cardmanagement.TermsAndConditionsView;
|
|
import java.util.ArrayList;
|
|
import o.C0467He;
|
|
import o.C0469Hf;
|
|
import o.C3234atf;
|
|
import o.GjB;
|
|
import o.InterfaceC10303eAL;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC9043dcK;
|
|
import o.Jiz;
|
|
import o.SvY;
|
|
import o.Tcy;
|
|
import o.Txv;
|
|
import o.ZBH;
|
|
import o.ZI;
|
|
import o.eAO;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class MileageReviewRedemptionFragment extends Hilt_MileageReviewRedemptionFragment implements InterfaceC9043dcK, InterfaceC10303eAL, eAO {
|
|
|
|
@BindView
|
|
Button btnConfirm;
|
|
private C0469Hf d;
|
|
|
|
@BindView
|
|
ImageView ivLogo;
|
|
|
|
@BindView
|
|
TextView milesDeliveryEtaText;
|
|
|
|
@InterfaceC13391fZD
|
|
public C3234atf presenter;
|
|
|
|
@BindView
|
|
TermsAndConditionsView termsAndConditionsView;
|
|
|
|
@BindView
|
|
TextView txvAirlineNumber;
|
|
|
|
@BindView
|
|
TextView txvCardNumber;
|
|
|
|
@BindView
|
|
TextView txvCardType;
|
|
|
|
@BindView
|
|
TextView txvItemDescription;
|
|
|
|
@BindView
|
|
TextView txvItemName;
|
|
|
|
@BindView
|
|
TextView txvLastName;
|
|
|
|
@BindView
|
|
TextView txvPoints;
|
|
|
|
@BindView
|
|
TextView txvPointsToRedeem;
|
|
|
|
@BindView
|
|
TextView txvTotalMiles;
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559768, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
this.presenter.e((C3234atf) this);
|
|
C0469Hf c0469Hf = (C0469Hf) getActivity().getIntent().getParcelableExtra("com.scb.phone.presentation.view.activity.ccr_redemption.mileage.MileageReviewRedemptionActivity.KEY_MILEAGE_REDEMPTION_DTO");
|
|
this.d = c0469Hf;
|
|
this.ivLogo.setVisibility(8);
|
|
this.txvCardType.setText(c0469Hf.e);
|
|
this.txvCardNumber.setText(c0469Hf.j);
|
|
if (this.d.c) {
|
|
this.txvItemDescription.setText(getString(R.string.product_item_description_opr, this.d.i.f8197o));
|
|
this.milesDeliveryEtaText.setText(getResources().getString(R.string.miles_delivery_eta_opr));
|
|
} else {
|
|
this.txvItemDescription.setText(getString(R.string.product_item_description, this.d.i.f8197o, Integer.valueOf(this.d.a)));
|
|
this.milesDeliveryEtaText.setText(getResources().getString(R.string.miles_delivery_eta));
|
|
}
|
|
this.txvItemName.setText(c0469Hf.i.m);
|
|
this.txvPointsToRedeem.setText(c0469Hf.k);
|
|
this.txvTotalMiles.setText(c0469Hf.f8198o);
|
|
this.txvAirlineNumber.setText(c0469Hf.g);
|
|
this.txvLastName.setText(c0469Hf.d);
|
|
this.termsAndConditionsView.setTermsAndConditionsListener(this);
|
|
this.termsAndConditionsView.setTermsCheckboxListener(this);
|
|
if (Integer.parseInt(c0469Hf.k.replace(",", "")) <= 1) {
|
|
this.txvPoints.setText(getResources().getString(R.string.point_label));
|
|
}
|
|
this.btnConfirm.setEnabled(false);
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC9043dcK
|
|
public final void b(C0467He c0467He) {
|
|
Intent intent = new Intent(getContext(), (Class<?>) RewardsHomeActivity.class);
|
|
intent.addFlags(603979776);
|
|
intent.putExtra("com.scb.phone.presentation.view.activity.ccr_redemption.confirm.ConfirmRedemptionActivity.CARD_POINTS_BALANCE", c0467He.r);
|
|
startActivity(intent);
|
|
startActivityForResult(MileageConfirmRedemptionActivity.ZP_(getActivity(), c0467He), 106);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onActivityResult(int i, int i2, Intent intent) {
|
|
if (i == 106 && intent != null) {
|
|
getActivity().setResult(-1, intent);
|
|
getActivity().finish();
|
|
}
|
|
super.onActivityResult(i, i2, intent);
|
|
}
|
|
|
|
@Override // o.eAO
|
|
public final void c(boolean z) {
|
|
this.btnConfirm.setEnabled(z);
|
|
}
|
|
|
|
@Override // o.InterfaceC9043dcK
|
|
public final void a() {
|
|
startActivity(CreditCardTermsAndConditionsActivity.Zc_(getActivity(), this.d.m));
|
|
}
|
|
|
|
@Override // o.InterfaceC9043dcK
|
|
public final void b() {
|
|
startActivity(CCTermsAndConditionsActivity.YY_(getActivity(), this.d.m));
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
this.presenter.w_();
|
|
super.onDestroy();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@OnClick
|
|
public void onConfirmClick() {
|
|
C3234atf c3234atf = this.presenter;
|
|
C0469Hf c0469Hf = this.d;
|
|
if (c3234atf.f != 0) {
|
|
c3234atf.f.y();
|
|
}
|
|
Tcy tcy = new Tcy(c0469Hf.b, c0469Hf.f, c0469Hf.j);
|
|
SvY svY = new SvY(c0469Hf.d, c0469Hf.g);
|
|
ArrayList arrayList = new ArrayList();
|
|
arrayList.add(new GjB(c0469Hf.i.f8197o, c0469Hf.a, Jiz.POINT, c0469Hf.i.m, Long.valueOf(c0469Hf.i.q.intValue() * c0469Hf.a), 0L));
|
|
c3234atf.a.b(new Txv(tcy, arrayList, svY));
|
|
ZBH zbh = c3234atf.a;
|
|
zbh.d(zbh.i, new C3234atf.Sts(c3234atf, c0469Hf));
|
|
}
|
|
|
|
@Override // o.InterfaceC10303eAL
|
|
public final void j() {
|
|
C3234atf c3234atf = this.presenter;
|
|
final boolean z = this.d.c;
|
|
ZI.IeS ieS = new ZI.IeS(z) { // from class: o.atg
|
|
private boolean d;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C3234atf.d(this.d, (InterfaceC9043dcK) obj);
|
|
}
|
|
|
|
{
|
|
this.d = z;
|
|
}
|
|
};
|
|
if (c3234atf.f != 0) {
|
|
ieS.e(c3234atf.f);
|
|
}
|
|
}
|
|
}
|