what-the-bank/sources/com/scb/phone/view/fragment/chequemanagement/stopcheque/StopChequeFragment.java

195 lines
6.9 KiB
Java

package com.scb.phone.view.fragment.chequemanagement.stopcheque;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.fragment.chequemanagement.stopcheque.StopChequeFragment;
import com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment;
import o.AbstractC13482fbE;
import o.C1171Xc;
import o.C3432axT;
import o.InterfaceC12846fIu;
import o.InterfaceC13391fZD;
import o.InterfaceC6617cYF;
import o.WW;
import o.YE;
import o.ZI;
import o.cYD;
import o.gxQ;
import o.yRS;
/* loaded from: classes5.dex */
public class StopChequeFragment extends Hilt_StopChequeFragment implements cYD, InterfaceC12846fIu, AccountSourceSelectFragment.Sts {
@BindView
FrameLayout accountSourceSelected;
String c;
private StopChequeHistoryFragment d;
@InterfaceC13391fZD
public C3432axT presenter;
@BindView
LinearLayout rootErrorNoAccount;
@BindView
NestedScrollView scrollView;
@BindView
TextView tvAccountFrom;
@BindView
TextView tvErrorNoAccountDetail;
@BindView
TextView tvErrorNoAccountTitle;
public static StopChequeFragment a(int i) {
StopChequeFragment stopChequeFragment = new StopChequeFragment();
Bundle bundle = new Bundle();
bundle.putInt("STOP_CHEQUE_EXTRA_SOURCE_SIZE", i);
stopChequeFragment.setArguments(bundle);
return stopChequeFragment;
}
@Override // com.scb.phone.view.fragment.chequemanagement.stopcheque.Hilt_StopChequeFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public void onAttach(Context context) {
super.onAttach(context);
getChildFragmentManager().a(new gxQ(this) { // from class: o.eMN
private StopChequeFragment c;
@Override // o.gxQ
public final void d(yRS yrs, Fragment fragment) {
StopChequeFragment.c(this.c, fragment);
}
{
this.c = this;
}
});
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559943, viewGroup, false);
ButterKnife.c(this, inflate);
this.presenter.e((C3432axT) this);
v("stopchq_landing");
return inflate;
}
@Override // androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
super.onViewCreated(view, bundle);
int i = getArguments() != null ? getArguments().getInt("STOP_CHEQUE_EXTRA_SOURCE_SIZE", 0) : 0;
C3432axT c3432axT = this.presenter;
if (i > 0) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.axW
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6617cYF.IeS) obj).e();
}
};
if (c3432axT.f != 0) {
ieS.e(c3432axT.f);
return;
}
return;
}
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.aye
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC6617cYF.IeS) obj).c();
}
};
if (c3432axT.f != 0) {
ieS2.e(c3432axT.f);
}
}
@Override // o.InterfaceC6617cYF.IeS
public final void e() {
C1171Xc.IeS ieS = new C1171Xc.IeS(YE.STOP_CHEQUE_STATUS_FUNCTION);
C1171Xc c1171Xc = ieS.c;
c1171Xc.a = false;
c1171Xc.b = true;
c1171Xc.j = true;
c1171Xc.g = true;
ieS.c.j = false;
ieS.c.g = false;
ieS.c.b = false;
C1171Xc c1171Xc2 = ieS.c;
AbstractC13482fbE a = getChildFragmentManager().a();
a.b(R.id.fragment_account_source_select, AccountSourceSelectFragment.b(c1171Xc2), null, 2);
a.b();
this.scrollView.setOnScrollChangeListener(new NestedScrollView.RVV(this) { // from class: o.eMM
private StopChequeFragment b;
@Override // androidx.core.widget.NestedScrollView.RVV
public final void e(NestedScrollView nestedScrollView, int i, int i2) {
StopChequeFragment.e(this.b, nestedScrollView, i, i2);
}
{
this.b = this;
}
});
}
@Override // o.InterfaceC6617cYF.IeS
public final void c() {
String string = getString(R.string.error_issued_cheque_no_account);
String string2 = getString(R.string.error_issued_cheque_no_account_detail);
this.tvErrorNoAccountTitle.setText(string);
this.tvErrorNoAccountDetail.setText(string2);
this.rootErrorNoAccount.setVisibility(0);
AbstractC13482fbE a = getChildFragmentManager().a();
a.b(R.id.container_stop_cheque_history, StopChequeHistoryFragment.b(this.c, ""), null, 2);
a.b();
}
@Override // o.InterfaceC12846fIu
public final void aT_() {
aN_();
if (getChildFragmentManager().findFragmentById(R.id.container_stop_cheque_history) instanceof StopChequeInputFragment) {
yRS childFragmentManager = getChildFragmentManager();
((Boolean) yRS.c(new Object[]{childFragmentManager}, 1273581602, -1273581599, System.identityHashCode(childFragmentManager))).booleanValue();
}
}
public static /* synthetic */ void c(StopChequeFragment stopChequeFragment, Fragment fragment) {
if (fragment instanceof StopChequeHistoryFragment) {
StopChequeHistoryFragment stopChequeHistoryFragment = (StopChequeHistoryFragment) fragment;
stopChequeFragment.d = stopChequeHistoryFragment;
stopChequeHistoryFragment.c = stopChequeFragment;
}
}
public static /* synthetic */ void e(StopChequeFragment stopChequeFragment, NestedScrollView nestedScrollView, int i, int i2) {
if (i < i2 || !(stopChequeFragment.getChildFragmentManager().findFragmentById(R.id.container_stop_cheque_history) instanceof StopChequeHistoryFragment) || i < (nestedScrollView.getChildAt(0).getMeasuredHeight() - nestedScrollView.getMeasuredHeight()) - 250) {
return;
}
stopChequeFragment.d.aJ_();
}
@Override // com.scb.phone.view.fragment.transferandpay.AccountSourceSelectFragment.Sts
public final void a(WW ww) {
if (ww != null) {
this.c = ww.s;
AbstractC13482fbE a = getChildFragmentManager().a();
a.b(R.id.container_stop_cheque_history, StopChequeHistoryFragment.b(this.c, ""), null, 2);
a.b();
}
}
}