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

247 lines
8.3 KiB
Java

package com.scb.phone.view.fragment.transferandpay;
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 butterknife.BindView;
import butterknife.ButterKnife;
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.BaseFragment;
import o.C0690Mh;
import o.C1019Twi;
import o.C10457eEr;
import o.C12523ezn;
import o.C14957gcv;
import o.C16903sI;
import o.C6182cLW;
import o.InterfaceC13391fZD;
import o.InterfaceC9010dbe;
import o.ZI;
import o.qhK;
import o.yRS;
/* loaded from: classes5.dex */
public final class AddFavoriteTransferTargetTabFragment extends Hilt_AddFavoriteTransferTargetTabFragment implements InterfaceC9010dbe.LWm {
public static final LWm c = new LWm(0);
C12523ezn d;
@BindView
public TabLayout mTabLayout;
@BindView
public FragmentWrapContentViewPager mTabPager;
@InterfaceC13391fZD
public C6182cLW presenter;
/* loaded from: classes5.dex */
public static final class LWm {
private LWm() {
}
public /* synthetic */ LWm(byte b) {
this();
}
}
@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);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
String str;
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
C6182cLW c6182cLW = this.presenter;
C6182cLW c6182cLW2 = null;
if (c6182cLW == null) {
C14957gcv.a("");
c6182cLW = null;
}
c6182cLW.e((C6182cLW) this);
C6182cLW c6182cLW3 = this.presenter;
if (c6182cLW3 == null) {
C14957gcv.a("");
c6182cLW3 = null;
}
c6182cLW3.d = c6182cLW3.e.a.n();
C6182cLW c6182cLW4 = this.presenter;
if (c6182cLW4 == null) {
C14957gcv.a("");
c6182cLW4 = null;
}
C1019Twi c1019Twi = c6182cLW4.d;
if (c1019Twi != null) {
str = c1019Twi.z;
C14957gcv.c((Object) str, "");
} else {
str = "";
}
if (c6182cLW4.d != null && !C14957gcv.b((Object) qhK.OWN.name(), (Object) str)) {
if (!C14957gcv.b((Object) qhK.SCB.name(), (Object) str) && !C14957gcv.b((Object) qhK.OTHER.name(), (Object) str)) {
if (!C14957gcv.b((Object) qhK.PROMPTPAY.name(), (Object) str)) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.cMe
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9010dbe.LWm) obj).a();
}
};
if (c6182cLW4.f != 0) {
ieS.e(c6182cLW4.f);
}
} else {
final int i = 2;
ZI.IeS ieS2 = new ZI.IeS(i) { // from class: o.cMb
private int a;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9010dbe.LWm) obj).a(this.a);
}
{
this.a = i;
}
};
if (c6182cLW4.f != 0) {
ieS2.e(c6182cLW4.f);
}
}
} else {
final int i2 = 1;
ZI.IeS ieS3 = new ZI.IeS(i2) { // from class: o.cMb
private int a;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9010dbe.LWm) obj).a(this.a);
}
{
this.a = i2;
}
};
if (c6182cLW4.f != 0) {
ieS3.e(c6182cLW4.f);
}
}
} else {
final int i3 = 0;
ZI.IeS ieS4 = new ZI.IeS(i3) { // from class: o.cMb
private int a;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9010dbe.LWm) obj).a(this.a);
}
{
this.a = i3;
}
};
if (c6182cLW4.f != 0) {
ieS4.e(c6182cLW4.f);
}
}
C6182cLW c6182cLW5 = this.presenter;
if (c6182cLW5 != null) {
c6182cLW2 = c6182cLW5;
} else {
C14957gcv.a("");
}
String W = W();
C14957gcv.c((Object) W, "");
c6182cLW2.a(W);
}
@Override // o.InterfaceC9010dbe.LWm
public final void a(int i) {
Context context = getContext();
C6182cLW c6182cLW = null;
if (context != null) {
yRS childFragmentManager = getChildFragmentManager();
C14957gcv.c(childFragmentManager, "");
Bundle arguments = getArguments();
String string = arguments != null ? arguments.getString("account_extra") : null;
if (string == null) {
string = "";
}
this.d = new C12523ezn(context, childFragmentManager, string);
FragmentWrapContentViewPager fragmentWrapContentViewPager = this.mTabPager;
if (fragmentWrapContentViewPager == null) {
C14957gcv.a("");
fragmentWrapContentViewPager = null;
}
fragmentWrapContentViewPager.setAdapter(this.d);
FragmentWrapContentViewPager fragmentWrapContentViewPager2 = this.mTabPager;
if (fragmentWrapContentViewPager2 == null) {
C14957gcv.a("");
fragmentWrapContentViewPager2 = null;
}
fragmentWrapContentViewPager2.setOffscreenPageLimit(2);
TabLayout tabLayout = this.mTabLayout;
if (tabLayout == null) {
C14957gcv.a("");
tabLayout = null;
}
FragmentWrapContentViewPager fragmentWrapContentViewPager3 = this.mTabPager;
if (fragmentWrapContentViewPager3 == null) {
C14957gcv.a("");
fragmentWrapContentViewPager3 = null;
}
tabLayout.setupWithViewPager(fragmentWrapContentViewPager3);
FragmentWrapContentViewPager fragmentWrapContentViewPager4 = this.mTabPager;
if (fragmentWrapContentViewPager4 == null) {
C14957gcv.a("");
fragmentWrapContentViewPager4 = null;
}
fragmentWrapContentViewPager4.setCurrentItem(i);
C12523ezn c12523ezn = this.d;
if (c12523ezn != null) {
Bundle arguments2 = getArguments();
String string2 = arguments2 != null ? arguments2.getString("account_extra") : null;
if (string2 == null) {
string2 = "";
}
c12523ezn.a(string2);
}
}
C6182cLW c6182cLW2 = this.presenter;
if (c6182cLW2 != null) {
c6182cLW = c6182cLW2;
} else {
C14957gcv.a("");
}
String W = W();
C14957gcv.c((Object) W, "");
c6182cLW.a(W);
}
@Override // o.InterfaceC9010dbe.LWm
public final void b() {
C10457eEr.aqd_(this, new Intent("com.scb.phone/BROADCAST_BANK_RECEIVED"));
}
@Override // o.InterfaceC9010dbe.LWm
public final void a() {
C6182cLW c6182cLW = this.presenter;
if (c6182cLW == null) {
C14957gcv.a("");
c6182cLW = null;
}
C0690Mh.IeS ieS = C0690Mh.IeS.NAVIGATE_BACK;
C16903sI c16903sI = c6182cLW.j;
c6182cLW.d(c16903sI.c((String) null, c16903sI.e(R.string.operation_not_found), ieS));
}
}