what-the-bank/sources/com/scb/phone/view/fragment/deposit/DepositMoreInfoFragment.java

302 lines
9.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.deposit;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.CustomHorizontalProgressBar;
import java.util.HashMap;
import o.AbstractC0570Js;
import o.C0573Jt;
import o.C0574Ju;
import o.C0578Jx;
import o.C10457eEr;
import o.C1773aNy;
import o.InterfaceC13391fZD;
import o.JB;
import o.cYP;
import o.fJM;
import o.nMh;
/* loaded from: classes5.dex */
public class DepositMoreInfoFragment extends Hilt_DepositMoreInfoFragment implements cYP.LWm {
public IeS c;
public HashMap<String, AbstractC0570Js> d;
@InterfaceC13391fZD
public C1773aNy depositMoreInfoPresenter;
@BindView
CustomHorizontalProgressBar mCustomProgressBarOverdraftStatus;
@BindView
public ImageView mImageIconExpandMore;
@BindView
ViewGroup mLayoutCollapsed;
@BindView
public ViewGroup mLayoutExpanded;
@BindView
public LinearLayout mLayoutOverdraftStatus;
@BindView
public TextView mTenorTitle;
@BindView
TextView mTextAccountBalance;
@BindView
TextView mTextAccountName;
@BindView
TextView mTextAvailableBalance;
@BindView
TextView mTextDepositAmount;
@BindView
TextView mTextInterestAccrued;
@BindView
TextView mTextInterestAccruedTitle;
@BindView
TextView mTextOverdraftInterestAccruedTitle;
@BindView
TextView mTextOverdraftLimit;
@BindView
TextView mTextOverdraftLimitUsed;
@BindView
public TextView mTextProductName;
@BindView
public TextView mTextProductType;
@BindView
public TextView mTextTenor;
@BindView
TextView mTextTransferOtherBankAccounts;
@BindView
TextView mTextTransferOtherScbAccounts;
@BindView
TextView mTextTransferOwnScbAccounts;
@BindView
TextView mTextTransferPromptPay;
@BindView
View mViewDepositAmountKey;
@BindView
ViewGroup mViewGroupBalance;
@BindView
ViewGroup mViewGroupInterestAccrued;
@BindView
ViewGroup mViewGroupOverdraftLimit;
@BindView
ViewGroup mViewGroupTenorAndDepositAmount;
@BindView
ViewGroup mViewGroupTransferLimits;
@BindView
public Button moreServices;
/* loaded from: classes5.dex */
public interface IeS {
void f();
}
@Override // androidx.fragment.app.Fragment
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.depositMoreInfoPresenter.e((C1773aNy) this);
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559559, viewGroup, false);
ButterKnife.c(this, inflate);
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
C1773aNy c1773aNy = this.depositMoreInfoPresenter;
if (c1773aNy != null) {
c1773aNy.w_();
}
super.onDestroy();
}
@OnClick
public void onLayoutCollapsedClick() {
this.depositMoreInfoPresenter.a();
}
@Override // o.cYP.LWm
public final void a(AbstractC0570Js abstractC0570Js) {
if (this.d == null) {
this.d = new HashMap<>();
}
this.d.put(abstractC0570Js.m, abstractC0570Js);
if (abstractC0570Js instanceof JB) {
JB jb = (JB) abstractC0570Js;
this.mViewGroupTenorAndDepositAmount.setVisibility(8);
this.mViewGroupBalance.setVisibility(8);
b(false);
b(8);
c(8);
this.mViewGroupBalance.setVisibility(0);
this.mViewGroupTransferLimits.setVisibility(0);
this.mViewGroupInterestAccrued.setVisibility(0);
b(false);
this.mTextAccountName.setText(jb.k);
this.mTextAccountBalance.setText(jb.a);
this.mTextAvailableBalance.setText(jb.d);
this.mTextInterestAccrued.setText(jb.g);
this.mTextTransferOwnScbAccounts.setText(jb.f);
this.mTextTransferOtherScbAccounts.setText(jb.i);
this.mTextTransferOtherBankAccounts.setText(jb.c);
this.mTextTransferPromptPay.setText(jb.b);
return;
}
if (abstractC0570Js instanceof C0574Ju) {
C0574Ju c0574Ju = (C0574Ju) abstractC0570Js;
this.mViewGroupTenorAndDepositAmount.setVisibility(8);
this.mViewGroupBalance.setVisibility(8);
b(false);
b(8);
this.mViewGroupBalance.setVisibility(8);
this.mViewGroupTransferLimits.setVisibility(8);
this.mViewGroupInterestAccrued.setVisibility(8);
b(false);
c(0);
this.mLayoutOverdraftStatus.setVisibility(c0574Ju.j ? 0 : 8);
this.mCustomProgressBarOverdraftStatus.setProgressBar(c0574Ju.n);
this.mCustomProgressBarOverdraftStatus.setTotalValue(c0574Ju.h);
this.mCustomProgressBarOverdraftStatus.setUsedValue(c0574Ju.f8231o);
this.mCustomProgressBarOverdraftStatus.setAvailableValue(c0574Ju.d);
this.mCustomProgressBarOverdraftStatus.setUsedValueColor(nMh.getColor(requireContext(), c0574Ju.l));
this.mTextAccountName.setText(c0574Ju.k);
this.mTextAccountBalance.setText(c0574Ju.a);
this.mTextAvailableBalance.setText(c0574Ju.d);
this.mTextOverdraftLimit.setText(c0574Ju.h);
this.mTextOverdraftLimitUsed.setText(c0574Ju.f8231o);
this.mTextInterestAccrued.setText(c0574Ju.g);
this.mTextTransferOwnScbAccounts.setText(c0574Ju.f);
this.mTextTransferOtherScbAccounts.setText(c0574Ju.i);
this.mTextTransferOtherBankAccounts.setText(c0574Ju.c);
this.mTextTransferPromptPay.setText(c0574Ju.b);
return;
}
if (abstractC0570Js instanceof C0573Jt) {
C0573Jt c0573Jt = (C0573Jt) abstractC0570Js;
b(8);
this.mViewGroupBalance.setVisibility(8);
this.mViewGroupTransferLimits.setVisibility(8);
this.mViewGroupInterestAccrued.setVisibility(8);
b(false);
c(8);
this.mViewGroupTenorAndDepositAmount.setVisibility(0);
this.mViewGroupBalance.setVisibility(0);
b(false);
this.mTextAccountName.setText(c0573Jt.k);
this.mTextAccountBalance.setText(c0573Jt.c);
this.mTextAvailableBalance.setText(c0573Jt.b);
this.mTextTenor.setText(c0573Jt.d);
return;
}
if (abstractC0570Js instanceof C0578Jx) {
C0578Jx c0578Jx = (C0578Jx) abstractC0570Js;
this.mViewGroupBalance.setVisibility(0);
this.mViewGroupTransferLimits.setVisibility(0);
this.mViewGroupInterestAccrued.setVisibility(0);
b(false);
c(8);
this.mViewGroupTenorAndDepositAmount.setVisibility(8);
this.mViewGroupBalance.setVisibility(8);
b(false);
b(0);
this.mTextAccountName.setText(c0578Jx.k);
this.mTextAccountBalance.setText(c0578Jx.d);
this.mTextAvailableBalance.setText(c0578Jx.c);
this.mTextTenor.setText(c0578Jx.g);
this.mTextDepositAmount.setText(c0578Jx.a);
this.mTextInterestAccrued.setText(c0578Jx.b);
}
}
@Override // o.cYP.LWm
public final void d(AbstractC0570Js abstractC0570Js) {
C10457eEr.aqd_(this, new Intent("com.scb.phone.ACTION_MORE_INFO_UPDATE").putExtra("com.scb.phone.EXTRA_MORE_INFO", abstractC0570Js));
}
@OnClick
public void onExportStatementButtonClick() {
IeS ieS = this.c;
if (ieS != null) {
ieS.f();
}
}
private void c(int i) {
this.mLayoutOverdraftStatus.setVisibility(i);
this.mViewGroupBalance.setVisibility(i);
this.mViewGroupTransferLimits.setVisibility(i);
this.mViewGroupOverdraftLimit.setVisibility(i);
this.mViewGroupInterestAccrued.setVisibility(i);
b(true);
}
private void b(int i) {
this.mViewGroupTenorAndDepositAmount.setVisibility(i);
this.mTextDepositAmount.setVisibility(i);
this.mViewDepositAmountKey.setVisibility(i);
this.mViewGroupBalance.setVisibility(i);
this.mViewGroupInterestAccrued.setVisibility(i);
b(false);
}
private void b(boolean z) {
if (z) {
this.mTextOverdraftInterestAccruedTitle.setVisibility(0);
this.mTextInterestAccruedTitle.setVisibility(8);
} else {
this.mTextOverdraftInterestAccruedTitle.setVisibility(8);
this.mTextInterestAccruedTitle.setVisibility(0);
}
}
@Override // o.cYP.LWm
public final void c(AbstractC0570Js abstractC0570Js) {
abstractC0570Js.q = !abstractC0570Js.q;
fJM.b(this.mImageIconExpandMore);
if (this.mLayoutExpanded.getVisibility() == 8) {
fJM.e(this.mLayoutExpanded);
} else {
fJM.d(this.mLayoutExpanded);
}
}
}