what-the-bank/sources/com/scb/phone/view/fragment/prepaid/request/PrepaidRequestInputFragment...

567 lines
19 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.prepaid.request;
import android.content.Context;
import android.content.DialogInterface;
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 androidx.constraintlayout.widget.ConstraintLayout;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.prepaid.request.PrepaidRequestMailingAddressActivity;
import com.scb.phone.view.activity.prepaid.request.PrepaidRequestTermConditionsActivity;
import com.scb.phone.view.adapter.accountsummary.ErrorPagerAdapter;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.prepaid.request.PrepaidRequestInputFragment;
import com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment;
import java.util.List;
import kotlin.NoWhenBranchMatchedException;
import me.relex.circleindicator.CircleIndicator;
import o.AbstractC13482fbE;
import o.AbstractC14961gcz;
import o.C1044Uj;
import o.C1047Um;
import o.C1064Uv;
import o.C1171Xc;
import o.C12385exH;
import o.C14851gaI;
import o.C14957gcv;
import o.C15864jJ;
import o.C17334vqs;
import o.C7606crW;
import o.C9349di;
import o.C9561dm;
import o.Dwh;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC9514dlF;
import o.QE;
import o.QZq;
import o.SP;
import o.UD;
import o.WW;
import o.ZI;
import o.fZZ;
import o.pCe;
/* loaded from: classes5.dex */
public final class PrepaidRequestInputFragment extends Hilt_PrepaidRequestInputFragment implements InterfaceC9514dlF.Sts, AccountSourceSelectFragment.Sts {
public static final Sts d = new Sts(0);
@BindView
public CustomTransferAndPayItem annualFeeSection;
@BindView
public Button btReview;
private final InterfaceC13393fZL c;
@BindView
public ConstraintLayout csEmptyState;
@BindView
public CustomTransferAndPayItem deliveryFeeSection;
private C12385exH g = new C12385exH(C14851gaI.c);
@BindView
public CircleIndicator indicator;
@BindView
public CustomTransferAndPayItem issuingFeeSection;
@BindView
public ConstraintLayout llPrepaid;
@InterfaceC13391fZD
public C7606crW presenter;
@BindView
public TextView tvCardEmptyStateFooter;
@BindView
public TextView tvCardEmptyStateHeader;
@BindView
public TextView tvMailingAddress;
@BindView
public ViewPager vpPrepaidCard;
public static /* synthetic */ void i() {
}
public PrepaidRequestInputFragment() {
LWm lWm = LWm.a;
C14957gcv.e(lWm, "");
this.c = new fZZ(lWm);
}
/* 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.2131559823, viewGroup, false);
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
((BaseFragment) this).a = ButterKnife.c(this, view);
C7606crW c7606crW = this.presenter;
C7606crW c7606crW2 = null;
if (c7606crW == null) {
C14957gcv.a("");
c7606crW = null;
}
c7606crW.e((C7606crW) this);
ViewPager viewPager = this.vpPrepaidCard;
if (viewPager == null) {
C14957gcv.a("");
viewPager = null;
}
viewPager.setAdapter(this.g);
ViewPager viewPager2 = this.vpPrepaidCard;
if (viewPager2 == null) {
C14957gcv.a("");
viewPager2 = null;
}
viewPager2.addOnPageChangeListener(new RVV(this));
CircleIndicator circleIndicator = this.indicator;
if (circleIndicator == null) {
C14957gcv.a("");
circleIndicator = null;
}
ViewPager viewPager3 = this.vpPrepaidCard;
if (viewPager3 == null) {
C14957gcv.a("");
viewPager3 = null;
}
circleIndicator.setViewPager(viewPager3);
C12385exH c12385exH = this.g;
CircleIndicator circleIndicator2 = this.indicator;
if (circleIndicator2 == null) {
C14957gcv.a("");
circleIndicator2 = null;
}
c12385exH.registerDataSetObserver(circleIndicator2.c);
CustomTransferAndPayItem customTransferAndPayItem = this.annualFeeSection;
if (customTransferAndPayItem == null) {
C14957gcv.a("");
customTransferAndPayItem = null;
}
customTransferAndPayItem.setDescriptionText(getString(R.string.prepaid_request_input_annual_fee_description));
CustomTransferAndPayItem customTransferAndPayItem2 = this.annualFeeSection;
if (customTransferAndPayItem2 == null) {
C14957gcv.a("");
customTransferAndPayItem2 = null;
}
customTransferAndPayItem2.scheduleFeeText.setVisibility(0);
CustomTransferAndPayItem customTransferAndPayItem3 = this.annualFeeSection;
if (customTransferAndPayItem3 == null) {
C14957gcv.a("");
customTransferAndPayItem3 = null;
}
customTransferAndPayItem3.setDescriptionAlignToLeft();
C7606crW c7606crW3 = this.presenter;
if (c7606crW3 != null) {
c7606crW2 = c7606crW3;
} else {
C14957gcv.a("");
}
if (c7606crW2.f != 0) {
c7606crW2.f.y();
}
C15864jJ c15864jJ = c7606crW2.c;
C7606crW.HBt hBt = new C7606crW.HBt(c7606crW2);
C7606crW.Sts sts = new C7606crW.Sts(c7606crW2);
C9349di c9349di = new C9349di((byte) 0);
C14957gcv.e(hBt, "");
C14957gcv.e(sts, "");
C14957gcv.e(c9349di, "");
c15864jJ.b(c15864jJ.e, hBt, sts, new C17334vqs.IeS(c9349di));
}
/* loaded from: classes5.dex */
public static final class RVV extends ViewPager.jbe {
private PrepaidRequestInputFragment e;
RVV(PrepaidRequestInputFragment prepaidRequestInputFragment) {
this.e = prepaidRequestInputFragment;
}
@Override // androidx.viewpager.widget.ViewPager.jbe, androidx.viewpager.widget.ViewPager.ojQ
public final void onPageSelected(int i) {
C7606crW c7606crW = this.e.presenter;
if (c7606crW == null) {
C14957gcv.a("");
c7606crW = null;
}
c7606crW.b(i);
}
}
@Override // o.InterfaceC9514dlF.Sts
public final void d(C1171Xc c1171Xc) {
C14957gcv.e(c1171Xc, "");
AbstractC13482fbE a = getChildFragmentManager().a();
C14957gcv.c(a, "");
a.b(R.id.fragment_account_source_select, AccountSourceSelectFragment.d(c1171Xc, ErrorPagerAdapter.LWm.AUTO_RESIZE_MESSAGE_ERROR), null, 2);
a.b();
}
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
public final void a(WW ww) {
C7606crW c7606crW = this.presenter;
if (c7606crW == null) {
C14957gcv.a("");
c7606crW = null;
}
c7606crW.e = ww;
ZI.IeS ieS = new ZI.IeS() { // from class: o.crZ
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9514dlF.Sts) obj).c();
}
};
if (c7606crW.f != 0) {
ieS.e(c7606crW.f);
}
}
@Override // o.InterfaceC9514dlF.Sts
public final void e(List<? extends QE> list) {
C14957gcv.e(list, "");
C12385exH c12385exH = this.g;
C14957gcv.e(list, "");
c12385exH.e = list;
c12385exH.notifyDataSetChanged();
}
@Override // o.InterfaceC9514dlF.Sts
public final void b(boolean z) {
int i;
CircleIndicator circleIndicator = this.indicator;
if (circleIndicator == null) {
C14957gcv.a("");
circleIndicator = null;
}
if (z) {
i = 0;
} else {
if (z) {
throw new NoWhenBranchMatchedException();
}
i = 8;
}
circleIndicator.setVisibility(i);
}
@Override // o.InterfaceC9514dlF.Sts
public final void e() {
ConstraintLayout constraintLayout = this.llPrepaid;
if (constraintLayout == null) {
C14957gcv.a("");
constraintLayout = null;
}
constraintLayout.setVisibility(0);
}
@Override // o.InterfaceC9514dlF.Sts
public final void a(String str) {
C14957gcv.e(str, "");
CustomTransferAndPayItem customTransferAndPayItem = this.annualFeeSection;
if (customTransferAndPayItem == null) {
C14957gcv.a("");
customTransferAndPayItem = null;
}
customTransferAndPayItem.setValue(str);
}
@Override // o.InterfaceC9514dlF.Sts
public final void c(String str) {
C14957gcv.e(str, "");
CustomTransferAndPayItem customTransferAndPayItem = this.issuingFeeSection;
if (customTransferAndPayItem == null) {
C14957gcv.a("");
customTransferAndPayItem = null;
}
customTransferAndPayItem.setValue(str);
}
@Override // o.InterfaceC9514dlF.Sts
public final void d(String str) {
C14957gcv.e(str, "");
CustomTransferAndPayItem customTransferAndPayItem = this.deliveryFeeSection;
if (customTransferAndPayItem == null) {
C14957gcv.a("");
customTransferAndPayItem = null;
}
customTransferAndPayItem.setValue(str);
}
@Override // o.InterfaceC9514dlF.Sts
public final void e(String str) {
C14957gcv.e(str, "");
TextView textView = this.tvMailingAddress;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(str);
}
@Override // o.InterfaceC9514dlF.Sts
public final void c() {
Button button = this.btReview;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setEnabled(true);
}
@OnClick
public final void onReviewButtonClicked() {
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.confirm_mailing_title).d(R.string.confirm_mailing_text).aoT_(R.string.ok, new DialogInterface.OnClickListener(this) { // from class: o.ftX
private PrepaidRequestInputFragment e;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
PrepaidRequestInputFragment.e(this.e);
}
{
this.e = this;
}
}), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.ftV
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
PrepaidRequestInputFragment.i();
}
}})).show();
}
@OnClick
public final void onClickedChangeMailingAddress() {
final C7606crW c7606crW = this.presenter;
if (c7606crW == null) {
C14957gcv.a("");
c7606crW = null;
}
ZI.IeS ieS = new ZI.IeS(c7606crW) { // from class: o.crU
private C7606crW e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7606crW.c(this.e, (InterfaceC9514dlF.Sts) obj);
}
{
this.e = c7606crW;
}
};
if (c7606crW.f != 0) {
ieS.e(c7606crW.f);
}
}
@Override // o.InterfaceC9514dlF.Sts
public final void e(UD ud, C1064Uv c1064Uv) {
C14957gcv.e(ud, "");
C14957gcv.e(c1064Uv, "");
Dwh dwh = (Dwh) this.c.e();
if (getActivity() != null) {
dwh.c(((BaseActivity) getActivity()).scbAnalytics, "planetscb_request_review");
}
Context context = getContext();
if (context != null) {
PrepaidRequestTermConditionsActivity.LWm lWm = PrepaidRequestTermConditionsActivity.m;
C14957gcv.e(context, "");
C14957gcv.e(ud, "");
C14957gcv.e(c1064Uv, "");
Intent intent = new Intent(context, (Class<?>) PrepaidRequestTermConditionsActivity.class);
intent.putExtra("EXTRAS_PREPAID_REQUEST_VERIFICATION_DISPLAY", ud);
intent.putExtra("EXTRAS_PREPAID_REQUEST_LANDING_DISPLAY", c1064Uv);
startActivity(intent);
}
}
@Override // o.InterfaceC9514dlF.Sts
public final void e(SP sp) {
C14957gcv.e(sp, "");
Context context = getContext();
if (context != null) {
PrepaidRequestMailingAddressActivity.LWm lWm = PrepaidRequestMailingAddressActivity.k;
C14957gcv.e(context, "");
C14957gcv.e(sp, "");
Intent intent = new Intent(context, (Class<?>) PrepaidRequestMailingAddressActivity.class);
intent.putExtra("EXTRA_PREPAID_REQUEST_MAILING_ADDRESS", sp);
startActivityForResult(intent, 1112);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onActivityResult(int i, int i2, Intent intent) {
Bundle extras;
super.onActivityResult(i, i2, intent);
if (i == 1112 && i2 == -1) {
PrepaidRequestMailingAddressActivity.LWm lWm = PrepaidRequestMailingAddressActivity.k;
final C7606crW c7606crW = null;
final C1044Uj c1044Uj = (intent == null || (extras = intent.getExtras()) == null) ? null : (C1044Uj) extras.getParcelable("EXTRA_PREPAID_REQUEST_MAILING_ADDRESS");
if (c1044Uj != null) {
C7606crW c7606crW2 = this.presenter;
if (c7606crW2 != null) {
c7606crW = c7606crW2;
} else {
C14957gcv.a("");
}
C14957gcv.e(c1044Uj, "");
c7606crW.a = c1044Uj;
ZI.IeS ieS = new ZI.IeS(c7606crW, c1044Uj) { // from class: o.crY
private C1044Uj a;
private C7606crW e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7606crW.b(this.e, this.a, (InterfaceC9514dlF.Sts) obj);
}
{
this.e = c7606crW;
this.a = c1044Uj;
}
};
if (c7606crW.f != 0) {
ieS.e(c7606crW.f);
}
}
}
}
@Override // o.InterfaceC9514dlF.Sts
public final void d() {
ConstraintLayout constraintLayout = this.llPrepaid;
TextView textView = null;
if (constraintLayout == null) {
C14957gcv.a("");
constraintLayout = null;
}
constraintLayout.setVisibility(8);
ConstraintLayout constraintLayout2 = this.csEmptyState;
if (constraintLayout2 == null) {
C14957gcv.a("");
constraintLayout2 = null;
}
constraintLayout2.setVisibility(0);
TextView textView2 = this.tvCardEmptyStateHeader;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(R.string.prepaid_request_duplicate_card);
TextView textView3 = this.tvCardEmptyStateFooter;
if (textView3 != null) {
textView = textView3;
} else {
C14957gcv.a("");
}
textView.setVisibility(8);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C7606crW c7606crW = this.presenter;
if (c7606crW == null) {
C14957gcv.a("");
c7606crW = null;
}
c7606crW.w_();
super.onDestroyView();
}
/* loaded from: classes5.dex */
static final class LWm extends AbstractC14961gcz implements InterfaceC14890gbN<Dwh> {
public static final LWm a = new LWm();
@Override // o.InterfaceC14890gbN
public final /* synthetic */ Dwh invoke() {
return new Dwh();
}
LWm() {
super(0);
}
}
public static /* synthetic */ void e(PrepaidRequestInputFragment prepaidRequestInputFragment) {
C14957gcv.e(prepaidRequestInputFragment, "");
C7606crW c7606crW = prepaidRequestInputFragment.presenter;
if (c7606crW == null) {
C14957gcv.a("");
c7606crW = null;
}
WW ww = c7606crW.e;
String valueOf = String.valueOf(ww != null ? ww.s : null);
C1047Um c1047Um = c7606crW.d;
if (c1047Um == null) {
C14957gcv.a("");
c1047Um = null;
}
String str = c1047Um.b.e;
C1044Uj c1044Uj = c7606crW.a;
String str2 = c1044Uj != null ? c1044Uj.a : null;
C1044Uj c1044Uj2 = c7606crW.a;
String str3 = c1044Uj2 != null ? c1044Uj2.m : null;
C1044Uj c1044Uj3 = c7606crW.a;
String str4 = c1044Uj3 != null ? c1044Uj3.h : null;
C1044Uj c1044Uj4 = c7606crW.a;
String str5 = c1044Uj4 != null ? c1044Uj4.c : null;
C1044Uj c1044Uj5 = c7606crW.a;
String str6 = c1044Uj5 != null ? c1044Uj5.d : null;
C1044Uj c1044Uj6 = c7606crW.a;
String str7 = c1044Uj6 != null ? c1044Uj6.f : null;
C1044Uj c1044Uj7 = c7606crW.a;
String str8 = c1044Uj7 != null ? c1044Uj7.i : null;
C1044Uj c1044Uj8 = c7606crW.a;
String str9 = c1044Uj8 != null ? c1044Uj8.g : null;
C1044Uj c1044Uj9 = c7606crW.a;
String str10 = c1044Uj9 != null ? c1044Uj9.b : null;
C1044Uj c1044Uj10 = c7606crW.a;
String str11 = c1044Uj10 != null ? c1044Uj10.e : null;
C1044Uj c1044Uj11 = c7606crW.a;
String str12 = c1044Uj11 != null ? c1044Uj11.j : null;
C1044Uj c1044Uj12 = c7606crW.a;
C9561dm c9561dm = new C9561dm(valueOf, str, new pCe(str2, str3, str4, str5, str6, str7, str8, str9, str10, str11, str12, c1044Uj12 != null ? c1044Uj12.n : null));
if (c7606crW.f != 0) {
c7606crW.f.y();
}
C15864jJ c15864jJ = c7606crW.c;
C7606crW.RVV rvv = new C7606crW.RVV(c7606crW);
C7606crW.LWm lWm = new C7606crW.LWm(c7606crW);
C14957gcv.e(rvv, "");
C14957gcv.e(lWm, "");
C14957gcv.e(c9561dm, "");
c15864jJ.b(c15864jJ.d, rvv, lWm, new QZq.IeS(c9561dm));
}
}