package com.scb.phone.view.fragment.cardmanagement; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.os.Parcelable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.fragment.app.FragmentActivity; import com.scb.phone.R; import java.util.List; import o.C0432Gk; import o.C0450Gv; import o.C12891fKc; import o.C14957gcv; import o.C17327voA; import o.C9814dqw; import o.FCf; import o.Vep; import o.eLU; import o.gdZ; import o.jWg; import o.nMh; import o.siF; /* loaded from: classes5.dex */ public final class DeejungInstallmentsSlipFragment extends Hilt_DeejungInstallmentsSlipFragment implements eLU { private C0432Gk c; private siF d; private Context f; @Override // o.eLU public final /* bridge */ /* synthetic */ void c(C0432Gk c0432Gk, View view) { c(c0432Gk, view, null); } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); siF c = siF.c(getLayoutInflater().inflate(R.layout.2131559546, (ViewGroup) null, false)); C14957gcv.c(c, ""); this.d = c; ConstraintLayout constraintLayout = c.g; C14957gcv.c(constraintLayout, ""); return constraintLayout; } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { C14957gcv.e(view, ""); super.onViewCreated(view, bundle); FragmentActivity activity = getActivity(); if (activity != null) { Intent intent = activity.getIntent(); C14957gcv.c(intent, ""); if (Build.VERSION.SDK_INT >= 33) { Bundle extras = intent.getExtras(); if (extras != null) { r3 = (Parcelable) extras.getParcelable("com.scb.phone.view.activity.card_management.DeejungInstallmentsConfirmationActivity.KEY_DEEJUNG_INSTALLMENTS_CONFIRMATION_DISPLAY_MODEL", C0432Gk.class); } } else { Bundle extras2 = intent.getExtras(); Parcelable parcelable = extras2 != null ? extras2.getParcelable("com.scb.phone.view.activity.card_management.DeejungInstallmentsConfirmationActivity.KEY_DEEJUNG_INSTALLMENTS_CONFIRMATION_DISPLAY_MODEL") : null; r3 = (C0432Gk) (parcelable instanceof C0432Gk ? parcelable : null); } this.c = (C0432Gk) r3; boolean booleanExtra = activity.getIntent().getBooleanExtra("IS_SUCCESS", false); this.f = getContext(); d(booleanExtra); } } public final void c(C0432Gk c0432Gk, View view, Context context) { C14957gcv.e(view, ""); this.c = c0432Gk; this.f = context; siF c = siF.c(view); C14957gcv.c(c, ""); this.d = c; d(true); } private final void d() { siF sif = this.d; if (sif == null) { C14957gcv.a(""); sif = null; } C9814dqw c9814dqw = sif.a; TextView textView = c9814dqw.a; C0432Gk c0432Gk = this.c; String str = c0432Gk != null ? c0432Gk.l : null; if (str == null) { str = ""; } textView.setText(str); TextView textView2 = c9814dqw.c; C0432Gk c0432Gk2 = this.c; String str2 = c0432Gk2 != null ? c0432Gk2.x : null; textView2.setText(str2 != null ? str2 : ""); } private final void d(boolean z) { List list; C0432Gk c0432Gk = this.c; siF sif = null; if (c0432Gk == null || !c0432Gk.h) { C0432Gk c0432Gk2 = this.c; if (c0432Gk2 != null && c0432Gk2.e) { siF sif2 = this.d; if (sif2 == null) { C14957gcv.a(""); sif2 = null; } C9814dqw c9814dqw = sif2.a; c9814dqw.d.setBackgroundResource(R.drawable.failed); TextView textView = c9814dqw.b; C14957gcv.c(textView, ""); TextView textView2 = textView; C14957gcv.e(textView2, ""); textView2.setVisibility(8); TextView textView3 = c9814dqw.e; C0432Gk c0432Gk3 = this.c; String str = c0432Gk3 != null ? c0432Gk3.d : null; if (str == null) { str = ""; } textView3.setText(str); TextView textView4 = c9814dqw.e; C14957gcv.c(textView4, ""); TextView textView5 = textView4; C14957gcv.e(textView5, ""); textView5.setVisibility(0); d(); } else { siF sif3 = this.d; if (sif3 == null) { C14957gcv.a(""); sif3 = null; } C9814dqw c9814dqw2 = sif3.a; c9814dqw2.d.setBackgroundResource(R.drawable.success); TextView textView6 = c9814dqw2.b; C14957gcv.c(textView6, ""); TextView textView7 = textView6; C14957gcv.e(textView7, ""); textView7.setVisibility(0); TextView textView8 = c9814dqw2.b; C0432Gk c0432Gk4 = this.c; String str2 = c0432Gk4 != null ? c0432Gk4.t : null; if (str2 == null) { str2 = ""; } textView8.setText(str2); TextView textView9 = c9814dqw2.e; C14957gcv.c(textView9, ""); TextView textView10 = textView9; C14957gcv.e(textView10, ""); textView10.setVisibility(0); TextView textView11 = c9814dqw2.e; C0432Gk c0432Gk5 = this.c; String str3 = c0432Gk5 != null ? c0432Gk5.d : null; if (str3 == null) { str3 = ""; } textView11.setText(str3); d(); } } else { siF sif4 = this.d; if (sif4 == null) { C14957gcv.a(""); sif4 = null; } C9814dqw c9814dqw3 = sif4.a; c9814dqw3.d.setBackgroundResource(R.drawable.success); TextView textView12 = c9814dqw3.b; C14957gcv.c(textView12, ""); TextView textView13 = textView12; C14957gcv.e(textView13, ""); textView13.setVisibility(0); TextView textView14 = c9814dqw3.b; C0432Gk c0432Gk6 = this.c; String str4 = c0432Gk6 != null ? c0432Gk6.t : null; if (str4 == null) { str4 = ""; } textView14.setText(str4); TextView textView15 = c9814dqw3.e; C14957gcv.c(textView15, ""); TextView textView16 = textView15; C14957gcv.e(textView16, ""); textView16.setVisibility(8); d(); } siF sif5 = this.d; if (sif5 == null) { C14957gcv.a(""); sif5 = null; } C17327voA c17327voA = sif5.b; jWg jwg = c17327voA.b; TextView textView17 = jwg.e; C0432Gk c0432Gk7 = this.c; String str5 = c0432Gk7 != null ? c0432Gk7.m : null; if (str5 == null) { str5 = ""; } textView17.setText(str5); TextView textView18 = jwg.c; C0432Gk c0432Gk8 = this.c; String str6 = c0432Gk8 != null ? c0432Gk8.g : null; if (str6 == null) { str6 = ""; } textView18.setText(str6); ImageView imageView = jwg.d; C0432Gk c0432Gk9 = this.c; C12891fKc.azw_(imageView, c0432Gk9 != null ? c0432Gk9.a : null); c17327voA.a.setBackgroundColor(nMh.getColor(c17327voA.a.getContext(), R.color.f14012131100909)); View view = c17327voA.e; C14957gcv.c(view, ""); C14957gcv.e(view, ""); view.setVisibility(0); TextView textView19 = c17327voA.d; C0432Gk c0432Gk10 = this.c; String str7 = c0432Gk10 != null ? c0432Gk10.u : null; if (str7 == null) { str7 = ""; } textView19.setText(str7); Vep vep = sif5.d; ConstraintLayout constraintLayout = vep.f; C14957gcv.c(constraintLayout, ""); ConstraintLayout constraintLayout2 = constraintLayout; C14957gcv.e(constraintLayout2, ""); constraintLayout2.setVisibility(0); TextView textView20 = vep.f8422o; C0432Gk c0432Gk11 = this.c; String str8 = c0432Gk11 != null ? c0432Gk11.q : null; if (str8 == null) { str8 = ""; } textView20.setText(str8); TextView textView21 = vep.n; C0432Gk c0432Gk12 = this.c; String str9 = c0432Gk12 != null ? c0432Gk12.p : null; if (str9 == null) { str9 = ""; } textView21.setText(str9); TextView textView22 = vep.k; C0432Gk c0432Gk13 = this.c; String str10 = c0432Gk13 != null ? c0432Gk13.v : null; if (str10 == null) { str10 = ""; } textView22.setText(str10); TextView textView23 = vep.e; C0432Gk c0432Gk14 = this.c; String str11 = c0432Gk14 != null ? c0432Gk14.b : null; if (str11 == null) { str11 = ""; } textView23.setText(str11); TextView textView24 = vep.b; C0432Gk c0432Gk15 = this.c; String str12 = c0432Gk15 != null ? c0432Gk15.n : null; if (str12 == null) { str12 = ""; } textView24.setText(str12); C0432Gk c0432Gk16 = this.c; if (c0432Gk16 != null && c0432Gk16.j) { vep.g.setText(R.string.new_deejung_installment_email_notification_message); } else { vep.g.setText(R.string.deejung_installment_email_notification_message); } C0432Gk c0432Gk17 = this.c; if (c0432Gk17 != null && c0432Gk17.i) { siF sif6 = this.d; if (sif6 == null) { C14957gcv.a(""); sif6 = null; } Vep vep2 = sif6.d; vep2.a.setText(R.string.yearly_interest_rate_label); TextView textView25 = vep2.m; C14957gcv.c(textView25, ""); TextView textView26 = textView25; C14957gcv.e(textView26, ""); textView26.setVisibility(8); LinearLayout linearLayout = vep2.h; C14957gcv.c(linearLayout, ""); LinearLayout linearLayout2 = linearLayout; C14957gcv.e(linearLayout2, ""); linearLayout2.setVisibility(8); View view2 = vep2.l; C14957gcv.c(view2, ""); C14957gcv.e(view2, ""); view2.setVisibility(4); if (z) { C0432Gk c0432Gk18 = this.c; String str13 = c0432Gk18 != null ? c0432Gk18.y : null; if (str13 == null || str13.length() == 0) { View view3 = vep2.p; C14957gcv.c(view3, ""); C14957gcv.e(view3, ""); view3.setVisibility(4); } } } else { siF sif7 = this.d; if (sif7 == null) { C14957gcv.a(""); sif7 = null; } Vep vep3 = sif7.d; vep3.a.setText(R.string.monthly_interest_rate_label); TextView textView27 = vep3.m; C14957gcv.c(textView27, ""); TextView textView28 = textView27; C14957gcv.e(textView28, ""); textView28.setVisibility(0); TextView textView29 = vep3.m; C0432Gk c0432Gk19 = this.c; String str14 = c0432Gk19 != null ? c0432Gk19.k : null; if (str14 == null) { str14 = ""; } textView29.setText(str14); if (z) { C0432Gk c0432Gk20 = this.c; String str15 = c0432Gk20 != null ? c0432Gk20.y : null; if (str15 == null || str15.length() == 0) { View view4 = vep3.l; C14957gcv.c(view4, ""); C14957gcv.e(view4, ""); view4.setVisibility(4); } } } C0432Gk c0432Gk21 = this.c; String str16 = c0432Gk21 != null ? c0432Gk21.y : null; if (true ^ (str16 == null || gdZ.d((CharSequence) str16))) { ConstraintLayout constraintLayout3 = vep.d; C14957gcv.c(constraintLayout3, ""); ConstraintLayout constraintLayout4 = constraintLayout3; C14957gcv.e(constraintLayout4, ""); constraintLayout4.setVisibility(0); TextView textView30 = vep.j; C0432Gk c0432Gk22 = this.c; String str17 = c0432Gk22 != null ? c0432Gk22.y : null; if (str17 == null) { str17 = ""; } textView30.setText(str17); if (z) { View view5 = vep.c; C14957gcv.c(view5, ""); C14957gcv.e(view5, ""); view5.setVisibility(4); } } else { ConstraintLayout constraintLayout5 = vep.d; C14957gcv.c(constraintLayout5, ""); ConstraintLayout constraintLayout6 = constraintLayout5; C14957gcv.e(constraintLayout6, ""); constraintLayout6.setVisibility(8); View view6 = vep.l; C14957gcv.c(view6, ""); C14957gcv.e(view6, ""); view6.setVisibility(4); } siF sif8 = this.d; if (sif8 == null) { C14957gcv.a(""); } else { sif = sif8; } C0432Gk c0432Gk23 = this.c; if (c0432Gk23 == null || (list = c0432Gk23.f8184o) == null) { return; } for (C0450Gv c0450Gv : list) { FCf QY_ = FCf.QY_(LayoutInflater.from(this.f), sif.e); C14957gcv.c(QY_, ""); ImageView imageView2 = QY_.a; C14957gcv.c(imageView2, ""); ImageView imageView3 = imageView2; C14957gcv.e(imageView3, ""); imageView3.setVisibility(0); QY_.d.setText(c0450Gv.d); QY_.b.setText(c0450Gv.j); if (C14957gcv.b((Object) "1000", (Object) c0450Gv.c)) { QY_.a.setBackgroundResource(R.drawable.success); } else { QY_.a.setBackgroundResource(R.drawable.failed); TextView textView31 = QY_.c; C14957gcv.c(textView31, ""); TextView textView32 = textView31; C14957gcv.e(textView32, ""); textView32.setVisibility(0); QY_.c.setText(c0450Gv.e); } sif.e.addView(QY_.e); } } }