what-the-bank/sources/com/scb/phone/view/fragment/transferandpay/fixedtransfer/FixedTransferTargetTabFragm...

220 lines
7.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.transferandpay.fixedtransfer;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.Fragment;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.google.android.material.tabs.TabLayout;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.FragmentWrapContentViewPager;
import com.scb.phone.view.fragment.transferandpay.AnyTransferHistoryFragment;
import com.scb.phone.view.fragment.transferandpay.fixedtransfer.FixedTransferTargetTabFragment;
import com.scb.phone.view.fragment.transferandpay.transfer.TransferHistoryFragment;
import o.AbstractC1237Yr;
import o.C10457eEr;
import o.C10500eG;
import o.C12220euB;
import o.C6491cUi;
import o.InterfaceC13391fZD;
import o.InterfaceC9287dgr;
import o.YUM;
import o.ZI;
import o.gxQ;
import o.yGw;
/* loaded from: classes5.dex */
public class FixedTransferTargetTabFragment extends Hilt_FixedTransferTargetTabFragment implements InterfaceC9287dgr {
public C12220euB c;
@BindView
public TabLayout ctlTargetAccount;
AnyTransferHistoryFragment.RVV d;
@InterfaceC13391fZD
public C6491cUi fixedTransferTargetPresenter;
@BindView
Group groupAccountInfoLoadFailed;
@BindView
Group groupMainAccountFrozen;
@BindView
Group groupViewpager;
private TabLayout.IeS h = new TabLayout.IeS(this) { // from class: com.scb.phone.view.fragment.transferandpay.fixedtransfer.FixedTransferTargetTabFragment.4
private FixedTransferTargetTabFragment d;
@Override // com.google.android.material.tabs.TabLayout.Sts
public final void a(TabLayout.RVV rvv) {
}
@Override // com.google.android.material.tabs.TabLayout.Sts
public final void d(TabLayout.RVV rvv) {
}
{
this.d = this;
}
@Override // com.google.android.material.tabs.TabLayout.Sts
public final void e(TabLayout.RVV rvv) {
if (rvv.i == 1) {
this.d.d.d();
}
}
};
@BindView
ImageView rvReload;
@BindView
public FragmentWrapContentViewPager vpTargetAccount;
public static FixedTransferTargetTabFragment e(String str) {
Bundle bundle = new Bundle();
bundle.putString("account_source", str);
FixedTransferTargetTabFragment fixedTransferTargetTabFragment = new FixedTransferTargetTabFragment();
fixedTransferTargetTabFragment.setArguments(bundle);
return fixedTransferTargetTabFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559662, viewGroup, false);
ButterKnife.c(this, inflate);
this.fixedTransferTargetPresenter.e((C6491cUi) this);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
super.onViewCreated(view, bundle);
g();
}
@Override // com.scb.phone.view.fragment.transferandpay.fixedtransfer.Hilt_FixedTransferTargetTabFragment, 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.fGD
private FixedTransferTargetTabFragment a;
@Override // o.gxQ
public final void d(yRS yrs, Fragment fragment) {
FixedTransferTargetTabFragment.a(this.a, fragment);
}
{
this.a = this;
}
});
}
@Override // com.scb.phone.view.fragment.BaseFragment, o.InterfaceC6638cYp
public final void v() {
super.v();
this.groupMainAccountFrozen.setVisibility(8);
this.groupAccountInfoLoadFailed.setVisibility(8);
this.groupViewpager.setVisibility(8);
}
@Override // o.InterfaceC9287dgr
public final void b(boolean z) {
this.groupMainAccountFrozen.setVisibility(8);
this.groupAccountInfoLoadFailed.setVisibility(0);
this.groupViewpager.setVisibility(8);
this.rvReload.setVisibility(z ? 0 : 8);
}
@Override // o.InterfaceC9287dgr
public final void a() {
this.groupMainAccountFrozen.setVisibility(0);
this.groupAccountInfoLoadFailed.setVisibility(8);
this.groupViewpager.setVisibility(8);
}
@Override // o.InterfaceC9287dgr
public final void c(AbstractC1237Yr abstractC1237Yr) {
this.groupMainAccountFrozen.setVisibility(8);
this.groupAccountInfoLoadFailed.setVisibility(8);
byte b = 0;
this.groupViewpager.setVisibility(0);
this.c = new C12220euB(getChildFragmentManager(), getContext(), abstractC1237Yr);
if (this.vpTargetAccount.getAdapter() == null) {
this.vpTargetAccount.setAdapter(this.c);
this.ctlTargetAccount.setupWithViewPager(this.vpTargetAccount);
TabLayout tabLayout = this.ctlTargetAccount;
TabLayout.IeS ieS = this.h;
if (!tabLayout.d.contains(ieS)) {
tabLayout.d.add(ieS);
}
}
C6491cUi c6491cUi = this.fixedTransferTargetPresenter;
String W = W();
yGw ygw = c6491cUi.a;
ygw.d(ygw.a.j(W), new C6491cUi.HBt(c6491cUi, b));
}
@Override // o.InterfaceC9287dgr
public final void a(AbstractC1237Yr abstractC1237Yr) {
if (getContext() != null) {
Intent intent = new Intent("com.scb.phone/BROADCAST_TRANSFER_NEXT_STEP");
intent.putExtra("com.scb.phone.EXTRA_TRANSFER_TARGET_DATA", abstractC1237Yr);
intent.putExtra("com.scb.phone.EXTRA_TRANSFER_FUNCTION", "FIXED_TRANSFER");
intent.putExtra("com.scb.phone.EXTRA_TRANSFER_TO_MAIN_AUTO", true);
C10457eEr.aqd_(this, intent);
}
}
@Override // o.InterfaceC9287dgr
public final void b() {
C10457eEr.aqd_(this, new Intent("com.scb.phone/BROADCAST_BANK_RECEIVED"));
}
@Override // o.InterfaceC9287dgr
public final void d() {
C10457eEr.aqd_(this, new Intent("com.scb.phone/BROADCAST_TRANSFER_CLEAR_FILTER_SOF"));
}
/* JADX INFO: Access modifiers changed from: package-private */
@OnClick
public void onReloadClick(View view) {
g();
}
private void g() {
Bundle arguments = getArguments();
if (arguments != null) {
C6491cUi c6491cUi = this.fixedTransferTargetPresenter;
String string = arguments.getString("account_source");
ZI.IeS ieS = new ZI.IeS() { // from class: o.cUj
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9287dgr) obj).v();
}
};
if (c6491cUi.f != 0) {
ieS.e(c6491cUi.f);
}
YUM yum = c6491cUi.d;
C10500eG c10500eG = new C10500eG();
c10500eG.b = string;
c6491cUi.d.d(yum.c.c(c10500eG), new C6491cUi.Sts(c6491cUi, string));
}
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void a(FixedTransferTargetTabFragment fixedTransferTargetTabFragment, Fragment fragment) {
if (fragment instanceof TransferHistoryFragment) {
fixedTransferTargetTabFragment.d = (AnyTransferHistoryFragment.RVV) fragment;
}
}
}