what-the-bank/sources/com/scb/phone/view/fragment/ccrredemption/pointtopay/PointToPayIntroductionFragm...

215 lines
7.0 KiB
Java

package com.scb.phone.view.fragment.ccrredemption.pointtopay;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.ccrredemption.pointtopay.PointToPaySelectPurchaseActivity;
import com.scb.phone.view.fragment.BaseFragment;
import java.util.ArrayList;
import o.C0367Fb;
import o.C14957gcv;
import o.C3221atS;
import o.C3282aub;
import o.InterfaceC13391fZD;
import o.InterfaceC9046dcN;
import o.ZI;
/* loaded from: classes5.dex */
public final class PointToPayIntroductionFragment extends Hilt_PointToPayIntroductionFragment implements InterfaceC9046dcN.RVV {
public static final RVV d = new RVV(0);
private ArrayList<C0367Fb> c;
private C0367Fb j;
@InterfaceC13391fZD
public C3221atS presenter;
@BindView
public TextView tvFeatureSupports;
@BindView
public TextView tvIntroductionTitle;
/* loaded from: classes5.dex */
public static final class RVV {
private RVV() {
}
public /* synthetic */ RVV(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.2131559814, viewGroup, false);
C14957gcv.c(inflate, "");
((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, "");
C3221atS c3221atS = this.presenter;
final C3221atS c3221atS2 = null;
if (c3221atS == null) {
C14957gcv.a("");
c3221atS = null;
}
c3221atS.e((C3221atS) this);
C3221atS c3221atS3 = this.presenter;
if (c3221atS3 != null) {
c3221atS2 = c3221atS3;
} else {
C14957gcv.a("");
}
if (c3221atS2.c.a.k()) {
C3282aub c3282aub = new C3282aub();
if (c3221atS2.f != 0) {
c3282aub.e(c3221atS2.f);
return;
}
return;
}
ZI.IeS ieS = new ZI.IeS(c3221atS2) { // from class: o.atY
private C3221atS a;
@Override // o.ZI.IeS
public final void e(Object obj) {
C3221atS.d(this.a, (InterfaceC9046dcN.RVV) obj);
}
{
this.a = c3221atS2;
}
};
if (c3221atS2.f != 0) {
ieS.e(c3221atS2.f);
}
}
@Override // o.InterfaceC9046dcN.RVV
public final void c() {
C3221atS c3221atS = this.presenter;
C3221atS c3221atS2 = null;
if (c3221atS == null) {
C14957gcv.a("");
c3221atS = null;
}
C3282aub c3282aub = new C3282aub();
if (c3221atS.f != 0) {
c3282aub.e(c3221atS.f);
}
C3221atS c3221atS3 = this.presenter;
if (c3221atS3 != null) {
c3221atS2 = c3221atS3;
} else {
C14957gcv.a("");
}
c3221atS2.c.a.z();
}
@Override // o.InterfaceC9046dcN.RVV
public final void e() {
FragmentActivity activity = getActivity();
if (activity != null) {
PointToPaySelectPurchaseActivity.IeS ieS = PointToPaySelectPurchaseActivity.m;
FragmentActivity fragmentActivity = activity;
Bundle arguments = getArguments();
C0367Fb c0367Fb = arguments != null ? (C0367Fb) arguments.getParcelable("EXTRA_CREDIT_CARD_DISPLAY_KEY") : null;
Bundle arguments2 = getArguments();
ArrayList parcelableArrayList = arguments2 != null ? arguments2.getParcelableArrayList("EXTRA_CREDIT_CARD_DISPLAY_LIST_KEY") : null;
Bundle arguments3 = getArguments();
boolean z = arguments3 != null ? arguments3.getBoolean("EXTRA_FROM_DEEP_LINK_KEY") : false;
Bundle arguments4 = getArguments();
String string = arguments4 != null ? arguments4.getString("EXTRA_DEEP_LINK_CHANNEL_KEY") : null;
C14957gcv.e(fragmentActivity, "");
Intent intent = new Intent(fragmentActivity, (Class<?>) PointToPaySelectPurchaseActivity.class);
intent.putExtra("EXTRA_CREDIT_CARD_DISPLAY_KEY", c0367Fb);
intent.putExtra("EXTRA_CREDIT_CARD_DISPLAY_LIST_KEY", parcelableArrayList);
intent.putExtra("EXTRA_FROM_DEEP_LINK_KEY", z);
intent.putExtra("EXTRA_DEEP_LINK_CHANNEL_KEY", string);
activity.startActivity(intent);
activity.finish();
}
}
@Override // o.InterfaceC9046dcN.RVV
public final void b() {
TextView textView = this.tvIntroductionTitle;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(getString(R.string.auto_p2p_introduction_redeem_for_cashback));
TextView textView3 = this.tvFeatureSupports;
if (textView3 != null) {
textView2 = textView3;
} else {
C14957gcv.a("");
}
textView2.setText(getString(R.string.auto_p2p_introduction_feature_supports));
}
@Override // o.InterfaceC9046dcN.RVV
public final void d() {
TextView textView = this.tvIntroductionTitle;
TextView textView2 = null;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(getString(R.string.auto_p2p_introduction_redeem_for_cashback_cardx));
TextView textView3 = this.tvFeatureSupports;
if (textView3 != null) {
textView2 = textView3;
} else {
C14957gcv.a("");
}
textView2.setText(getString(R.string.auto_p2p_introduction_feature_supports_cardx));
}
@OnClick
public final void onApplyNowClick() {
C3221atS c3221atS = this.presenter;
if (c3221atS == null) {
C14957gcv.a("");
c3221atS = null;
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.atT
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9046dcN.RVV) obj).c();
}
};
if (c3221atS.f != 0) {
ieS.e(c3221atS.f);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
C3221atS c3221atS = null;
this.j = null;
this.c = null;
C3221atS c3221atS2 = this.presenter;
if (c3221atS2 != null) {
c3221atS = c3221atS2;
} else {
C14957gcv.a("");
}
c3221atS.w_();
super.onDestroyView();
}
}