package com.scb.phone.view.fragment.transferandpay; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.activity.transferandpay.EditFavouriteActivity; import com.scb.phone.view.activity.transferandpay.FavouriteSelectedActivity; import com.scb.phone.view.fragment.BaseFragment; import com.scb.phone.view.fragment.transferandpay.TopUpFavouriteTargetFragment; import java.util.List; import o.AbstractC1181Xh; import o.C6289cOc; import o.InterfaceC12824fIT; import o.InterfaceC13391fZD; import o.fSQ; import o.glR; /* loaded from: classes5.dex */ public class TopUpFavouriteTargetFragment extends Hilt_TopUpFavouriteTargetFragment implements InterfaceC12824fIT, View.OnClickListener { @InterfaceC13391fZD public C6289cOc topUpFavouriteTargetPresenter; @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559651, viewGroup, false); ButterKnife.c(this, inflate); this.topUpFavouriteTargetPresenter.e((C6289cOc) this); ((BaseFragment) this).b = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_HOME_ACTIVITY_REFRESH")).subscribe(new fSQ(this) { // from class: o.fDU private TopUpFavouriteTargetFragment b; @Override // o.fSQ public final void c(Object obj) { this.b.topUpFavouriteTargetPresenter.c(); } { this.b = this; } }, new fSQ() { // from class: o.fDT @Override // o.fSQ public final void c(Object obj) { guQ.a((Throwable) obj); } }); this.h = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_EDIT_FAVORITE_REFRESH")).subscribe(new fSQ(this) { // from class: o.fDW private TopUpFavouriteTargetFragment a; @Override // o.fSQ public final void c(Object obj) { TopUpFavouriteTargetFragment.axS_(this.a, (Intent) obj); } { this.a = this; } }, new fSQ() { // from class: o.fDT @Override // o.fSQ public final void c(Object obj) { guQ.a((Throwable) obj); } }); ((FavouriteTargetFragment) this).d = this; ((FavouriteTargetFragment) this).c = this; this.topUpFavouriteTargetPresenter.c(); a(getString(R.string.favorite_empty)); e(C6289cOc.c("TOPUP")); return inflate; } @Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroy() { this.topUpFavouriteTargetPresenter.w_(); super.onDestroy(); } @Override // o.InterfaceC12824fIT public final void a(int i) { this.topUpFavouriteTargetPresenter.c("TOPUP", i); Intent intent = new Intent(getContext(), (Class) FavouriteSelectedActivity.class); intent.putExtra("source", "favourite"); startActivity(intent); } @Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, o.InterfaceC9010dbe.Heg public final void d(List list) { super.d(list); u(String.format(getString(R.string.favorite), Integer.valueOf(list.size()))); } @Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment, o.InterfaceC9010dbe.Heg public final void e() { super.e(); a(getString(R.string.favorite_empty)); } @Override // android.view.View.OnClickListener public void onClick(View view) { Intent intent = new Intent(getContext(), (Class) EditFavouriteActivity.class); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE", getString(R.string.favorite_top_up_empty)); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "TOPUP"); startActivity(intent); } @Override // com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment public void onErrorViewClicked() { super.onErrorViewClicked(); this.topUpFavouriteTargetPresenter.c(); } public static /* synthetic */ void axS_(TopUpFavouriteTargetFragment topUpFavouriteTargetFragment, Intent intent) { if ("TOPUP".equals(intent.getStringExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE"))) { topUpFavouriteTargetFragment.topUpFavouriteTargetPresenter.c(); } } }