package com.scb.phone.view.fragment.directdebit; 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.fragment.app.FragmentActivity; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.activity.BaseActivity; import com.scb.phone.view.activity.directdebit.DirectDebitInputActivity; import com.scb.phone.view.custom.common.CustomDialog; import com.scb.phone.view.fragment.BaseFragment; import com.scb.phone.view.fragment.TermsAndConditionsFragment; import com.scb.phone.view.fragment.directdebit.DirectDebitTermsAndConditionsFragment; import o.AbstractC13482fbE; import o.C0371Fd; import o.C14957gcv; import o.CQ; import o.InterfaceC12853fJD; import o.InterfaceC13391fZD; import o.InterfaceC9653dnp; import o.ZI; import o.cKT; import o.hSd; /* loaded from: classes5.dex */ public final class DirectDebitTermsAndConditionsFragment extends Hilt_DirectDebitTermsAndConditionsFragment implements InterfaceC9653dnp.RVV, InterfaceC12853fJD { public static final RVV c = new RVV(0); private hSd d; @InterfaceC13391fZD public cKT presenter; @Override // o.InterfaceC9652dno public final void A() { } /* loaded from: classes5.dex */ public static final class RVV { private RVV() { } public /* synthetic */ RVV(byte b) { this(); } } @Override // o.InterfaceC9652dno public final void a(C0371Fd c0371Fd) { C14957gcv.e(c0371Fd, ""); TermsAndConditionsFragment.HBt hBt = TermsAndConditionsFragment.c; TermsAndConditionsFragment c2 = TermsAndConditionsFragment.HBt.c(c0371Fd); AbstractC13482fbE a = getChildFragmentManager().a(); a.b(R.id.frame_layout_terms_and_conditions, c2, null, 2); a.b(); } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); this.d = new hSd(); cKT ckt = this.presenter; cKT ckt2 = null; if (ckt == null) { C14957gcv.a(""); ckt = null; } ckt.e((cKT) this); cKT ckt3 = this.presenter; if (ckt3 != null) { ckt2 = ckt3; } else { C14957gcv.a(""); } final C0371Fd d = CQ.d(ckt2.e, null, "directdebit_applydirectdebit", null, null, true, false, false, null, null, null, 0, 1992); d.d = true; ZI.IeS ieS = new ZI.IeS(d) { // from class: o.cKX private C0371Fd c; @Override // o.ZI.IeS public final void e(Object obj) { cKT.d(this.c, (InterfaceC9653dnp.RVV) obj); } { this.c = d; } }; if (ckt2.f != 0) { ieS.e(ckt2.f); } View inflate = layoutInflater.inflate(R.layout.2131559514, viewGroup, false); ((BaseFragment) this).a = ButterKnife.c(this, inflate); return inflate; } @Override // o.InterfaceC9653dnp.RVV public final void c() { FragmentActivity activity = getActivity(); if (activity != null && activity.isTaskRoot()) { k(false); return; } FragmentActivity activity2 = getActivity(); if (activity2 != null) { activity2.finish(); } } @Override // o.InterfaceC9653dnp.RVV public final void a() { Context requireContext = requireContext(); DirectDebitInputActivity.Sts sts = DirectDebitInputActivity.b; Context requireContext2 = requireContext(); C14957gcv.c(requireContext2, ""); C14957gcv.e(requireContext2, ""); C14957gcv.e("tile", ""); Intent putExtra = new Intent(requireContext2, (Class) DirectDebitInputActivity.class).putExtra("source", "tile"); C14957gcv.c(putExtra, ""); requireContext.startActivity(putExtra); FragmentActivity activity = getActivity(); if (activity != null) { activity.finish(); } } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroyView() { cKT ckt = this.presenter; if (ckt == null) { C14957gcv.a(""); ckt = null; } ckt.w_(); super.onDestroyView(); } @Override // o.InterfaceC12853fJD public final void d(String str) { CustomDialog.b(getActivity()).c(R.string.auto_direct_debit_accept_terms_and_conditions).d(R.string.auto_direct_debit_accept_terms_and_conditions_description).aoU_(getString(R.string.tc_agree_dialog_positive_accept_button), new DialogInterface.OnClickListener(this) { // from class: o.eSj private DirectDebitTermsAndConditionsFragment b; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { DirectDebitTermsAndConditionsFragment.arY_(this.b, dialogInterface); } { this.b = this; } }).aoO_(getString(R.string.tc_agree_dialog_negative_button), new DialogInterface.OnClickListener() { // from class: o.eSn @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }).show(); } @Override // o.InterfaceC12853fJD public final void e(String str) { ((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getActivity()).c(R.string.auto_direct_debit_decline_terms_and_conditions).d(R.string.auto_direct_debit_decline_terms_and_conditions_description).aoT_(R.string.tc_investment_decline_dialog_positive_button, new DialogInterface.OnClickListener(this) { // from class: o.eSp private DirectDebitTermsAndConditionsFragment d; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { DirectDebitTermsAndConditionsFragment.arX_(this.d, dialogInterface); } { this.d = this; } }), Integer.valueOf(R.string.tc_investment_decline_dialog_negative_button), new DialogInterface.OnClickListener() { // from class: o.eSq @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }})).show(); } @Override // o.InterfaceC12828fIc public final void h() { requireActivity().finish(); } public static /* synthetic */ void arX_(DirectDebitTermsAndConditionsFragment directDebitTermsAndConditionsFragment, DialogInterface dialogInterface) { C14957gcv.e(directDebitTermsAndConditionsFragment, ""); cKT ckt = directDebitTermsAndConditionsFragment.presenter; if (ckt == null) { C14957gcv.a(""); ckt = null; } ZI.IeS ieS = new ZI.IeS() { // from class: o.cKV @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9653dnp.RVV) obj).c(); } }; if (ckt.f != 0) { ieS.e(ckt.f); } dialogInterface.dismiss(); } public static /* synthetic */ void arY_(DirectDebitTermsAndConditionsFragment directDebitTermsAndConditionsFragment, DialogInterface dialogInterface) { C14957gcv.e(directDebitTermsAndConditionsFragment, ""); hSd hsd = directDebitTermsAndConditionsFragment.d; cKT ckt = null; if (hsd == null) { C14957gcv.a(""); hsd = null; } hSd hsd2 = hsd; if (directDebitTermsAndConditionsFragment.getActivity() != null) { hsd2.c(((BaseActivity) directDebitTermsAndConditionsFragment.getActivity()).scbAnalytics, "direct_debit_tc"); } cKT ckt2 = directDebitTermsAndConditionsFragment.presenter; if (ckt2 != null) { ckt = ckt2; } else { C14957gcv.a(""); } ZI.IeS ieS = new ZI.IeS() { // from class: o.cKY @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9653dnp.RVV) obj).a(); } }; if (ckt.f != 0) { ieS.e(ckt.f); } dialogInterface.dismiss(); } }