package com.scb.phone.view.fragment.registration.onboarding; 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.Button; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.scb.phone.R; import com.scb.phone.view.activity.BaseActivity; import com.scb.phone.view.custom.common.CustomDialog; import com.scb.phone.view.fragment.registration.onboarding.RegistrationPushNotificationFragment; import o.C14615fwZ; import o.C16565pPd; import o.InterfaceC13391fZD; import o.InterfaceC9605dmr; import o.cAL; import o.fJA; import o.guQ; /* loaded from: classes5.dex */ public class RegistrationPushNotificationFragment extends Hilt_RegistrationPushNotificationFragment implements InterfaceC9605dmr { @BindView Button btnCancel; @BindView Button btnOk; public fJA c; private C16565pPd d = new C16565pPd(); @InterfaceC13391fZD public cAL registrationPushNotificationPresenter; public static RegistrationPushNotificationFragment j() { return new RegistrationPushNotificationFragment(); } /* JADX INFO: Access modifiers changed from: package-private */ @OnClick public void onNotNow() { this.registrationPushNotificationPresenter.d(); } /* JADX WARN: Multi-variable type inference failed */ @Override // com.scb.phone.view.fragment.registration.onboarding.Hilt_RegistrationPushNotificationFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public void onAttach(Context context) { super.onAttach(context); if (context instanceof fJA) { this.c = (fJA) context; } } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559864, viewGroup, false); ButterKnife.c(this, inflate); this.registrationPushNotificationPresenter.e((cAL) this); C16565pPd c16565pPd = this.d; if (getActivity() != null) { c16565pPd.c(((BaseActivity) getActivity()).scbAnalytics, "registration_allow_notification"); } return inflate; } @Override // androidx.fragment.app.Fragment public void onResume() { super.onResume(); this.registrationPushNotificationPresenter.j(); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroy() { this.registrationPushNotificationPresenter.w_(); super.onDestroy(); } @Override // androidx.fragment.app.Fragment public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) { super.onRequestPermissionsResult(i, strArr, iArr); C14615fwZ.d(this, i, iArr); } @Override // o.InterfaceC9605dmr public final void a() { C14615fwZ.e(this); } @Override // o.InterfaceC9605dmr public final void e(boolean z, boolean z2) { this.btnCancel.setEnabled(z); this.btnOk.setEnabled(z2); } public static void i() { guQ.b("onNeverAskAgain", new Object[0]); } @Override // o.InterfaceC9605dmr public final void e() { fJA fja = this.c; if (fja != null) { fja.e("RegistrationPushNotificationFragment"); } } @Override // o.InterfaceC9605dmr public final void d() { ((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.onboarding_registration_title_push_permission).d(R.string.onboarding_registration_sub_title_push_permission).aoT_(R.string.onboarding_registration_allow_permission, new DialogInterface.OnClickListener(this) { // from class: o.fwV private RegistrationPushNotificationFragment b; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { RegistrationPushNotificationFragment.a(this.b); } { this.b = this; } }), Integer.valueOf(R.string.onboarding_registration_dont_allow_permission), new DialogInterface.OnClickListener(this) { // from class: o.fwX private RegistrationPushNotificationFragment e; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { this.e.registrationPushNotificationPresenter.e(false); } { this.e = this; } }})).show(); } public static /* synthetic */ void a(RegistrationPushNotificationFragment registrationPushNotificationFragment) { C16565pPd c16565pPd = registrationPushNotificationFragment.d; if (registrationPushNotificationFragment.getActivity() != null) { c16565pPd.c(((BaseActivity) registrationPushNotificationFragment.getActivity()).scbAnalytics, "registration_allownotifications"); } registrationPushNotificationFragment.registrationPushNotificationPresenter.c(); } public final void h() { if (getActivity() != null) { if (BaseActivity.P()) { fJA fja = this.c; if (fja != null) { fja.e("RegistrationPushNotificationFragment"); return; } return; } } this.registrationPushNotificationPresenter.a(false); } /* JADX INFO: Access modifiers changed from: package-private */ @OnClick public void onNotify() { if (getActivity() != null) { if (BaseActivity.P()) { C14615fwZ.d(this); return; } } cAL cal = this.registrationPushNotificationPresenter; cAL.a(new Object[]{cal}, -1052252644, 1052252646, System.identityHashCode(cal)); } }