what-the-bank/sources/com/scb/phone/view/fragment/hml/HmlNTBApplyLoanEntryFragmen...

165 lines
5.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.hml;
import android.content.ActivityNotFoundException;
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 android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
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.hml.HmlNTBApplyLoanEntryFragment;
import com.squareup.picasso.Picasso;
import java.util.List;
import o.AbstractC15351go;
import o.C0747Nq;
import o.C0751Nt;
import o.C13020fOa;
import o.C14957gcv;
import o.C5354brU;
import o.InterfaceC13391fZD;
import o.InterfaceC9329dhg;
import o.guQ;
import o.pug;
/* loaded from: classes5.dex */
public final class HmlNTBApplyLoanEntryFragment extends Hilt_HmlNTBApplyLoanEntryFragment implements InterfaceC9329dhg {
public static final IeS d = new IeS(0);
@BindView
public LinearLayout buttonListLinearLayout;
@BindView
public TextView descriptionTv;
@BindView
public ImageView imageIv;
@InterfaceC13391fZD
public C5354brU presenter;
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559703, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
C5354brU c5354brU = this.presenter;
C5354brU c5354brU2 = null;
if (c5354brU == null) {
C14957gcv.a("");
c5354brU = null;
}
c5354brU.e((C5354brU) this);
C5354brU c5354brU3 = this.presenter;
if (c5354brU3 != null) {
c5354brU2 = c5354brU3;
} else {
C14957gcv.a("");
}
String W = W();
C14957gcv.c((Object) W, "");
C14957gcv.e(W, "");
boolean b = C14957gcv.b((Object) W, (Object) "th");
if (c5354brU2.f != 0) {
c5354brU2.f.y();
}
c5354brU2.b.e(new C5354brU.IeS(c5354brU2, b), new C5354brU.LWm(c5354brU2), new AbstractC15351go.LWm(), c5354brU2.e);
return inflate;
}
@Override // o.InterfaceC9329dhg
public final void d(C0747Nq c0747Nq) {
C14957gcv.e(c0747Nq, "");
TextView textView = this.descriptionTv;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0747Nq.a);
List<C0751Nt> list = c0747Nq.c;
if (!list.isEmpty()) {
for (final C0751Nt c0751Nt : list) {
View inflate = getLayoutInflater().inflate(R.layout.2131558928, (ViewGroup) null);
C14957gcv.d(inflate, "");
Button button = (Button) inflate;
button.setText(c0751Nt.a);
button.setOnClickListener(new View.OnClickListener(this, c0751Nt) { // from class: o.fcj
private C0751Nt a;
private HmlNTBApplyLoanEntryFragment c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
HmlNTBApplyLoanEntryFragment.d(this.c, this.a);
}
{
this.c = this;
this.a = c0751Nt;
}
});
LinearLayout linearLayout = this.buttonListLinearLayout;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
linearLayout.addView(button);
}
}
u(c0747Nq.b);
C13020fOa e = Picasso.d().e(c0747Nq.e);
ImageView imageView = this.imageIv;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
e.aBu_(imageView, null);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
C5354brU c5354brU = this.presenter;
if (c5354brU == null) {
C14957gcv.a("");
c5354brU = null;
}
c5354brU.w_();
super.onDestroy();
}
public static /* synthetic */ void d(HmlNTBApplyLoanEntryFragment hmlNTBApplyLoanEntryFragment, C0751Nt c0751Nt) {
C14957gcv.e(hmlNTBApplyLoanEntryFragment, "");
C14957gcv.e(c0751Nt, "");
hmlNTBApplyLoanEntryFragment.c("p10x1_apply_loan_entry", new pug("feature", "ntb"), new pug("button", c0751Nt.b));
String str = c0751Nt.c;
try {
Intent intent = new Intent(CommonConstant.ACTION.HWID_SCHEME_URL);
intent.putExtra("com.scb.phone.view.activity.deeplink.BaseDeepLinkActivity.EXTRA_FROM_NTB", true);
intent.setData(Uri.parse(str));
intent.setFlags(603979776);
hmlNTBApplyLoanEntryFragment.startActivity(intent);
} catch (ActivityNotFoundException e) {
guQ.e(e);
} catch (NullPointerException e2) {
guQ.e(e2);
}
}
}