package com.scb.phone.view.fragment.investment.onboarding; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.text.SpannableString; import android.text.method.LinkMovementMethod; 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.findus.FindUsActivity; import com.scb.phone.view.custom.ntb.CustomInformationPanel; import com.scb.phone.view.fragment.investment.onboarding.FundPersonalInfoFragment; import java.util.List; import java.util.NoSuchElementException; import o.C0928RsD; import o.C14470ftn; import o.C15715hv; import o.C17046tXv; import o.GEP; import o.InterfaceC13391fZD; import o.InterfaceC6669cZl; import o.Jel; import o.PRA; import o.R; import o.SZ; import o.YKU; import o.ZI; import o.bEV; import o.fIE; import o.zEQ; /* loaded from: classes5.dex */ public class FundPersonalInfoFragment extends Hilt_FundPersonalInfoFragment implements InterfaceC6669cZl.tOB, CustomInformationPanel.RVV { @BindView Button buttonNext; private fIE d; @BindView TextView footer; @BindView CustomInformationPanel panelPersonalInfo; @InterfaceC13391fZD public bEV personalInformationPresenter; private boolean c = false; private int j = 0; public static FundPersonalInfoFragment g() { Bundle bundle = new Bundle(); bundle.putInt("TYPE_KEY", 1); FundPersonalInfoFragment fundPersonalInfoFragment = new FundPersonalInfoFragment(); fundPersonalInfoFragment.setArguments(bundle); return fundPersonalInfoFragment; } @Override // androidx.fragment.app.Fragment public void onResume() { super.onResume(); this.c = false; } /* JADX WARN: Multi-variable type inference failed */ @Override // com.scb.phone.view.fragment.investment.onboarding.Hilt_FundPersonalInfoFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public void onAttach(Context context) { super.onAttach(context); if (context instanceof fIE) { this.d = (fIE) context; } } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559762, viewGroup, false); if (getArguments() != null) { this.j = getArguments().getInt("TYPE_KEY", 0); } ButterKnife.c(this, inflate); this.personalInformationPresenter.e((bEV) this); this.buttonNext.setEnabled(false); v("mfonboard_personalinfo"); bEV bev = this.personalInformationPresenter; if (bev != null) { int i = this.j; bev.b = i; if (bev.f != 0) { bev.f.y(); } if (i == 0) { C0928RsD c0928RsD = bev.a; c0928RsD.d(c0928RsD.e(), new bEV.RVV(bev)); } else if (i == 1) { ZI.IeS ieS = new ZI.IeS() { // from class: o.bEU @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6669cZl.tOB) obj).a(); } }; if (bev.f != 0) { ieS.e(bev.f); } bev.e.b(); C14470ftn c14470ftn = bev.e; c14470ftn.d(c14470ftn.i, new bEV.RVV(bev)); } } return inflate; } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroy() { super.onDestroy(); this.personalInformationPresenter.w_(); } @Override // o.InterfaceC6669cZl.tOB public final void a(List list) { if (list != null) { this.panelPersonalInfo.setInformationItemList(list); this.panelPersonalInfo.setOnHasValueItemListener(this); } } @Override // o.InterfaceC6669cZl.tOB public final void c() { fIE fie = this.d; if (fie != null) { fie.s(); } } @Override // o.InterfaceC6669cZl.tOB public final void e(boolean z) { this.buttonNext.setEnabled(z); } @Override // o.InterfaceC6669cZl.tOB public final void a() { StringBuilder sb = new StringBuilder(); sb.append(getString(R.string.single_form_personal_info_contact_us)); sb.append(" "); SpannableString Qo_ = C17046tXv.Qo_(sb.toString(), getString(R.string.single_form_personal_info_contact_us_clickable), getResources(), new C17046tXv.HBt(this) { // from class: o.fhJ private FundPersonalInfoFragment e; @Override // o.C17046tXv.HBt public final void e() { FundPersonalInfoFragment.d(this.e); } { this.e = this; } }, false, 0, C15715hv.LWm.scb_purple); this.footer.setMovementMethod(LinkMovementMethod.getInstance()); this.footer.setText(Qo_); } @Override // o.InterfaceC6669cZl.tOB public final void d() { FindUsActivity.d(getContext(), false); } /* JADX WARN: Multi-variable type inference failed */ @OnClick public void onClickNext(View view) { zEQ d; CustomInformationPanel customInformationPanel = this.panelPersonalInfo; if (customInformationPanel != null) { bEV bev = this.personalInformationPresenter; YKU yku = new YKU(customInformationPanel.e()); YKU yku2 = new YKU(yku.a, new GEP(yku.b, new Jel() { // from class: o.bER @Override // o.Jel public final boolean e(Object obj) { boolean equalsIgnoreCase; equalsIgnoreCase = "MOBILE_NUMBER".equalsIgnoreCase(((SZ) obj).a); return equalsIgnoreCase; } })); if (yku2.b.hasNext()) { d = zEQ.a(yku2.b.next()); } else { d = zEQ.d(); } T t = d.d; if (t != 0) { R.IeS ieS = new R.IeS(); ieS.a = ((SZ) t).g; o.R r = new o.R(ieS, (byte) 0); int i = bev.b; if (i == 0) { bev.a.b(r); C0928RsD c0928RsD = bev.a; c0928RsD.d(c0928RsD.i, new bEV.Sts(bev)); return; } if (i == 1) { bev.e.e(r); C14470ftn c14470ftn = bev.e; c14470ftn.d(c14470ftn.i, new bEV.Sts(bev)); return; } return; } throw new NoSuchElementException("No value present"); } } @Override // com.scb.phone.view.custom.ntb.CustomInformationPanel.RVV public final void b() { bEV bev = this.personalInformationPresenter; YKU yku = new YKU(this.panelPersonalInfo.e()); if (((List) new YKU(yku.a, new GEP(yku.b, new Jel() { // from class: o.bFa @Override // o.Jel public final boolean e(Object obj) { boolean b; b = gjJ.b((CharSequence) ((SZ) obj).g); return b; } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8()))).isEmpty()) { ZI.IeS ieS = new ZI.IeS() { // from class: o.bEY @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6669cZl.tOB) obj).e(true); } }; if (bev.f != 0) { ieS.e(bev.f); return; } return; } ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bEW @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6669cZl.tOB) obj).e(false); } }; if (bev.f != 0) { ieS2.e(bev.f); } } public static /* synthetic */ void d(FundPersonalInfoFragment fundPersonalInfoFragment) { if (fundPersonalInfoFragment.c) { return; } bEV bev = fundPersonalInfoFragment.personalInformationPresenter; ZI.IeS ieS = new ZI.IeS() { // from class: o.bET @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6669cZl.tOB) obj).d(); } }; if (bev.f != 0) { ieS.e(bev.f); } fundPersonalInfoFragment.c = true; } public static /* synthetic */ void auZ_(FundPersonalInfoFragment fundPersonalInfoFragment, DialogInterface dialogInterface) { dialogInterface.dismiss(); fundPersonalInfoFragment.k(false); } }