package com.scb.phone.view.fragment.investment.onboarding; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import androidx.viewpager.widget.ViewPager; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.scb.phone.R; import com.scb.phone.view.adapter.investment.onboarding.FundAccountPagerAdapter; import java.util.List; import me.relex.circleindicator.CircleIndicator; import o.C2188aZr; import o.C3700bEC; import o.InterfaceC13391fZD; import o.InterfaceC6669cZl; import o.PL; import o.S; import o.fIE; /* loaded from: classes5.dex */ public class FundSelectAccountFragment extends Hilt_FundSelectAccountFragment implements InterfaceC6669cZl.vUG, FundAccountPagerAdapter.Sts { @BindView Button buttonNext; private fIE c; private FundAccountPagerAdapter d; @InterfaceC13391fZD public C3700bEC fundSelectAccountPresenter; @BindView CircleIndicator mCircleIndicator; @BindView ViewPager mViewPager; /* JADX WARN: Multi-variable type inference failed */ @Override // com.scb.phone.view.fragment.investment.onboarding.Hilt_FundSelectAccountFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public void onAttach(Context context) { super.onAttach(context); if (context instanceof fIE) { this.c = (fIE) context; } } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559764, viewGroup, false); ButterKnife.c(this, inflate); this.fundSelectAccountPresenter.e((C3700bEC) this); C3700bEC c3700bEC = this.fundSelectAccountPresenter; if (c3700bEC.f != 0) { c3700bEC.f.y(); } c3700bEC.d.d(); C2188aZr c2188aZr = c3700bEC.d; c2188aZr.d(c2188aZr.i, new C3700bEC.Sts(c3700bEC)); this.buttonNext.setEnabled(false); v("mfonboard_selectaccount"); return inflate; } @Override // o.InterfaceC6669cZl.vUG public final void e(List list) { FundAccountPagerAdapter fundAccountPagerAdapter = new FundAccountPagerAdapter(getActivity(), list, this); this.d = fundAccountPagerAdapter; this.mViewPager.setAdapter(fundAccountPagerAdapter); this.mViewPager.setClipToPadding(false); this.mViewPager.setPadding(getResources().getDimensionPixelOffset(R.dimen.f28542131166620), 0, getResources().getDimensionPixelOffset(R.dimen.f28542131166620), 0); this.mCircleIndicator.setViewPager(this.mViewPager); if (list.size() >= 10) { this.mCircleIndicator.setVisibility(8); } else { this.mCircleIndicator.setVisibility(0); } } @Override // o.InterfaceC6669cZl.vUG public final void e() { fIE fie = this.c; if (fie != null) { fie.s(); } } @Override // com.scb.phone.view.adapter.investment.onboarding.FundAccountPagerAdapter.Sts public final void e(int i) { this.buttonNext.setEnabled(true); } @OnClick public void onNextButtonClick() { PL pl2; C3700bEC c3700bEC = this.fundSelectAccountPresenter; int i = this.d.a; List list = c3700bEC.b; if (list == null || list.isEmpty() || (pl2 = c3700bEC.b.get(i)) == null) { return; } if (c3700bEC.f != 0) { c3700bEC.f.y(); } S s = new S(); s.a = pl2.a; c3700bEC.d.e(s); C2188aZr c2188aZr = c3700bEC.d; c2188aZr.d(c2188aZr.i, new C3700bEC.IeS(c3700bEC)); } }