what-the-bank/sources/com/scb/phone/view/fragment/ndidcommon/NdidCommonTermAndConditionF...

218 lines
7.0 KiB
Java

package com.scb.phone.view.fragment.ndidcommon;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.TermsAndConditionsFragment;
import com.scb.phone.view.fragment.ndidcommon.NdidCommonSelectIdpFragment;
import o.C0371Fd;
import o.C0690Mh;
import o.C0979Sw;
import o.C14957gcv;
import o.C15715hv;
import o.C16903sI;
import o.C6758cbU;
import o.CQ;
import o.InterfaceC12853fJD;
import o.InterfaceC13391fZD;
import o.InterfaceC9500dks;
import o.SA;
import o.SB;
import o.ZI;
import o.fKI;
import o.guQ;
import o.pug;
/* loaded from: classes5.dex */
public final class NdidCommonTermAndConditionFragment extends Hilt_NdidCommonTermAndConditionFragment implements InterfaceC12853fJD, InterfaceC9500dks.LWm {
public static final IeS c = new IeS(0);
private NdidCommonSelectIdpFragment.Sts d;
@InterfaceC13391fZD
public C6758cbU presenter;
@Override // o.InterfaceC9652dno
public final void A() {
}
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.ndidcommon.Hilt_NdidCommonTermAndConditionFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public final void onAttach(Context context) {
C14957gcv.e(context, "");
super.onAttach(context);
if (context instanceof NdidCommonSelectIdpFragment.Sts) {
this.d = (NdidCommonSelectIdpFragment.Sts) context;
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
C6758cbU c6758cbU = this.presenter;
if (c6758cbU == null) {
C14957gcv.a("");
c6758cbU = null;
}
c6758cbU.e((C6758cbU) this);
View inflate = layoutInflater.inflate(R.layout.2131559514, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
v("ndid_common_tandc_load");
Bundle arguments = getArguments();
C6758cbU c6758cbU = null;
SA sa = arguments != null ? (SA) arguments.getParcelable("EXTRA_NDID_DATA") : null;
Bundle arguments2 = getArguments();
SB sb = arguments2 != null ? (SB) arguments2.getParcelable("BUNDLE_COMMON_IPD") : null;
v("ndid_common_tandc_load");
C6758cbU c6758cbU2 = this.presenter;
if (c6758cbU2 != null) {
c6758cbU = c6758cbU2;
} else {
C14957gcv.a("");
}
String W = W();
C14957gcv.c((Object) W, "");
C14957gcv.e(W, "");
C14957gcv.e(W, "");
final C0371Fd d = CQ.d(c6758cbU.c, C14957gcv.b((Object) "th", (Object) W) ? "https://info.scb.co.th/scbeasy/NDID/NDID_TC_thai.html" : "https://info.scb.co.th/scbeasy/NDID/NDID_TC_eng.html", null, null, null, true, false, true, null, null, null, 0, 1928);
c6758cbU.b = sb;
c6758cbU.e = sa;
ZI.IeS ieS = new ZI.IeS(d) { // from class: o.ccc
private C0371Fd e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6758cbU.e(this.e, (InterfaceC9500dks.LWm) obj);
}
{
this.e = d;
}
};
if (c6758cbU.f != 0) {
ieS.e(c6758cbU.f);
}
}
@Override // o.InterfaceC9652dno
public final void a(C0371Fd c0371Fd) {
C14957gcv.e(c0371Fd, "");
TermsAndConditionsFragment.HBt hBt = TermsAndConditionsFragment.c;
fKI.e(this, TermsAndConditionsFragment.HBt.c(c0371Fd), R.id.frame_layout_terms_and_conditions);
}
@Override // o.InterfaceC12853fJD
public final void d(String str) {
c("ndid_common_tandc_accept", new pug("key", "accept"));
C6758cbU c6758cbU = this.presenter;
if (c6758cbU == null) {
C14957gcv.a("");
c6758cbU = null;
}
c6758cbU.b();
}
@Override // o.InterfaceC12853fJD
public final void e(String str) {
c("ndid_common_tandc_accept", new pug("key", "decline"));
final C6758cbU c6758cbU = this.presenter;
if (c6758cbU == null) {
C14957gcv.a("");
c6758cbU = null;
}
c6758cbU.d(c6758cbU.j.b(c6758cbU.d.getString(C15715hv.tOB.ndid_level_up_term_and_condition_title), c6758cbU.d.getString(C15715hv.tOB.ndid_level_up_term_and_condition_description), C15715hv.tOB.ndid_level_up_term_and_condition_accept, C15715hv.tOB.ndid_level_up_term_and_condition_decline, new Runnable(c6758cbU) { // from class: o.cce
private C6758cbU b;
@Override // java.lang.Runnable
public final void run() {
C6758cbU.d(this.b);
}
{
this.b = c6758cbU;
}
}, new Runnable(c6758cbU) { // from class: o.ccd
private C6758cbU a;
@Override // java.lang.Runnable
public final void run() {
C6758cbU.a(this.a);
}
{
this.a = c6758cbU;
}
}));
}
@Override // o.InterfaceC12828fIc
public final void h() {
C6758cbU c6758cbU = this.presenter;
if (c6758cbU == null) {
C14957gcv.a("");
c6758cbU = null;
}
int i = C15715hv.tOB.error_generic_resource;
C0690Mh.IeS ieS = C0690Mh.IeS.NAVIGATE_BACK;
C16903sI c16903sI = c6758cbU.j;
c6758cbU.d(c16903sI.c((String) null, c16903sI.e(i), ieS));
}
@Override // o.InterfaceC9500dks.LWm
public final void d() {
aH_();
}
@Override // o.InterfaceC9500dks.LWm
public final void a(String str) {
if (str == null) {
str = "";
}
try {
startActivity(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, Uri.parse(str)));
} catch (ActivityNotFoundException e) {
guQ.e(e);
}
}
@Override // o.InterfaceC9500dks.LWm
public final void d(C0979Sw c0979Sw) {
NdidCommonSelectIdpFragment.Sts sts;
if (c0979Sw == null || (sts = this.d) == null) {
return;
}
sts.e(c0979Sw);
}
@Override // o.InterfaceC9500dks.LWm
public final void b(String str) {
C14957gcv.e(str, "");
v(str);
}
}