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

200 lines
6.0 KiB
Java

package com.scb.phone.view.fragment.hml;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import o.C0760Nz;
import o.C14820gN;
import o.C14957gcv;
import o.C5499buH;
import o.InterfaceC13391fZD;
import o.InterfaceC9337dho;
import o.WY;
import o.ZI;
import o.gdZ;
/* loaded from: classes5.dex */
public final class HmlOutcomePendingWithAIPFragment extends Hilt_HmlOutcomePendingWithAIPFragment implements InterfaceC9337dho {
public static final HBt c = new HBt(0);
@BindView
public TextView amount;
@BindView
public TextView dateText;
@BindView
public LinearLayout installmentsContainer;
@InterfaceC13391fZD
public C14820gN itemFactory;
@InterfaceC13391fZD
public C5499buH presenter;
@BindView
public TextView repaymentAmount;
@BindView
public TextView repaymentTerm;
/* loaded from: classes5.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
final C0760Nz c0760Nz;
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559715, viewGroup, false);
ButterKnife.c(this, inflate);
C5499buH c5499buH = this.presenter;
C5499buH c5499buH2 = null;
if (c5499buH == null) {
C14957gcv.a("");
c5499buH = null;
}
c5499buH.e((C5499buH) this);
Bundle arguments = getArguments();
if (arguments != null && (c0760Nz = (C0760Nz) arguments.getParcelable("HML_OUTCOME_PENDING_WITH_AIP_EXTRA")) != null) {
C5499buH c5499buH3 = this.presenter;
if (c5499buH3 != null) {
c5499buH2 = c5499buH3;
} else {
C14957gcv.a("");
}
C14957gcv.e(c0760Nz, "");
ZI.IeS ieS = new ZI.IeS(c0760Nz) { // from class: o.buK
private C0760Nz d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C5499buH.a(this.d, (InterfaceC9337dho) obj);
}
{
this.d = c0760Nz;
}
};
if (c5499buH2.f != 0) {
ieS.e(c5499buH2.f);
}
}
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
C5499buH c5499buH = this.presenter;
if (c5499buH == null) {
C14957gcv.a("");
c5499buH = null;
}
c5499buH.w_();
super.onDestroy();
}
@Override // o.InterfaceC9337dho
public final void a(C0760Nz c0760Nz) {
C14957gcv.e(c0760Nz, "");
TextView textView = this.dateText;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0760Nz.d);
TextView textView2 = this.dateText;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
TextView textView3 = textView2;
String str = c0760Nz.d;
boolean z = !(str == null || gdZ.d((CharSequence) str));
C14957gcv.e(textView3, "");
textView3.setVisibility(z ? 0 : 8);
TextView textView4 = this.amount;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
textView4.setText(c0760Nz.e);
TextView textView5 = this.repaymentAmount;
if (textView5 == null) {
C14957gcv.a("");
textView5 = null;
}
textView5.setText(getString(R.string.hml_summary_request_amount_value, c0760Nz.h, c0760Nz.j));
for (WY wy : c0760Nz.a) {
LinearLayout linearLayout = this.installmentsContainer;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
LayoutInflater from = LayoutInflater.from(getContext());
LinearLayout linearLayout2 = this.installmentsContainer;
if (linearLayout2 == null) {
C14957gcv.a("");
linearLayout2 = null;
}
View inflate = from.inflate(R.layout.2131559985, (ViewGroup) linearLayout2, false);
View findViewById = inflate.findViewById(R.id.tv_interestrate_title);
C14957gcv.c(findViewById, "");
View findViewById2 = inflate.findViewById(R.id.tv_interestrate_value);
C14957gcv.c(findViewById2, "");
((TextView) findViewById).setText(wy.c);
((TextView) findViewById2).setText(wy.a);
linearLayout.addView(inflate);
TextView textView6 = this.repaymentTerm;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
textView6.setText(getString(R.string.two_words, c0760Nz.c, c0760Nz.b));
}
}
@Override // o.InterfaceC9337dho
public final void c() {
a();
}
@OnClick
public final void onButtonReturnHomeClicked(View view) {
C14957gcv.e(view, "");
C5499buH c5499buH = this.presenter;
if (c5499buH == null) {
C14957gcv.a("");
c5499buH = null;
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.buG
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9337dho) obj).c();
}
};
if (c5499buH.f != 0) {
ieS.e(c5499buH.f);
}
}
@OnClick
public final void onContactCallCenter(View view) {
C14957gcv.e(view, "");
aZ_();
}
}