package com.scb.phone.view.fragment.hml; import android.content.DialogInterface; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; 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.HmlSelectedOfferReviewActivity; import com.scb.phone.view.adapter.hml.HmlOutcomeCounterAdapter; import com.scb.phone.view.custom.common.CustomDialog; import com.scb.phone.view.fragment.hml.HmlOutcomeCounterOfferFragment; import com.squareup.picasso.Picasso; import o.C0690Mh; import o.C0693Mj; import o.C5536bus; import o.InterfaceC13391fZD; import o.InterfaceC9340dhr; import o.ND; import o.NU; import o.fIU; import o.gjJ; import o.pug; /* loaded from: classes5.dex */ public class HmlOutcomeCounterOfferFragment extends Hilt_HmlOutcomeCounterOfferFragment implements InterfaceC9340dhr { @BindView public TextView dateText; @BindView public ImageView headerBackground; @BindView public TextView hourRemarkText; @InterfaceC13391fZD public C5536bus presenter; @BindView public RecyclerView recyclerView; private fIU d = new fIU(this) { // from class: o.fdt private HmlOutcomeCounterOfferFragment d; @Override // o.fIU public final void b(int i) { this.d.presenter.b(i); } { this.d = this; } }; private HBt c = new HBt(this) { // from class: o.fdp private HmlOutcomeCounterOfferFragment a; @Override // com.scb.phone.view.fragment.hml.HmlOutcomeCounterOfferFragment.HBt public final void c(double d) { this.a.presenter.c(d); } { this.a = this; } }; /* loaded from: classes5.dex */ public interface HBt { void c(double d); } @OnClick public void onButtonReturnHomeClicked(View view) { this.presenter.a(); } @OnClick public void onButtonDeclineAllClicked(View view) { this.presenter.d(); } @OnClick public void onContactCallCenter(View view) { this.presenter.b(); } public static HmlOutcomeCounterOfferFragment d(ND nd) { return b(nd, false); } public static HmlOutcomeCounterOfferFragment b(ND nd, boolean z) { HmlOutcomeCounterOfferFragment hmlOutcomeCounterOfferFragment = new HmlOutcomeCounterOfferFragment(); Bundle bundle = new Bundle(); bundle.putParcelable("HML_OUTCOME_COUNTER_EXTRA", nd); bundle.putBoolean("HML_OUTCOME_IS_UPSELL_EXTRA", z); hmlOutcomeCounterOfferFragment.setArguments(bundle); return hmlOutcomeCounterOfferFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559713, (ViewGroup) null, false); ButterKnife.c(this, inflate); RecyclerView recyclerView = this.recyclerView; getContext(); recyclerView.setLayoutManager(new LinearLayoutManager(1, false)); this.recyclerView.setNestedScrollingEnabled(false); ND nd = getArguments() != null ? (ND) getArguments().getParcelable("HML_OUTCOME_COUNTER_EXTRA") : null; this.presenter.e((C5536bus) this); this.presenter.a(nd); this.presenter.j(); return inflate; } @Override // o.InterfaceC9340dhr public final void b(ND nd) { this.recyclerView.setAdapter(new HmlOutcomeCounterAdapter(nd.d, this.d, this.c)); this.dateText.setText(nd.e); this.dateText.setVisibility(nd.e == null ? 8 : 0); this.hourRemarkText.setText(nd.c); if (TextUtils.isEmpty(nd.b) || getContext() == null) { return; } Picasso.d().e(nd.b).b(R.drawable.outcome_placeholder).aBu_(this.headerBackground, null); } @Override // o.InterfaceC9340dhr public final void d() { 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.fds private HmlOutcomeCounterOfferFragment c; @Override // java.lang.Runnable public final void run() { HmlOutcomeCounterOfferFragment.d(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.InterfaceC9340dhr public final void b() { if (getActivity() != null) { getActivity().recreate(); } } @Override // o.InterfaceC9340dhr public final void d(final String str) { CustomDialog b = CustomDialog.b(getContext()); String string = getString(R.string.auto_app_outcome_upselling_pop_up_warning_header); if (gjJ.a(string)) { b.mTitleTextView.setVisibility(0); b.mTitleTextView.setText(string); } String string2 = getString(R.string.auto_app_outcome_upselling_pop_up_warning_desc, str); if (gjJ.a(string2)) { b.mTextTextView.setVisibility(0); b.mTextTextView.setText(string2); } b.aoU_(getString(R.string.auto_app_outcome_upselling_pop_up_warning_confirm), new DialogInterface.OnClickListener(this, str) { // from class: o.fdw private HmlOutcomeCounterOfferFragment c; private String e; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { this.c.presenter.a(this.e); } { this.c = this; this.e = str; } }).aoO_(getString(R.string.auto_app_outcome_upselling_pop_up_warning_cancel), new DialogInterface.OnClickListener() { // from class: o.fdx @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }).show(); } @Override // o.InterfaceC9340dhr public final void e(String str) { c("p10x1_application_outcome", new pug("user_type", h()), new pug("loan_type", str), new pug("request_action", "adjusted_amount")); } public void a(NU nu) { HmlSelectedOfferReviewActivity.b(new Object[]{getContext(), nu}, 1936903110, -1936903110, (int) System.currentTimeMillis()); } @Override // o.InterfaceC9340dhr public final void c(boolean z) { pug[] pugVarArr = new pug[2]; pugVarArr[0] = new pug("user_type", h()); pugVarArr[1] = new pug("loan_type", z ? "business_owner" : "consumer"); c("p10x1_selected_offer_review", pugVarArr); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroy() { this.presenter.w_(); super.onDestroy(); } public static /* synthetic */ void d(HmlOutcomeCounterOfferFragment hmlOutcomeCounterOfferFragment) { hmlOutcomeCounterOfferFragment.c("p10x1_selected_offer_review", new pug("user_type", hmlOutcomeCounterOfferFragment.h()), new pug("button", "deny")); hmlOutcomeCounterOfferFragment.presenter.c(); } }