package com.scb.phone.view.fragment.insurance; 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 androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.activity.insurance.RequestEPolicyReviewActivity; import com.scb.phone.view.adapter.insurance.PolicyServiceAdapter; import com.scb.phone.view.custom.common.CustomDialog; import com.scb.phone.view.fragment.BaseFragment; import java.util.ArrayList; import java.util.List; import o.C0804Oy; import o.C14957gcv; import o.C5710byG; import o.InterfaceC12242euX; import o.InterfaceC13391fZD; import o.InterfaceC9377dib; import o.OA; import o.ZI; /* loaded from: classes5.dex */ public final class PolicyServiceFragment extends Hilt_PolicyServiceFragment implements InterfaceC12242euX, InterfaceC9377dib.RVV { public static final LWm d = new LWm(0); @InterfaceC13391fZD public C5710byG presenter; @BindView public RecyclerView rvPolicyService; @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); View inflate = layoutInflater.inflate(R.layout.2131559730, viewGroup, false); ((BaseFragment) this).a = ButterKnife.c(this, inflate); C5710byG c5710byG = this.presenter; if (c5710byG == null) { C14957gcv.a(""); c5710byG = null; } c5710byG.e((C5710byG) this); return inflate; } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { C0804Oy c0804Oy; C14957gcv.e(view, ""); super.onViewCreated(view, bundle); Bundle arguments = getArguments(); if (arguments == null || (c0804Oy = (C0804Oy) arguments.getParcelable("EXTRA_POLICY_INFO_DISPLAY")) == null) { return; } C5710byG c5710byG = this.presenter; if (c5710byG == null) { C14957gcv.a(""); c5710byG = null; } C14957gcv.c(c0804Oy, ""); C14957gcv.e(c0804Oy, ""); c5710byG.c = c0804Oy; final List list = c0804Oy.i; ZI.IeS ieS = new ZI.IeS(list) { // from class: o.byK private List c; @Override // o.ZI.IeS public final void e(Object obj) { C5710byG.d(this.c, (InterfaceC9377dib.RVV) obj); } { this.c = list; } }; if (c5710byG.f != 0) { ieS.e(c5710byG.f); } } @Override // o.InterfaceC12242euX public final void b(OA oa) { C14957gcv.e(oa, ""); final C5710byG c5710byG = this.presenter; if (c5710byG == null) { C14957gcv.a(""); c5710byG = null; } C14957gcv.e(oa, ""); if (C5710byG.IeS.d[oa.c.ordinal()] == 1) { String u = c5710byG.d.c.b.u(); final String str = u != null ? u : ""; final boolean d2 = c5710byG.d.e.d(); if (str.length() > 0 && d2) { ZI.IeS ieS = new ZI.IeS(c5710byG, str, d2) { // from class: o.byN private boolean c; private String d; private C5710byG e; @Override // o.ZI.IeS public final void e(Object obj) { C5710byG.e(this.e, this.d, this.c, (InterfaceC9377dib.RVV) obj); } { this.e = c5710byG; this.d = str; this.c = d2; } }; if (c5710byG.f != 0) { ieS.e(c5710byG.f); return; } return; } ZI.IeS ieS2 = new ZI.IeS() { // from class: o.byM @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9377dib.RVV) obj).b(); } }; if (c5710byG.f != 0) { ieS2.e(c5710byG.f); } } } @Override // o.InterfaceC9377dib.RVV public final void a(List list) { C14957gcv.e(list, ""); RecyclerView recyclerView = this.rvPolicyService; if (recyclerView == null) { C14957gcv.a(""); recyclerView = null; } recyclerView.getContext(); recyclerView.setLayoutManager(new LinearLayoutManager(1, false)); recyclerView.setAdapter(new PolicyServiceAdapter(new ArrayList(list), this)); } @Override // o.InterfaceC9377dib.RVV public final void b(C0804Oy c0804Oy, String str, boolean z) { C14957gcv.e(c0804Oy, ""); C14957gcv.e(str, ""); RequestEPolicyReviewActivity.HBt hBt = RequestEPolicyReviewActivity.f7425o; Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); C14957gcv.e(requireContext, ""); C14957gcv.e(c0804Oy, ""); C14957gcv.e(str, ""); Intent intent = new Intent(requireContext, (Class) RequestEPolicyReviewActivity.class); intent.putExtra("EXTRA_POLICY_INFO_DISPLAY", c0804Oy); intent.putExtra("EXTRA_EMAIL", str); intent.putExtra("EXTRA_HAS_EMAIL_VERIFIED", z); startActivity(intent); } @Override // o.InterfaceC9377dib.RVV public final void b() { CustomDialog.b(requireContext()).c(R.string.auto_insurance_verify_email_pop_up_title).d(R.string.auto_insurance_verify_email_pop_up_description).aoT_(R.string.ok, new DialogInterface.OnClickListener() { // from class: o.ffo @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }).show(); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroy() { C5710byG c5710byG = this.presenter; if (c5710byG == null) { C14957gcv.a(""); c5710byG = null; } c5710byG.w_(); super.onDestroy(); } /* loaded from: classes5.dex */ public static final class LWm { private LWm() { } public /* synthetic */ LWm(byte b) { this(); } } }