package com.scb.phone.view.fragment.hml.frictionlessmoa; 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 androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.scb.phone.R; import com.scb.phone.view.activity.hml.HmlConsentActivity; import com.scb.phone.view.activity.hml.HmlDocumentUploadGuidelineActivity; import com.scb.phone.view.activity.hml.HmlIssuerLandingActivity; import com.scb.phone.view.adapter.hml.frictionlessmoa.HmlMoaAdapter; import com.scb.phone.view.custom.common.CustomAcceptDeclineButtons; import com.scb.phone.view.fragment.BaseFragment; import java.util.List; import kotlin.NoWhenBranchMatchedException; import o.AbstractC14961gcz; import o.AbstractC15351go; import o.C0770Oe; import o.C14866gag; import o.C14957gcv; import o.C15777iY; import o.C5685bxi; import o.C5688bxl; import o.HUj; import o.InterfaceC13391fZD; import o.InterfaceC14894gbR; import o.InterfaceC9316dhT; import o.OVB; import o.ZI; import o.pug; /* loaded from: classes5.dex */ public final class HmlMoaFragment extends Hilt_HmlMoaFragment implements InterfaceC9316dhT { public static final Sts c = new Sts(0); @BindView public TextView accountHeader; @BindView public RecyclerView accountList; @BindView public CustomAcceptDeclineButtons btMoa; @BindView public TextView disclaimer; @BindView public Button nextButton; @InterfaceC13391fZD public C5688bxl presenter; /* 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, ""); View inflate = layoutInflater.inflate(R.layout.2131559701, viewGroup, false); ((BaseFragment) this).a = ButterKnife.c(this, inflate); c("p10x1_moa", new pug("user_type", "etb")); RecyclerView recyclerView = this.accountList; C5688bxl c5688bxl = null; if (recyclerView == null) { C14957gcv.a(""); recyclerView = null; } getActivity(); recyclerView.setLayoutManager(new LinearLayoutManager(1, false)); CustomAcceptDeclineButtons customAcceptDeclineButtons = this.btMoa; if (customAcceptDeclineButtons == null) { C14957gcv.a(""); customAcceptDeclineButtons = null; } Button button = customAcceptDeclineButtons.btAccept; if (button == null) { C14957gcv.a(""); button = null; } button.setText(getString(R.string.hml_moa_accept_button)); CustomAcceptDeclineButtons customAcceptDeclineButtons2 = this.btMoa; if (customAcceptDeclineButtons2 == null) { C14957gcv.a(""); customAcceptDeclineButtons2 = null; } Button button2 = customAcceptDeclineButtons2.btDecline; if (button2 == null) { C14957gcv.a(""); button2 = null; } button2.setText(getString(R.string.hml_moa_decline_button)); CustomAcceptDeclineButtons customAcceptDeclineButtons3 = this.btMoa; if (customAcceptDeclineButtons3 == null) { C14957gcv.a(""); customAcceptDeclineButtons3 = null; } TextView textView = customAcceptDeclineButtons3.tvLabel; if (textView == null) { C14957gcv.a(""); textView = null; } textView.setText(getString(R.string.hml_moa_buttons_text)); CustomAcceptDeclineButtons customAcceptDeclineButtons4 = this.btMoa; if (customAcceptDeclineButtons4 == null) { C14957gcv.a(""); customAcceptDeclineButtons4 = null; } customAcceptDeclineButtons4.setOnButtonClickListener(new LWm(this)); C5688bxl c5688bxl2 = this.presenter; if (c5688bxl2 == null) { C14957gcv.a(""); c5688bxl2 = null; } c5688bxl2.e((C5688bxl) this); C5688bxl c5688bxl3 = this.presenter; if (c5688bxl3 != null) { c5688bxl = c5688bxl3; } else { C14957gcv.a(""); } if (c5688bxl.f != 0) { c5688bxl.f.y(); } C15777iY c15777iY = c5688bxl.e; C5688bxl.LWm lWm = new C5688bxl.LWm(c5688bxl); C5688bxl.HBt hBt = new C5688bxl.HBt(c5688bxl); C5688bxl.tOB tob = new C5688bxl.tOB(c5688bxl); C14957gcv.e(lWm, ""); C14957gcv.e(hBt, ""); C14957gcv.e(tob, ""); c15777iY.b(c15777iY.b, lWm, hBt, new AbstractC15351go.LWm(), tob); C14957gcv.c(inflate, ""); return inflate; } /* loaded from: classes5.dex */ static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR { private HmlMoaFragment a; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Boolean bool) { boolean booleanValue = bool.booleanValue(); final C5688bxl c5688bxl = this.a.presenter; if (c5688bxl == null) { C14957gcv.a(""); c5688bxl = null; } if (booleanValue) { ZI.IeS ieS = new ZI.IeS(c5688bxl) { // from class: o.bxj private C5688bxl b; @Override // o.ZI.IeS public final void e(Object obj) { C5688bxl.d(this.b, (InterfaceC9316dhT) obj); } { this.b = c5688bxl; } }; if (c5688bxl.f != 0) { ieS.e(c5688bxl.f); } } else { ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bxk @Override // o.ZI.IeS public final void e(Object obj) { C5688bxl.e((InterfaceC9316dhT) obj); } }; if (c5688bxl.f != 0) { ieS2.e(c5688bxl.f); } } return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ LWm(HmlMoaFragment hmlMoaFragment) { super(1); this.a = hmlMoaFragment; } } @Override // o.InterfaceC9316dhT public final void e() { TextView textView = this.accountHeader; TextView textView2 = null; if (textView == null) { C14957gcv.a(""); textView = null; } textView.setVisibility(0); RecyclerView recyclerView = this.accountList; if (recyclerView == null) { C14957gcv.a(""); recyclerView = null; } recyclerView.setVisibility(0); TextView textView3 = this.disclaimer; if (textView3 != null) { textView2 = textView3; } else { C14957gcv.a(""); } textView2.setVisibility(0); } @Override // o.InterfaceC9316dhT public final void c() { TextView textView = this.accountHeader; TextView textView2 = null; if (textView == null) { C14957gcv.a(""); textView = null; } textView.setVisibility(8); RecyclerView recyclerView = this.accountList; if (recyclerView == null) { C14957gcv.a(""); recyclerView = null; } recyclerView.setVisibility(8); TextView textView3 = this.disclaimer; if (textView3 != null) { textView2 = textView3; } else { C14957gcv.a(""); } textView2.setVisibility(8); } @Override // o.InterfaceC9316dhT public final void a(boolean z) { CustomAcceptDeclineButtons customAcceptDeclineButtons = this.btMoa; Button button = null; if (customAcceptDeclineButtons == null) { C14957gcv.a(""); customAcceptDeclineButtons = null; } Button button2 = customAcceptDeclineButtons.btAccept; if (button2 == null) { C14957gcv.a(""); button2 = null; } button2.setSelected(true); CustomAcceptDeclineButtons customAcceptDeclineButtons2 = this.btMoa; if (customAcceptDeclineButtons2 == null) { C14957gcv.a(""); customAcceptDeclineButtons2 = null; } Button button3 = customAcceptDeclineButtons2.btDecline; if (button3 == null) { C14957gcv.a(""); button3 = null; } button3.setSelected(false); Button button4 = this.nextButton; if (button4 != null) { button = button4; } else { C14957gcv.a(""); } button.setEnabled(z); } @Override // o.InterfaceC9316dhT public final void d() { CustomAcceptDeclineButtons customAcceptDeclineButtons = this.btMoa; Button button = null; if (customAcceptDeclineButtons == null) { C14957gcv.a(""); customAcceptDeclineButtons = null; } Button button2 = customAcceptDeclineButtons.btAccept; if (button2 == null) { C14957gcv.a(""); button2 = null; } button2.setSelected(false); CustomAcceptDeclineButtons customAcceptDeclineButtons2 = this.btMoa; if (customAcceptDeclineButtons2 == null) { C14957gcv.a(""); customAcceptDeclineButtons2 = null; } Button button3 = customAcceptDeclineButtons2.btDecline; if (button3 == null) { C14957gcv.a(""); button3 = null; } button3.setSelected(true); Button button4 = this.nextButton; if (button4 != null) { button = button4; } else { C14957gcv.a(""); } button.setEnabled(true); } /* loaded from: classes5.dex */ static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR { private HmlMoaFragment c; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(C0770Oe c0770Oe) { C0770Oe c0770Oe2 = c0770Oe; C14957gcv.e(c0770Oe2, ""); C5688bxl c5688bxl = this.c.presenter; if (c5688bxl == null) { C14957gcv.a(""); c5688bxl = null; } C14957gcv.e(c0770Oe2, ""); c5688bxl.b = c0770Oe2; C5685bxi c5685bxi = new C5685bxi(); if (c5688bxl.f != 0) { c5685bxi.e(c5688bxl.f); } return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ IeS(HmlMoaFragment hmlMoaFragment) { super(1); this.c = hmlMoaFragment; } } @Override // o.InterfaceC9316dhT public final void e(List list) { C14957gcv.e(list, ""); RecyclerView recyclerView = this.accountList; if (recyclerView == null) { C14957gcv.a(""); recyclerView = null; } recyclerView.setAdapter(new HmlMoaAdapter(new IeS(this), list)); } @OnClick public final void onNextClicked() { C5688bxl c5688bxl = this.presenter; if (c5688bxl == null) { C14957gcv.a(""); c5688bxl = null; } CustomAcceptDeclineButtons customAcceptDeclineButtons = this.btMoa; if (customAcceptDeclineButtons == null) { C14957gcv.a(""); customAcceptDeclineButtons = null; } Button button = customAcceptDeclineButtons.btAccept; if (button == null) { C14957gcv.a(""); button = null; } boolean isSelected = button.isSelected(); if (c5688bxl.f != 0) { c5688bxl.f.y(); } C15777iY c15777iY = c5688bxl.e; C5688bxl.RVV rvv = new C5688bxl.RVV(c5688bxl); C5688bxl.Sts sts = new C5688bxl.Sts(c5688bxl); C0770Oe c0770Oe = c5688bxl.b; String str = c0770Oe != null ? c0770Oe.b : null; C14957gcv.e(rvv, ""); C14957gcv.e(sts, ""); c15777iY.d(c15777iY.c, rvv, sts, new HUj.HBt(isSelected, str)); } @Override // o.InterfaceC9316dhT public final void a() { Button button = this.nextButton; if (button == null) { C14957gcv.a(""); button = null; } button.setEnabled(true); } @Override // o.InterfaceC9316dhT public final void b(C5688bxl.IeS ieS) { Intent intent; C14957gcv.e(ieS, ""); Context context = getContext(); if (context != null) { int i = HBt.c[ieS.ordinal()]; if (i == 1) { HmlDocumentUploadGuidelineActivity.HBt hBt = HmlDocumentUploadGuidelineActivity.b; C14957gcv.e(context, ""); intent = new Intent(context, (Class) HmlDocumentUploadGuidelineActivity.class); } else if (i == 2) { HmlIssuerLandingActivity.LWm lWm = HmlIssuerLandingActivity.f7283o; intent = new Intent(context, (Class) HmlIssuerLandingActivity.class); } else if (i == 3) { HmlConsentActivity.Sts sts = HmlConsentActivity.k; intent = HmlConsentActivity.Sts.afF_(context, OVB.NCB_CONSENT, null); } else { throw new NoWhenBranchMatchedException(); } startActivity(intent); } } /* loaded from: classes5.dex */ public final /* synthetic */ class HBt { public static final int[] c; static { int[] iArr = new int[C5688bxl.IeS.values().length]; try { iArr[C5688bxl.IeS.DOCUMENT_GUIDELINE.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { iArr[C5688bxl.IeS.ISSUER_LANDING.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { iArr[C5688bxl.IeS.CONSENT.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } c = iArr; } } }