what-the-bank/sources/com/scb/phone/view/fragment/transferandpay/billpaymenttab/BillpaymentSecondaryBNPLTab...

187 lines
6.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.transferandpay.billpaymenttab;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.google.android.material.tabs.TabLayout;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.custom.common.FragmentWrapContentViewPager;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.transferandpay.AnyTransferHistoryFragment;
import com.scb.phone.view.fragment.transferandpay.billpayment.BillPaymentHistoryFragment;
import com.scb.phone.view.fragment.transferandpay.billpaymenttab.BillpaymentSecondaryBNPLTabFragment;
import o.C1193Xr;
import o.C12526ezq;
import o.C14957gcv;
import o.InterfaceC16541pFg;
import o.InterfaceC9663dnz;
import o.gxQ;
import o.pug;
import o.yRS;
/* loaded from: classes5.dex */
public final class BillpaymentSecondaryBNPLTabFragment extends Hilt_BillpaymentSecondaryBNPLTabFragment implements InterfaceC9663dnz.HBt, InterfaceC9663dnz.IeS {
private InterfaceC9663dnz.HBt c;
private InterfaceC9663dnz.IeS d;
private AnyTransferHistoryFragment.RVV f;
@BindView
public TabLayout mTabLayout;
@BindView
public FragmentWrapContentViewPager mTabPager;
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559960, viewGroup, false);
C14957gcv.c(inflate, "");
((BaseFragment) this).a = ButterKnife.c(this, inflate);
yRS childFragmentManager = getChildFragmentManager();
C14957gcv.c(childFragmentManager, "");
C12526ezq c12526ezq = new C12526ezq(childFragmentManager, getContext());
FragmentWrapContentViewPager fragmentWrapContentViewPager = this.mTabPager;
FragmentWrapContentViewPager fragmentWrapContentViewPager2 = null;
if (fragmentWrapContentViewPager == null) {
C14957gcv.a("");
fragmentWrapContentViewPager = null;
}
fragmentWrapContentViewPager.setAdapter(c12526ezq);
fragmentWrapContentViewPager.setOffscreenPageLimit(1);
TabLayout tabLayout = this.mTabLayout;
if (tabLayout == null) {
C14957gcv.a("");
tabLayout = null;
}
FragmentWrapContentViewPager fragmentWrapContentViewPager3 = this.mTabPager;
if (fragmentWrapContentViewPager3 != null) {
fragmentWrapContentViewPager2 = fragmentWrapContentViewPager3;
} else {
C14957gcv.a("");
}
tabLayout.setupWithViewPager(fragmentWrapContentViewPager2);
fragmentWrapContentViewPager.addOnPageChangeListener(new Sts(this));
return inflate;
}
/* loaded from: classes5.dex */
public static final class Sts implements ViewPager.ojQ {
private BillpaymentSecondaryBNPLTabFragment d;
@Override // androidx.viewpager.widget.ViewPager.ojQ
public final void onPageScrollStateChanged(int i) {
}
@Override // androidx.viewpager.widget.ViewPager.ojQ
public final void onPageScrolled(int i, float f, int i2) {
}
Sts(BillpaymentSecondaryBNPLTabFragment billpaymentSecondaryBNPLTabFragment) {
this.d = billpaymentSecondaryBNPLTabFragment;
}
@Override // androidx.viewpager.widget.ViewPager.ojQ
public final void onPageSelected(int i) {
if (i == 1) {
AnyTransferHistoryFragment.RVV rvv = this.d.f;
if (rvv != null) {
rvv.d();
}
BillpaymentSecondaryBNPLTabFragment billpaymentSecondaryBNPLTabFragment = this.d;
pug[] pugVarArr = {new pug("tab_name", "History")};
if (billpaymentSecondaryBNPLTabFragment.getActivity() != null) {
((BaseActivity) billpaymentSecondaryBNPLTabFragment.getActivity()).scbAnalytics.e("billpayment_tab", pugVarArr);
}
}
}
}
@Override // com.scb.phone.view.fragment.transferandpay.billpaymenttab.Hilt_BillpaymentSecondaryBNPLTabFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public final void onAttach(Context context) {
C14957gcv.e(context, "");
super.onAttach(context);
InterfaceC16541pFg parentFragment = getParentFragment();
if (parentFragment instanceof InterfaceC9663dnz.HBt) {
this.c = (InterfaceC9663dnz.HBt) parentFragment;
}
if (parentFragment instanceof InterfaceC9663dnz.IeS) {
this.d = (InterfaceC9663dnz.IeS) parentFragment;
}
getChildFragmentManager().a(new gxQ(this) { // from class: o.fFf
private BillpaymentSecondaryBNPLTabFragment d;
@Override // o.gxQ
public final void d(yRS yrs, Fragment fragment) {
BillpaymentSecondaryBNPLTabFragment.b(this.d, fragment);
}
{
this.d = this;
}
});
}
@Override // o.InterfaceC9663dnz.HBt
public final void b(C1193Xr c1193Xr) {
C14957gcv.e(c1193Xr, "");
InterfaceC9663dnz.HBt hBt = this.c;
if (hBt != null) {
hBt.b(c1193Xr);
}
}
@Override // o.InterfaceC9663dnz.IeS
public final InterfaceC9663dnz.ojQ e() {
InterfaceC9663dnz.IeS ieS = this.d;
if (ieS != null) {
return ieS.e();
}
return null;
}
@Override // o.InterfaceC9663dnz.IeS
public final void i() {
InterfaceC9663dnz.IeS ieS = this.d;
if (ieS != null) {
ieS.i();
}
}
@Override // o.InterfaceC9663dnz.IeS
public final void e(int i) {
InterfaceC9663dnz.IeS ieS = this.d;
if (ieS != null) {
ieS.e(i);
}
}
/* loaded from: classes5.dex */
public static final class RVV {
private RVV() {
}
public /* synthetic */ RVV(byte b) {
this();
}
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void b(BillpaymentSecondaryBNPLTabFragment billpaymentSecondaryBNPLTabFragment, Fragment fragment) {
C14957gcv.e(billpaymentSecondaryBNPLTabFragment, "");
if (fragment instanceof BillPaymentHistoryFragment) {
billpaymentSecondaryBNPLTabFragment.f = (AnyTransferHistoryFragment.RVV) fragment;
}
}
static {
new RVV((byte) 0);
}
}