what-the-bank/sources/com/scb/phone/view/fragment/easycash/EasycashNcbSlipFragment.java

224 lines
8.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.easycash;
import android.content.Context;
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.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.fragment.app.FragmentActivity;
import com.scb.phone.R;
import com.scb.phone.view.activity.easycash.EasycashNcbSlipActivity;
import com.scb.phone.view.activity.easycash.EasycashSubmittedResultActivity;
import com.scb.phone.view.fragment.easycash.EasycashNcbSlipFragment;
import o.AbstractC14961gcz;
import o.C12891fKc;
import o.C14957gcv;
import o.C15829iu;
import o.C15998kNe;
import o.C1904aRk;
import o.C8394dJt;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC9200dfI;
import o.JX;
import o.ZI;
import o.Zyb;
import o.fZZ;
import o.qeC;
/* loaded from: classes5.dex */
public final class EasycashNcbSlipFragment extends Hilt_EasycashNcbSlipFragment implements InterfaceC9200dfI {
public static final Sts c = new Sts(0);
private final InterfaceC13393fZL d;
@InterfaceC13391fZD
public C1904aRk presenter;
/* loaded from: classes5.dex */
static final class LWm extends AbstractC14961gcz implements InterfaceC14890gbN<C15998kNe> {
private EasycashNcbSlipFragment d;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C15998kNe invoke() {
View inflate = this.d.getLayoutInflater().inflate(R.layout.2131559606, (ViewGroup) null, false);
int i = R.id.btn_confirm;
Button button = (Button) qeC.e(inflate, R.id.btn_confirm);
if (button != null) {
LinearLayout linearLayout = (LinearLayout) inflate;
i = R.id.iv_ncb_slip;
ImageView imageView = (ImageView) qeC.e(inflate, R.id.iv_ncb_slip);
if (imageView != null) {
i = R.id.ll_confirm_btn;
LinearLayout linearLayout2 = (LinearLayout) qeC.e(inflate, R.id.ll_confirm_btn);
if (linearLayout2 != null) {
C15998kNe c15998kNe = new C15998kNe(linearLayout, button, linearLayout, imageView, linearLayout2);
C14957gcv.c(c15998kNe, "");
return c15998kNe;
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
LWm(EasycashNcbSlipFragment easycashNcbSlipFragment) {
super(0);
this.d = easycashNcbSlipFragment;
}
}
public EasycashNcbSlipFragment() {
LWm lWm = new LWm(this);
C14957gcv.e(lWm, "");
this.d = new fZZ(lWm);
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
C1904aRk c1904aRk = this.presenter;
if (c1904aRk == null) {
C14957gcv.a("");
c1904aRk = null;
}
c1904aRk.e((C1904aRk) this);
LinearLayout linearLayout = ((C15998kNe) this.d.e()).b;
C14957gcv.c(linearLayout, "");
return linearLayout;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
Bundle arguments = getArguments();
if (arguments != null) {
C1904aRk c1904aRk = this.presenter;
C1904aRk c1904aRk2 = null;
if (c1904aRk == null) {
C14957gcv.a("");
c1904aRk = null;
}
String string = arguments.getString("APPLICATION_ID_EXTRA", "");
C14957gcv.c((Object) string, "");
String string2 = arguments.getString("PRODUCT_TYPE_EXTRA", null);
C14957gcv.e(string, "");
C15829iu c15829iu = c1904aRk.d;
C1904aRk.HBt hBt = new C1904aRk.HBt(c1904aRk);
C1904aRk.RVV rvv = new C1904aRk.RVV(c1904aRk);
C14957gcv.e(hBt, "");
C14957gcv.e(rvv, "");
C14957gcv.e(string, "");
c15829iu.b(c15829iu.d, hBt, rvv, new Zyb.HBt(string, string2));
C1904aRk c1904aRk3 = this.presenter;
if (c1904aRk3 != null) {
c1904aRk2 = c1904aRk3;
} else {
C14957gcv.a("");
}
if (c1904aRk2.d.b()) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.aRm
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9200dfI) obj).a();
}
};
if (c1904aRk2.f != 0) {
ieS.e(c1904aRk2.f);
}
}
}
}
@Override // o.InterfaceC9200dfI
public final void c(String str) {
C14957gcv.e(str, "");
C12891fKc.azK_(str, ((C15998kNe) this.d.e()).c);
}
@Override // o.InterfaceC9200dfI
public final void b(String str, boolean z) {
C14957gcv.e(str, "");
FragmentActivity activity = getActivity();
EasycashNcbSlipActivity easycashNcbSlipActivity = activity instanceof EasycashNcbSlipActivity ? (EasycashNcbSlipActivity) activity : null;
if (easycashNcbSlipActivity != null) {
C14957gcv.e(str, "");
easycashNcbSlipActivity.l = z;
if (EasycashNcbSlipActivity.P()) {
C8394dJt.e(easycashNcbSlipActivity, str);
} else {
C8394dJt.d(easycashNcbSlipActivity, str);
}
}
}
@Override // o.InterfaceC9200dfI
public final void a() {
X();
C15998kNe c15998kNe = (C15998kNe) this.d.e();
LinearLayout linearLayout = c15998kNe.a;
C14957gcv.c(linearLayout, "");
LinearLayout linearLayout2 = linearLayout;
C14957gcv.e(linearLayout2, "");
linearLayout2.setVisibility(0);
c15998kNe.e.setOnClickListener(new View.OnClickListener(this) { // from class: o.eTy
private EasycashNcbSlipFragment e;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
EasycashNcbSlipFragment.c(this.e);
}
{
this.e = this;
}
});
FragmentActivity activity = getActivity();
EasycashNcbSlipActivity easycashNcbSlipActivity = activity instanceof EasycashNcbSlipActivity ? (EasycashNcbSlipActivity) activity : null;
if (easycashNcbSlipActivity != null) {
easycashNcbSlipActivity.f7065o = true;
}
}
/* loaded from: classes5.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
public static /* synthetic */ void c(EasycashNcbSlipFragment easycashNcbSlipFragment) {
Bundle arguments;
Parcelable parcelable;
C14957gcv.e(easycashNcbSlipFragment, "");
Context context = easycashNcbSlipFragment.getContext();
if (context == null || (arguments = easycashNcbSlipFragment.getArguments()) == null) {
return;
}
EasycashSubmittedResultActivity.Sts sts = EasycashSubmittedResultActivity.b;
String string = arguments.getString("APPLICATION_ID_EXTRA");
String str = string == null ? "" : string;
String string2 = arguments.getString("PRODUCT_TYPE_EXTRA");
C14957gcv.c(arguments, "");
if (Build.VERSION.SDK_INT >= 33) {
parcelable = (Parcelable) arguments.getParcelable("COMMERCIAL_CONFIRM_DISPLAY_EXTRA", JX.class);
} else {
Parcelable parcelable2 = arguments.getParcelable("COMMERCIAL_CONFIRM_DISPLAY_EXTRA");
if (!(parcelable2 instanceof JX)) {
parcelable2 = null;
}
parcelable = (JX) parcelable2;
}
context.startActivity(EasycashSubmittedResultActivity.Sts.aeC_(context, str, string2, "", null, (JX) parcelable, "Y"));
}
}