package com.scb.phone.view.fragment.chubb.review; 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 androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.scb.phone.R; import com.scb.phone.view.activity.chubb.ChubbPaySuccessActivity; import java.util.List; import o.C0506Ie; import o.C1189Xo; import o.C1192Xq; import o.C12744fG; import o.C14957gcv; import o.C3499ayh; import o.E; import o.InterfaceC13391fZD; import o.InterfaceC14894gbR; import o.InterfaceC9123ddl; import o.Vsn; import o.XL; import o.YY; import o.ZI; import o.fHN; import o.pug; /* loaded from: classes5.dex */ public class ChubbReviewFragment extends Hilt_ChubbReviewFragment implements InterfaceC9123ddl, fHN { @InterfaceC13391fZD public C3499ayh chubbReviewPresenter; private View d; @BindView RecyclerView recyclerView; @BindView View unexpectedDivider; @BindView View viewBottomDivider; public static ChubbReviewFragment a(C1192Xq c1192Xq, YY yy) { ChubbReviewFragment chubbReviewFragment = new ChubbReviewFragment(); Bundle bundle = new Bundle(); bundle.putParcelable("KEY_GET_BILL_PAYMENT_PARTNER", c1192Xq); bundle.putSerializable("com.scb.phone.EXTRA_PAYMENT_FLOW_TYPE", yy); chubbReviewFragment.setArguments(bundle); return chubbReviewFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559505, viewGroup, false); this.d = inflate; ButterKnife.c(this, inflate); final C1192Xq c1192Xq = (C1192Xq) getArguments().getParcelable("KEY_GET_BILL_PAYMENT_PARTNER"); this.chubbReviewPresenter.e((C3499ayh) this); this.chubbReviewPresenter.a = d(); C3499ayh c3499ayh = this.chubbReviewPresenter; Intent intent = requireActivity().getIntent(); final String stringExtra = intent != null ? intent.getStringExtra("EXTRA_BILL_PAYMENT_PARTNER_SUBTYPE") : null; c3499ayh.d = c1192Xq; if (stringExtra == null) { stringExtra = "chubb_travel_tile"; } final String str = YY.INSURANCE_PORT == c3499ayh.a ? "" : "partner_api"; ZI.IeS ieS = new ZI.IeS(c1192Xq, stringExtra, str) { // from class: o.ayp private String c; private C1192Xq d; private String e; @Override // o.ZI.IeS public final void e(Object obj) { C3499ayh.d(this.d, this.c, this.e, (InterfaceC9123ddl) obj); } { this.d = c1192Xq; this.c = stringExtra; this.e = str; } }; if (c3499ayh.f != 0) { ieS.e(c3499ayh.f); } this.unexpectedDivider.setVisibility(8); return this.d; } private YY d() { YY yy = YY.NORMAL; return (getArguments() == null || getArguments().getSerializable("com.scb.phone.EXTRA_PAYMENT_FLOW_TYPE") == null) ? yy : (YY) getArguments().getSerializable("com.scb.phone.EXTRA_PAYMENT_FLOW_TYPE"); } @Override // o.InterfaceC9123ddl public final void c(C1192Xq c1192Xq) { a(c1192Xq.i, this.d, getContext()); } @Override // o.InterfaceC9123ddl public final void c(C0506Ie c0506Ie) { Context context = getContext(); Intent intent = requireActivity().getIntent(); startActivity(ChubbPaySuccessActivity.aaw_(context, c0506Ie, intent != null ? intent.getStringExtra("EXTRA_BILL_PAYMENT_PARTNER_SUBTYPE") : null, d())); } @Override // o.InterfaceC9123ddl public final void e(List list) { e(getContext(), this.recyclerView, list, this, false); } @Override // o.InterfaceC9123ddl public final void c() { this.viewBottomDivider.setVisibility(8); } @Override // o.InterfaceC9123ddl public final void b(String str, String str2) { c("billpay_review", new pug("source", str2), new pug("subtype", str)); } @OnClick public void onClickConfirm() { final C3499ayh c3499ayh = this.chubbReviewPresenter; C1189Xo c1189Xo = null; if (c3499ayh.a == YY.INSURANCE_PORT) { if (c3499ayh.f != 0) { c3499ayh.f.y(); } String str = c3499ayh.d.a; String str2 = c3499ayh.d.e; String str3 = c3499ayh.d.f; C1189Xo c1189Xo2 = c3499ayh.d.i; if (c1189Xo2 != null) { c1189Xo = c1189Xo2; } else { C14957gcv.a(""); } String a = c1189Xo.a(); if (str == null) { str = ""; } if (str2 == null) { str2 = ""; } c3499ayh.c.b(new E(a, str, str2, str3 != null ? str3 : ""), new InterfaceC14894gbR(c3499ayh) { // from class: o.ayl private C3499ayh d; @Override // o.InterfaceC14894gbR public final Object invoke(Object obj) { return C3499ayh.a(this.d, (C5465btZ) obj); } { this.d = c3499ayh; } }, new InterfaceC14894gbR(c3499ayh) { // from class: o.aym private C3499ayh e; @Override // o.InterfaceC14894gbR public final Object invoke(Object obj) { return C3499ayh.c(this.e, (Throwable) obj); } { this.e = c3499ayh; } }); return; } if (c3499ayh.f != 0) { c3499ayh.f.y(); } C12744fG d = C12744fG.d(); C1189Xo c1189Xo3 = c3499ayh.d.i; if (c1189Xo3 != null) { c1189Xo = c1189Xo3; } else { C14957gcv.a(""); } d.l = c1189Xo.a(); c3499ayh.e.b(d); Vsn vsn = c3499ayh.e; vsn.d(vsn.i, new C3499ayh.RVV(c3499ayh, (byte) 0)); } }