what-the-bank/sources/com/scb/phone/view/custom/investment/CustomNewFundsActions.java

216 lines
7.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.investment;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.appcompat.widget.AppCompatButton;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.custom.investment.CustomNewFundsActions;
import o.C14957gcv;
import o.InterfaceC12848fIw;
import o.InterfaceC13391fZD;
/* loaded from: classes5.dex */
public final class CustomNewFundsActions extends FrameLayout {
@BindView
public AppCompatButton btFundPurchase;
@BindView
public AppCompatButton btFundRedeem;
@BindView
public AppCompatButton btFundSwitch;
@BindView
public AppCompatButton btFundTransactions;
private InterfaceC12848fIw d;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
@InterfaceC13391fZD
public CustomNewFundsActions(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
C14957gcv.e(context, "");
Object systemService = context.getSystemService("layout_inflater");
C14957gcv.d(systemService, "");
((LayoutInflater) systemService).inflate(R.layout.2131559282, (ViewGroup) this, true);
ButterKnife.c(this);
AppCompatButton appCompatButton = this.btFundPurchase;
AppCompatButton appCompatButton2 = null;
if (appCompatButton == null) {
C14957gcv.a("");
appCompatButton = null;
}
final String str = "BUTTON_PURCHASE";
appCompatButton.setOnClickListener(new View.OnClickListener(this, str) { // from class: o.eDl
private CustomNewFundsActions a;
private String c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
CustomNewFundsActions.b(this.a, this.c);
}
{
this.a = this;
this.c = str;
}
});
AppCompatButton appCompatButton3 = this.btFundRedeem;
if (appCompatButton3 == null) {
C14957gcv.a("");
appCompatButton3 = null;
}
final String str2 = "BUTTON_REDEEM";
appCompatButton3.setOnClickListener(new View.OnClickListener(this, str2) { // from class: o.eDl
private CustomNewFundsActions a;
private String c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
CustomNewFundsActions.b(this.a, this.c);
}
{
this.a = this;
this.c = str2;
}
});
AppCompatButton appCompatButton4 = this.btFundSwitch;
if (appCompatButton4 == null) {
C14957gcv.a("");
appCompatButton4 = null;
}
final String str3 = "BUTTON_SWITCH";
appCompatButton4.setOnClickListener(new View.OnClickListener(this, str3) { // from class: o.eDl
private CustomNewFundsActions a;
private String c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
CustomNewFundsActions.b(this.a, this.c);
}
{
this.a = this;
this.c = str3;
}
});
AppCompatButton appCompatButton5 = this.btFundTransactions;
if (appCompatButton5 != null) {
appCompatButton2 = appCompatButton5;
} else {
C14957gcv.a("");
}
final String str4 = "BUTTON_TRANSACTIONS";
appCompatButton2.setOnClickListener(new View.OnClickListener(this, str4) { // from class: o.eDl
private CustomNewFundsActions a;
private String c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
CustomNewFundsActions.b(this.a, this.c);
}
{
this.a = this;
this.c = str4;
}
});
}
public final void setButtonEnabled(String str, boolean z) {
AppCompatButton appCompatButton;
C14957gcv.e(str, "");
AppCompatButton appCompatButton2 = null;
switch (str.hashCode()) {
case -1477774519:
if (str.equals("BUTTON_REDEEM")) {
appCompatButton = this.btFundRedeem;
if (appCompatButton == null) {
C14957gcv.a("");
break;
}
appCompatButton2 = appCompatButton;
break;
}
break;
case -1432358687:
if (str.equals("BUTTON_SWITCH")) {
appCompatButton = this.btFundSwitch;
if (appCompatButton == null) {
C14957gcv.a("");
break;
}
appCompatButton2 = appCompatButton;
break;
}
break;
case -747110078:
if (str.equals("BUTTON_TRANSACTIONS")) {
appCompatButton = this.btFundTransactions;
if (appCompatButton == null) {
C14957gcv.a("");
break;
}
appCompatButton2 = appCompatButton;
break;
}
break;
case -278559890:
if (str.equals("BUTTON_PURCHASE")) {
appCompatButton = this.btFundPurchase;
if (appCompatButton == null) {
C14957gcv.a("");
break;
}
appCompatButton2 = appCompatButton;
break;
}
break;
}
if (appCompatButton2 != null) {
appCompatButton2.setEnabled(z);
}
}
public static /* synthetic */ void b(CustomNewFundsActions customNewFundsActions, String str) {
C14957gcv.e(customNewFundsActions, "");
C14957gcv.e(str, "");
InterfaceC12848fIw interfaceC12848fIw = customNewFundsActions.d;
if (interfaceC12848fIw != null) {
interfaceC12848fIw.d(str);
}
}
public final void setOnFundsActionsClickListener(InterfaceC12848fIw interfaceC12848fIw) {
C14957gcv.e(interfaceC12848fIw, "");
this.d = interfaceC12848fIw;
}
public final void setBtFundTransactions(AppCompatButton appCompatButton) {
C14957gcv.e(appCompatButton, "");
this.btFundTransactions = appCompatButton;
}
public final void setBtFundSwitch(AppCompatButton appCompatButton) {
C14957gcv.e(appCompatButton, "");
this.btFundSwitch = appCompatButton;
}
public final void setBtFundRedeem(AppCompatButton appCompatButton) {
C14957gcv.e(appCompatButton, "");
this.btFundRedeem = appCompatButton;
}
public final void setBtFundPurchase(AppCompatButton appCompatButton) {
C14957gcv.e(appCompatButton, "");
this.btFundPurchase = appCompatButton;
}
}