package com.scb.phone.view.fragment.debitatm; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import androidx.core.widget.NestedScrollView; import androidx.fragment.app.FragmentActivity; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.activity.BaseActivity; import com.scb.phone.view.activity.debitatm.DebitLimitOtpActivity; import com.scb.phone.view.adapter.debitatm.DebitCardEComLimitAdapter; import com.scb.phone.view.adapter.debitatm.DebitWithdrawalLimitAdapter; import com.scb.phone.view.adapter.debitatm.PurchaseWithdrawalLimitAdapter; import com.scb.phone.view.custom.common.CustomDeltaInput; import java.util.ArrayList; import o.C0917Rn; import o.C1404aDO; import o.C14957gcv; import o.EnumC8951daY; import o.InterfaceC12845fIt; import o.InterfaceC13391fZD; import o.InterfaceC9094ddI; import o.TYj; import o.YH; import o.ZI; import o.ZUN; /* loaded from: classes5.dex */ public class DebitWithdrawalLimitFragment extends Hilt_DebitWithdrawalLimitFragment implements InterfaceC9094ddI.RVV, InterfaceC12845fIt, PurchaseWithdrawalLimitAdapter.HBt, DebitWithdrawalLimitAdapter.RVV, DebitCardEComLimitAdapter.RVV { private DebitCardEComLimitAdapter c; private TYj d = new TYj(); @InterfaceC13391fZD public C1404aDO debitLimitPresenter; @BindView RecyclerView debitRecyclerView; private YH f; private C0917Rn g; private PurchaseWithdrawalLimitAdapter h; private DebitWithdrawalLimitAdapter j; @BindView LinearLayout llLayoutEcomLimit; @BindView LinearLayout llLayoutPurchaseLimit; @BindView LinearLayout llLayoutWithdrawLimit; @BindView NestedScrollView mPersonalLimitScrollView; @BindView RecyclerView purchaseRecyclerView; @BindView RecyclerView rvSpending; @InterfaceC13391fZD public SharedPreferences sharedPreferences; public static DebitWithdrawalLimitFragment d(C0917Rn c0917Rn) { DebitWithdrawalLimitFragment debitWithdrawalLimitFragment = new DebitWithdrawalLimitFragment(); Bundle bundle = new Bundle(); bundle.putParcelable("DEBIT_LIMIT_DISPLAY", c0917Rn); debitWithdrawalLimitFragment.setArguments(bundle); return debitWithdrawalLimitFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559543, viewGroup, false); ButterKnife.c(this, inflate); this.debitLimitPresenter.e((C1404aDO) this); final C0917Rn c0917Rn = (C0917Rn) getArguments().getParcelable("DEBIT_LIMIT_DISPLAY"); this.g = c0917Rn; C1404aDO c1404aDO = this.debitLimitPresenter; c1404aDO.b = c0917Rn; ZI.IeS ieS = new ZI.IeS(c0917Rn) { // from class: o.aDR private C0917Rn b; @Override // o.ZI.IeS public final void e(Object obj) { C1404aDO.b(this.b, (InterfaceC9094ddI.RVV) obj); } { this.b = c0917Rn; } }; if (c1404aDO.f != 0) { ieS.e(c1404aDO.f); } return inflate; } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroyView() { super.onDestroyView(); this.debitLimitPresenter.w_(); } @Override // o.InterfaceC9094ddI.RVV public final void c(C0917Rn c0917Rn) { this.llLayoutWithdrawLimit.setVisibility(0); ArrayList arrayList = new ArrayList(); arrayList.add(c0917Rn); DebitWithdrawalLimitAdapter debitWithdrawalLimitAdapter = new DebitWithdrawalLimitAdapter(); this.j = debitWithdrawalLimitAdapter; debitWithdrawalLimitAdapter.a = arrayList; this.j.d = this; this.j.e = this; this.debitRecyclerView.setHasFixedSize(true); this.debitRecyclerView.setAdapter(this.j); } @Override // o.InterfaceC9094ddI.RVV public final void a(C0917Rn c0917Rn) { this.llLayoutPurchaseLimit.setVisibility(0); ArrayList arrayList = new ArrayList(); arrayList.add(c0917Rn); PurchaseWithdrawalLimitAdapter purchaseWithdrawalLimitAdapter = new PurchaseWithdrawalLimitAdapter(); this.h = purchaseWithdrawalLimitAdapter; purchaseWithdrawalLimitAdapter.a = this; this.h.e = arrayList; this.h.d = this; this.purchaseRecyclerView.setHasFixedSize(true); this.purchaseRecyclerView.setAdapter(this.h); } @Override // o.InterfaceC9094ddI.RVV public final void b() { this.llLayoutEcomLimit.setVisibility(0); ArrayList arrayList = new ArrayList(); arrayList.add(this.g); DebitCardEComLimitAdapter debitCardEComLimitAdapter = new DebitCardEComLimitAdapter(); this.c = debitCardEComLimitAdapter; C14957gcv.e(this, ""); debitCardEComLimitAdapter.c = this; DebitCardEComLimitAdapter debitCardEComLimitAdapter2 = this.c; C14957gcv.e(arrayList, ""); debitCardEComLimitAdapter2.b = arrayList; DebitCardEComLimitAdapter debitCardEComLimitAdapter3 = this.c; C14957gcv.e(this, ""); debitCardEComLimitAdapter3.d = this; this.rvSpending.setHasFixedSize(true); this.rvSpending.setAdapter(this.c); } @Override // o.InterfaceC12845fIt public final void d(ZUN zun, YH yh) { this.f = yh; C1404aDO c1404aDO = this.debitLimitPresenter; zun.e = c1404aDO.e; c1404aDO.d.c.d(zun); startActivityForResult(DebitLimitOtpActivity.aaV_(getContext()), 1999); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onActivityResult(int i, int i2, Intent intent) { super.onActivityResult(i, i2, intent); if (-1 == i2) { String string = getString(R.string.limit_success_change); FragmentActivity activity = getActivity(); EnumC8951daY enumC8951daY = EnumC8951daY.SUCCESS; if (getActivity() != null) { BaseActivity.a(new Object[]{(BaseActivity) getActivity(), activity, Integer.valueOf(R.id.view_group_root), string, enumC8951daY}, 855668825, -855668822, R.id.view_group_root); } getActivity().setResult(-1); final C1404aDO c1404aDO = this.debitLimitPresenter; final YH yh = this.f; ZI.IeS ieS = new ZI.IeS(c1404aDO, yh) { // from class: o.aDU private YH a; private C1404aDO d; @Override // o.ZI.IeS public final void e(Object obj) { C1404aDO.c(this.d, this.a, (InterfaceC9094ddI.RVV) obj); } { this.d = c1404aDO; this.a = yh; } }; if (c1404aDO.f != 0) { ieS.e(c1404aDO.f); } } } @Override // o.InterfaceC12845fIt public final void k() { aN_(); } @Override // o.InterfaceC9094ddI.RVV public final void a() { this.g.k = Integer.valueOf((int) PurchaseWithdrawalLimitAdapter.LimitCustomViewHolder.d(this.h.b)); } @Override // o.InterfaceC9094ddI.RVV public final void d() { this.g.m = Integer.valueOf((int) DebitWithdrawalLimitAdapter.LimitCustomViewHolder.a(this.j.c)); } @Override // o.InterfaceC9094ddI.RVV public final void c() { C0917Rn c0917Rn = this.g; DebitCardEComLimitAdapter.LimitCustomViewHolder limitCustomViewHolder = this.c.e; Integer num = null; CustomDeltaInput customDeltaInput = null; if (limitCustomViewHolder != null) { CustomDeltaInput customDeltaInput2 = limitCustomViewHolder.limitInput; if (customDeltaInput2 != null) { customDeltaInput = customDeltaInput2; } else { C14957gcv.a(""); } num = Integer.valueOf((int) customDeltaInput.c); } c0917Rn.c = num; } @Override // o.InterfaceC9094ddI.RVV public final void j() { this.j.notifyDataSetChanged(); } @Override // o.InterfaceC9094ddI.RVV public final void i() { this.h.notifyDataSetChanged(); } @Override // o.InterfaceC9094ddI.RVV public final void e() { this.c.notifyDataSetChanged(); } @Override // com.scb.phone.view.adapter.debitatm.DebitCardEComLimitAdapter.RVV public final void h() { TYj tYj = this.d; if (getActivity() != null) { tYj.c(((BaseActivity) getActivity()).scbAnalytics, "changelimit_online_purchase"); } } @Override // com.scb.phone.view.adapter.debitatm.DebitWithdrawalLimitAdapter.RVV public final void f() { TYj tYj = this.d; if (getActivity() != null) { tYj.c(((BaseActivity) getActivity()).scbAnalytics, "changelimit_withdrawal"); } } @Override // com.scb.phone.view.adapter.debitatm.PurchaseWithdrawalLimitAdapter.HBt public final void g() { TYj tYj = this.d; if (getActivity() != null) { tYj.c(((BaseActivity) getActivity()).scbAnalytics, "changelimit_purchase"); } } }