package com.scb.phone.view.fragment.hml; 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.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.huawei.hms.support.feature.result.CommonConstant; import com.scb.phone.R; import com.scb.phone.components.ItemCustom; import com.scb.phone.view.activity.hml.HmlETBLoanSetupActivity; import com.scb.phone.view.fragment.hml.HmlOutcomeApproveFragment; import com.squareup.picasso.Picasso; import java.util.List; import o.C0690Mh; import o.C0693Mj; import o.C14820gN; import o.C14957gcv; import o.C5527buj; import o.EM; import o.InterfaceC13391fZD; import o.InterfaceC9338dhp; import o.NC; import o.NV; import o.pug; /* loaded from: classes5.dex */ public class HmlOutcomeApproveFragment extends Hilt_HmlOutcomeApproveFragment implements InterfaceC9338dhp { @BindView public TextView acceptSubtitle; @BindView TextView amount; @BindView public ImageView amountIcon; @BindView ImageView approveHeader; @BindView LinearLayout container; @BindView TextView dateText; @InterfaceC13391fZD public C14820gN itemFactory; @InterfaceC13391fZD public C5527buj presenter; @BindView TextView repaymentAmount; @OnClick public void onButtonReturnHomeClicked(View view) { this.presenter.a(); } @OnClick public void onButtonDeclineClicked(View view) { this.presenter.d(); } @OnClick public void onButtonAcceptClicked(View view) { c("p10x1_selected_offer_review", new pug("user_type", h()), new pug("button", "accept")); this.presenter.b(); } @OnClick public void onContactCallCenter(View view) { aZ_(); } public static HmlOutcomeApproveFragment e(NC nc) { HmlOutcomeApproveFragment hmlOutcomeApproveFragment = new HmlOutcomeApproveFragment(); Bundle bundle = new Bundle(); bundle.putParcelable("HML_OUTCOME_APPROVE_EXTRA", nc); hmlOutcomeApproveFragment.setArguments(bundle); return hmlOutcomeApproveFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559712, (ViewGroup) null, false); ButterKnife.c(this, inflate); NC nc = getArguments() != null ? (NC) getArguments().getParcelable("HML_OUTCOME_APPROVE_EXTRA") : null; if (nc != null) { this.acceptSubtitle.setText(nc.d); } this.amountIcon.setVisibility(0); this.presenter.e((C5527buj) this); this.presenter.c(nc); return inflate; } @Override // o.InterfaceC9338dhp public final void e(String str, NV nv, List list) { this.dateText.setVisibility(str == null ? 8 : 0); this.dateText.setText(str); for (EM em : list) { ItemCustom e = this.itemFactory.e(getContext(), em); e.setUpWithDisplay(em); this.container.addView(e); } this.amount.setText(nv.b); this.repaymentAmount.setText(nv.d); if (nv.e != null && getContext() != null) { Picasso.d().e(nv.e).b(R.drawable.outcome_placeholder).aBu_(this.approveHeader, null); } if (nv.a == null || getContext() == null) { return; } Picasso.d().e(nv.a).b(R.drawable.outcome_icon_placeholder).aBu_(this.amountIcon, null); } public void c() { HmlETBLoanSetupActivity.IeS ieS = HmlETBLoanSetupActivity.b; Context context = getContext(); C14957gcv.e(context, ""); startActivity(new Intent(context, (Class) HmlETBLoanSetupActivity.class)); } @Override // o.InterfaceC9338dhp public final void e() { C0693Mj c0693Mj = new C0693Mj(); c0693Mj.d = getString(R.string.hml_outcome_decline_dialog_title); c0693Mj.c = getString(R.string.hml_outcome_decline_dialog_message); C0690Mh c0690Mh = new C0690Mh(); Runnable runnable = new Runnable(this) { // from class: o.fdo private HmlOutcomeApproveFragment c; @Override // java.lang.Runnable public final void run() { HmlOutcomeApproveFragment.a(this.c); } { this.c = this; } }; c0690Mh.e = C0690Mh.IeS.CUSTOM; c0690Mh.d = runnable; c0690Mh.b = getString(R.string.hml_outcome_decline_dialog_confirm); c0693Mj.e = c0690Mh; C0690Mh c0690Mh2 = new C0690Mh(); c0690Mh2.e = C0690Mh.IeS.JUST_DISMISS; c0690Mh2.b = getString(R.string.hml_outcome_decline_dialog_cancel); c0693Mj.b = c0690Mh2; e(c0693Mj); } @Override // o.InterfaceC9338dhp public final void a(String str, String str2) { c("p10x1_selected_offer_review", new pug("user_type", h()), new pug("button", "accept"), new pug(CommonConstant.KEY_STATUS, "approved_loan"), new pug("offer_type", str2), new pug("loan_type", str)); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroy() { this.presenter.w_(); super.onDestroy(); } public static /* synthetic */ void a(HmlOutcomeApproveFragment hmlOutcomeApproveFragment) { hmlOutcomeApproveFragment.c("p10x1_selected_offer_review", new pug("user_type", hmlOutcomeApproveFragment.h()), new pug("button", "deny")); hmlOutcomeApproveFragment.presenter.c(); } }