package com.scb.phone.view.fragment.bankingagent; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; import androidx.fragment.app.Fragment; import com.scb.phone.R; import com.scb.phone.view.custom.common.CustomDialog; import com.scb.phone.view.fragment.TermsAndConditionsFragment; import com.scb.phone.view.fragment.bankingagent.BankingAgentTCFragment; import o.AbstractC13482fbE; import o.C0371Fd; import o.C14957gcv; import o.C15614hD; import o.C2602ahh; import o.CQ; import o.InterfaceC12853fJD; import o.InterfaceC13391fZD; import o.InterfaceC6624cYb; import o.InterfaceC9889dsR; import o.QPw; import o.ZI; import o.qeC; import o.utw; /* loaded from: classes5.dex */ public final class BankingAgentTCFragment extends Hilt_BankingAgentTCFragment implements InterfaceC6624cYb.IeS, InterfaceC12853fJD { public static final IeS c = new IeS(0); private QPw d; private InterfaceC9889dsR j; @InterfaceC13391fZD public C2602ahh presenter; @Override // o.InterfaceC9652dno public final void A() { } @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(); C14957gcv.c(a, ""); a.b(R.id.frame_layout_terms_and_conditions, c2, null, 2); a.b(); } /* loaded from: classes5.dex */ public static final class IeS { private IeS() { } public /* synthetic */ IeS(byte b) { this(); } } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { C14957gcv.e(view, ""); super.onViewCreated(view, bundle); C2602ahh c2602ahh = this.presenter; if (c2602ahh == null) { C14957gcv.a(""); c2602ahh = null; } c2602ahh.e((C2602ahh) this); final C0371Fd d = CQ.d(c2602ahh.a, null, c2602ahh.d, null, null, true, false, false, null, null, null, 0, 1992); ZI.IeS ieS = new ZI.IeS(d) { // from class: o.ahe private C0371Fd c; @Override // o.ZI.IeS public final void e(Object obj) { C2602ahh.e(this.c, (InterfaceC6624cYb.IeS) obj); } { this.c = d; } }; if (c2602ahh.f != 0) { ieS.e(c2602ahh.f); } } @Override // com.scb.phone.view.fragment.bankingagent.Hilt_BankingAgentTCFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public final void onAttach(Context context) { C14957gcv.e(context, ""); super.onAttach(context); Fragment parentFragment = getParentFragment(); boolean z = context instanceof InterfaceC9889dsR; Object obj = context; if (!z) { obj = parentFragment instanceof InterfaceC9889dsR ? parentFragment : null; } this.j = (InterfaceC9889dsR) obj; } @Override // androidx.fragment.app.Fragment public final void onDetach() { this.j = null; super.onDetach(); } @Override // o.InterfaceC6624cYb.IeS public final void c() { InterfaceC9889dsR interfaceC9889dsR = this.j; if (interfaceC9889dsR != null) { interfaceC9889dsR.f(); } } @Override // o.InterfaceC6624cYb.IeS public final void e() { InterfaceC9889dsR interfaceC9889dsR = this.j; if (interfaceC9889dsR != null) { interfaceC9889dsR.j(); } } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroyView() { C2602ahh c2602ahh = this.presenter; if (c2602ahh == null) { C14957gcv.a(""); c2602ahh = null; } c2602ahh.w_(); this.d = null; super.onDestroyView(); } @Override // o.InterfaceC12853fJD public final void d(String str) { CustomDialog.b(getActivity()).c(R.string.banking_agent_tc_dialog_title).d(R.string.banking_agent_tc_dialog_body).aoO_(getString(R.string.banking_agent_tc_dialog_neg), new DialogInterface.OnClickListener() { // from class: o.eHk @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }).aoU_(getString(R.string.banking_agent_tc_dialog_pos), new DialogInterface.OnClickListener(this) { // from class: o.eHm private BankingAgentTCFragment b; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { BankingAgentTCFragment.e(this.b); } { this.b = this; } }).show(); } @Override // o.InterfaceC12853fJD public final void e(String str) { ((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getActivity()).c(R.string.banking_agent_tc_decline_dialog_title).d(R.string.banking_agent_tc_decline_dialog_body).aoT_(R.string.banking_agent_tc_decline_dialog_pos, new DialogInterface.OnClickListener(this) { // from class: o.eHi private BankingAgentTCFragment d; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { BankingAgentTCFragment.d(this.d); } { this.d = this; } }), Integer.valueOf(R.string.banking_agent_tc_decline_dialog_neg), new DialogInterface.OnClickListener() { // from class: o.eHg @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 e(BankingAgentTCFragment bankingAgentTCFragment) { C14957gcv.e(bankingAgentTCFragment, ""); C2602ahh c2602ahh = bankingAgentTCFragment.presenter; if (c2602ahh == null) { C14957gcv.a(""); c2602ahh = null; } ZI.IeS ieS = new ZI.IeS() { // from class: o.ahd @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6624cYb.IeS) obj).y(); } }; if (c2602ahh.f != 0) { ieS.e(c2602ahh.f); } C15614hD c15614hD = c2602ahh.b; C2602ahh.HBt hBt = new C2602ahh.HBt(c2602ahh); C2602ahh.LWm lWm = new C2602ahh.LWm(c2602ahh); int i = c2602ahh.c; C14957gcv.e(hBt, ""); C14957gcv.e(lWm, ""); c15614hD.c.e(new C15614hD.HBt(hBt), lWm, new utw.HBt(0), c15614hD.a); } public static /* synthetic */ void d(BankingAgentTCFragment bankingAgentTCFragment) { C14957gcv.e(bankingAgentTCFragment, ""); C2602ahh c2602ahh = bankingAgentTCFragment.presenter; if (c2602ahh == null) { C14957gcv.a(""); c2602ahh = null; } ZI.IeS ieS = new ZI.IeS() { // from class: o.ahg @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6624cYb.IeS) obj).c(); } }; if (c2602ahh.f != 0) { ieS.e(c2602ahh.f); } } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); View inflate = layoutInflater.inflate(R.layout.2131559458, viewGroup, false); FrameLayout frameLayout = (FrameLayout) qeC.e(inflate, R.id.frame_layout_terms_and_conditions); if (frameLayout != null) { QPw qPw = new QPw((LinearLayout) inflate, frameLayout); this.d = qPw; C14957gcv.e(qPw); LinearLayout linearLayout = qPw.e; C14957gcv.c(linearLayout, ""); return linearLayout; } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(R.id.frame_layout_terms_and_conditions))); } }