458 lines
14 KiB
Java
458 lines
14 KiB
Java
package com.scb.phone.view.fragment.cardmanagement;
|
|
|
|
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.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.huawei.hms.support.api.entity.common.CommonConstant;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.cardmanagement.StatementChannelChooseAddressActivity;
|
|
import com.scb.phone.view.activity.cardmanagement.StatementChannelCommonActivity;
|
|
import com.scb.phone.view.custom.cardmanagement.CustomStatementChannelViewComponent;
|
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import o.C0367Fb;
|
|
import o.C14957gcv;
|
|
import o.C3024apg;
|
|
import o.C3030apm;
|
|
import o.GS;
|
|
import o.GT;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC9068dcj;
|
|
import o.ZI;
|
|
import o.pug;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class StatementChannelLandingFragment extends Hilt_StatementChannelLandingFragment implements InterfaceC9068dcj.IeS, CustomStatementChannelViewComponent.LWm {
|
|
public static final RVV c = new RVV(0);
|
|
|
|
@BindView
|
|
public Button btnNext;
|
|
private C0367Fb d;
|
|
private String g = "";
|
|
private ArrayList<C0367Fb> i;
|
|
|
|
@BindView
|
|
public LinearLayout itemChannelSelectLayout;
|
|
|
|
@BindView
|
|
public ImageView ivEmailEdit;
|
|
|
|
@InterfaceC13391fZD
|
|
public C3024apg presenter;
|
|
|
|
@BindView
|
|
public LinearLayout remarkSelectLayout;
|
|
|
|
@BindView
|
|
public LinearLayout rootLayout;
|
|
|
|
@BindView
|
|
public LinearLayout sendToLayout;
|
|
|
|
@BindView
|
|
public TextView tvRemarkSelectNewChannel;
|
|
|
|
@BindView
|
|
public TextView tvSendTo;
|
|
|
|
@BindView
|
|
public TextView tvSendToTitle;
|
|
|
|
@BindView
|
|
public CustomTransferAndPayItem viewChannel;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class RVV {
|
|
private RVV() {
|
|
}
|
|
|
|
public /* synthetic */ RVV(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.2131559939, viewGroup, false);
|
|
}
|
|
|
|
@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.d = c0367Fb;
|
|
}
|
|
ArrayList<C0367Fb> parcelableArrayList = arguments.getParcelableArrayList("EXTRA_CREDIT_CARD_DISPLAY_LIST_KEY");
|
|
if (parcelableArrayList != null) {
|
|
C14957gcv.c(parcelableArrayList, "");
|
|
this.i = parcelableArrayList;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onViewCreated(View view, Bundle bundle) {
|
|
C14957gcv.e(view, "");
|
|
super.onViewCreated(view, bundle);
|
|
ButterKnife.c(this, view);
|
|
final C3024apg c3024apg = this.presenter;
|
|
ArrayList<C0367Fb> arrayList = null;
|
|
if (c3024apg == null) {
|
|
C14957gcv.a("");
|
|
c3024apg = null;
|
|
}
|
|
c3024apg.e((C3024apg) this);
|
|
C0367Fb c0367Fb = this.d;
|
|
if (c0367Fb == null) {
|
|
C14957gcv.a("");
|
|
c0367Fb = null;
|
|
}
|
|
ArrayList<C0367Fb> arrayList2 = this.i;
|
|
if (arrayList2 == null) {
|
|
C14957gcv.a("");
|
|
} else {
|
|
arrayList = arrayList2;
|
|
}
|
|
C14957gcv.e(c0367Fb, "");
|
|
C14957gcv.e(arrayList, "");
|
|
c3024apg.b = c0367Fb;
|
|
c3024apg.c = arrayList;
|
|
ZI.IeS ieS = new ZI.IeS(c3024apg) { // from class: o.apl
|
|
private C3024apg e;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C3024apg.b(this.e, (InterfaceC9068dcj.IeS) obj);
|
|
}
|
|
|
|
{
|
|
this.e = c3024apg;
|
|
}
|
|
};
|
|
if (c3024apg.f != 0) {
|
|
ieS.e(c3024apg.f);
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public final void onClickEditEmail() {
|
|
C3024apg c3024apg = this.presenter;
|
|
if (c3024apg == null) {
|
|
C14957gcv.a("");
|
|
c3024apg = null;
|
|
}
|
|
C3030apm c3030apm = new C3030apm(c3024apg, CommonConstant.RETKEY.EMAIL);
|
|
if (c3024apg.f != 0) {
|
|
c3030apm.e(c3024apg.f);
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public final void onClickNext() {
|
|
final C3024apg c3024apg = this.presenter;
|
|
if (c3024apg == null) {
|
|
C14957gcv.a("");
|
|
c3024apg = null;
|
|
}
|
|
final String str = this.g;
|
|
C14957gcv.e(str, "");
|
|
if (!C14957gcv.b((Object) str, (Object) CommonConstant.RETKEY.EMAIL)) {
|
|
if (C14957gcv.b((Object) str, (Object) "PAPER")) {
|
|
ZI.IeS ieS = new ZI.IeS(c3024apg, str) { // from class: o.apk
|
|
private String a;
|
|
private C3024apg c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C3024apg.e(this.c, this.a, (InterfaceC9068dcj.IeS) obj);
|
|
}
|
|
|
|
{
|
|
this.c = c3024apg;
|
|
this.a = str;
|
|
}
|
|
};
|
|
if (c3024apg.f != 0) {
|
|
ieS.e(c3024apg.f);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
C3030apm c3030apm = new C3030apm(c3024apg, str);
|
|
if (c3024apg.f != 0) {
|
|
c3030apm.e(c3024apg.f);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void d(String str, C0367Fb c0367Fb, ArrayList<C0367Fb> arrayList, String str2) {
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(c0367Fb, "");
|
|
C14957gcv.e(arrayList, "");
|
|
C14957gcv.e(str2, "");
|
|
Context context = getContext();
|
|
if (context != null) {
|
|
StatementChannelCommonActivity.HBt hBt = StatementChannelCommonActivity.f6647o;
|
|
context.startActivity(StatementChannelCommonActivity.HBt.Zm_(context, c0367Fb, arrayList, str, str2));
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void b(boolean z) {
|
|
Button button = this.btnNext;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setEnabled(z);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void d() {
|
|
FragmentActivity activity = getActivity();
|
|
if (activity != null) {
|
|
activity.finish();
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void a(boolean z) {
|
|
LinearLayout linearLayout = this.rootLayout;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(z ? 0 : 4);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void a(String str) {
|
|
C14957gcv.e(str, "");
|
|
TextView textView = this.tvSendTo;
|
|
TextView textView2 = null;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(str);
|
|
TextView textView3 = this.tvSendToTitle;
|
|
if (textView3 != null) {
|
|
textView2 = textView3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView2.setText(getString(R.string.mailing_address));
|
|
g(true);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void b(String str) {
|
|
C14957gcv.e(str, "");
|
|
TextView textView = this.tvSendTo;
|
|
TextView textView2 = null;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(str);
|
|
TextView textView3 = this.tvSendToTitle;
|
|
if (textView3 != null) {
|
|
textView2 = textView3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView2.setText(getString(R.string.ccm_email_address));
|
|
g(false);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void c(String str) {
|
|
C14957gcv.e(str, "");
|
|
CustomTransferAndPayItem customTransferAndPayItem = this.viewChannel;
|
|
if (customTransferAndPayItem == null) {
|
|
C14957gcv.a("");
|
|
customTransferAndPayItem = null;
|
|
}
|
|
customTransferAndPayItem.setText(getString(R.string.channel));
|
|
customTransferAndPayItem.setValue(str);
|
|
customTransferAndPayItem.setFullDivider(false);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void c() {
|
|
LinearLayout linearLayout = this.remarkSelectLayout;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(0);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void d(List<GS> list) {
|
|
C14957gcv.e(list, "");
|
|
Context context = getContext();
|
|
if (context != null) {
|
|
LinearLayout linearLayout = this.itemChannelSelectLayout;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.removeAllViews();
|
|
int i = 0;
|
|
for (Object obj : list) {
|
|
if (i >= 0) {
|
|
GS gs = (GS) obj;
|
|
LinearLayout linearLayout2 = this.itemChannelSelectLayout;
|
|
if (linearLayout2 == null) {
|
|
C14957gcv.a("");
|
|
linearLayout2 = null;
|
|
}
|
|
boolean z = true;
|
|
if (i != list.size() - 1) {
|
|
z = false;
|
|
}
|
|
CustomStatementChannelViewComponent customStatementChannelViewComponent = new CustomStatementChannelViewComponent(context, null, 0);
|
|
customStatementChannelViewComponent.setKey(gs.a);
|
|
customStatementChannelViewComponent.setTitle(gs.d);
|
|
customStatementChannelViewComponent.setRemark(gs.b);
|
|
customStatementChannelViewComponent.b(z);
|
|
customStatementChannelViewComponent.setSelect(this.g);
|
|
customStatementChannelViewComponent.setListener(this);
|
|
linearLayout2.addView(customStatementChannelViewComponent);
|
|
i++;
|
|
} else {
|
|
throw new ArithmeticException("Index overflow has happened.");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.cardmanagement.CustomStatementChannelViewComponent.LWm
|
|
public final void e(String str) {
|
|
C14957gcv.e(str, "");
|
|
this.g = str;
|
|
C3024apg c3024apg = this.presenter;
|
|
if (c3024apg == null) {
|
|
C14957gcv.a("");
|
|
c3024apg = null;
|
|
}
|
|
final String str2 = this.g;
|
|
C14957gcv.e(str2, "");
|
|
final GT gt = c3024apg.d;
|
|
if (gt != null) {
|
|
ZI.IeS ieS = new ZI.IeS(gt, str2) { // from class: o.apj
|
|
private String a;
|
|
private GT b;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C3024apg.a(this.b, this.a, (InterfaceC9068dcj.IeS) obj);
|
|
}
|
|
|
|
{
|
|
this.b = gt;
|
|
this.a = str2;
|
|
}
|
|
};
|
|
if (c3024apg.f != 0) {
|
|
ieS.e(c3024apg.f);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void d(boolean z) {
|
|
LinearLayout linearLayout = this.sendToLayout;
|
|
if (linearLayout == null) {
|
|
C14957gcv.a("");
|
|
linearLayout = null;
|
|
}
|
|
linearLayout.setVisibility(z ? 8 : 0);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onDestroy() {
|
|
C3024apg c3024apg = this.presenter;
|
|
if (c3024apg == null) {
|
|
C14957gcv.a("");
|
|
c3024apg = null;
|
|
}
|
|
c3024apg.w_();
|
|
super.onDestroy();
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void d(String str, C0367Fb c0367Fb, ArrayList<C0367Fb> arrayList) {
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(c0367Fb, "");
|
|
C14957gcv.e(arrayList, "");
|
|
Context context = getContext();
|
|
if (context != null) {
|
|
StatementChannelChooseAddressActivity.IeS ieS = StatementChannelChooseAddressActivity.m;
|
|
C14957gcv.e(context, "");
|
|
C14957gcv.e(c0367Fb, "");
|
|
C14957gcv.e(arrayList, "");
|
|
C14957gcv.e(str, "");
|
|
Intent intent = new Intent(context, (Class<?>) StatementChannelChooseAddressActivity.class);
|
|
intent.putExtra("EXTRA_CREDIT_CARD_DISPLAY_KEY", c0367Fb);
|
|
intent.putExtra("EXTRA_CHANNEL_KEY", str);
|
|
intent.putParcelableArrayListExtra("EXTRA_CREDIT_CARD_DISPLAY_LIST_KEY", arrayList);
|
|
context.startActivity(intent);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void c(boolean z) {
|
|
Button button = this.btnNext;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setVisibility(z ? 0 : 8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void e(boolean z) {
|
|
TextView textView = this.tvRemarkSelectNewChannel;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setVisibility(z ? 0 : 8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9068dcj.IeS
|
|
public final void b() {
|
|
c("change_stmt_channel_landing", new pug("source", "services_tab"));
|
|
}
|
|
|
|
private final void g(boolean z) {
|
|
ImageView imageView = this.ivEmailEdit;
|
|
if (imageView == null) {
|
|
C14957gcv.a("");
|
|
imageView = null;
|
|
}
|
|
imageView.setVisibility(z ? 4 : 0);
|
|
}
|
|
}
|