263 lines
9.7 KiB
Java
263 lines
9.7 KiB
Java
package com.scb.phone.view.fragment.hml;
|
|
|
|
import android.content.DialogInterface;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.Button;
|
|
import android.widget.LinearLayout;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.custom.common.CustomDialog;
|
|
import com.scb.phone.view.fragment.hml.HmlEditOperatingAccountFragment;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import o.AbstractC14961gcz;
|
|
import o.AbstractC5073bmE;
|
|
import o.C14866gag;
|
|
import o.C14957gcv;
|
|
import o.C5045bld;
|
|
import o.C5372brm;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC13393fZL;
|
|
import o.InterfaceC14890gbN;
|
|
import o.InterfaceC9336dhn;
|
|
import o.ZI;
|
|
import o.fZZ;
|
|
import o.nMh;
|
|
import o.pug;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class HmlEditOperatingAccountFragment extends Hilt_HmlEditOperatingAccountFragment<C5372brm, InterfaceC9336dhn.Sts> implements InterfaceC9336dhn.Sts {
|
|
public static final LWm d = new LWm(0);
|
|
final InterfaceC13393fZL c;
|
|
|
|
@InterfaceC13391fZD
|
|
public C5372brm editPresenter;
|
|
private Button f;
|
|
private Button g;
|
|
|
|
@Override // com.scb.phone.view.fragment.hml.HmlBaseOperatingAccountFragment
|
|
public final /* synthetic */ AbstractC5073bmE h() {
|
|
return (C5372brm) this.c.e();
|
|
}
|
|
|
|
public HmlEditOperatingAccountFragment() {
|
|
HBt hBt = new HBt(this);
|
|
C14957gcv.e(hBt, "");
|
|
this.c = new fZZ(hBt);
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class LWm {
|
|
private LWm() {
|
|
}
|
|
|
|
public /* synthetic */ LWm(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
static final class HBt extends AbstractC14961gcz implements InterfaceC14890gbN<C5372brm> {
|
|
private HmlEditOperatingAccountFragment b;
|
|
|
|
@Override // o.InterfaceC14890gbN
|
|
public final /* synthetic */ C5372brm invoke() {
|
|
C5372brm c5372brm = this.b.editPresenter;
|
|
if (c5372brm == null) {
|
|
C14957gcv.a("");
|
|
c5372brm = null;
|
|
}
|
|
c5372brm.e((C5372brm) this.b);
|
|
return c5372brm;
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
HBt(HmlEditOperatingAccountFragment hmlEditOperatingAccountFragment) {
|
|
super(0);
|
|
this.b = hmlEditOperatingAccountFragment;
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.hml.HmlBaseOperatingAccountFragment, androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View onCreateView = super.onCreateView(layoutInflater, viewGroup, bundle);
|
|
C5372brm c5372brm = (C5372brm) this.c.e();
|
|
Bundle arguments = getArguments();
|
|
final C5045bld c5045bld = arguments != null ? (C5045bld) arguments.getParcelable("OPERATING_ACCOUNT_KEY") : null;
|
|
c5372brm.e = c5045bld;
|
|
if (c5045bld != null) {
|
|
ZI.IeS ieS = new ZI.IeS(c5045bld) { // from class: o.bro
|
|
private C5045bld c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C5372brm.e(this.c, (InterfaceC9336dhn.Sts) obj);
|
|
}
|
|
|
|
{
|
|
this.c = c5045bld;
|
|
}
|
|
};
|
|
if (c5372brm.f != 0) {
|
|
ieS.e(c5372brm.f);
|
|
}
|
|
}
|
|
c("p10x1_business_main_op_account_num_edit", new pug("user_type", "etb"));
|
|
return onCreateView;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.hml.HmlBaseOperatingAccountFragment
|
|
public final void c(boolean z) {
|
|
Button button = this.f;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
button.setEnabled(z);
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
static final class Sts extends AbstractC14961gcz implements InterfaceC14890gbN<C14866gag> {
|
|
private HmlEditOperatingAccountFragment a;
|
|
|
|
@Override // o.InterfaceC14890gbN
|
|
public final /* synthetic */ C14866gag invoke() {
|
|
C5372brm c5372brm = (C5372brm) this.a.c.e();
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.brp
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9336dhn.Sts) obj).ba_();
|
|
}
|
|
};
|
|
if (c5372brm.f != 0) {
|
|
ieS.e(c5372brm.f);
|
|
}
|
|
return C14866gag.c;
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
Sts(HmlEditOperatingAccountFragment hmlEditOperatingAccountFragment) {
|
|
super(0);
|
|
this.a = hmlEditOperatingAccountFragment;
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.hml.HmlBaseOperatingAccountFragment
|
|
public final List<Button> d() {
|
|
String string = getString(R.string.hml_business_operating_account_remove);
|
|
C14957gcv.c((Object) string, "");
|
|
Button atp_ = atp_(string, R.color.f13682131100876, R.drawable.bg_button_outline, new Sts(this));
|
|
this.g = atp_;
|
|
atp_.setEnabled(true);
|
|
String string2 = getString(R.string.hml_business_operating_account_save);
|
|
C14957gcv.c((Object) string2, "");
|
|
this.f = atp_(string2, R.color.f14042131100912, R.drawable.bg_button_primary, new RVV(this));
|
|
Button[] buttonArr = new Button[2];
|
|
Button button = this.g;
|
|
Button button2 = null;
|
|
if (button == null) {
|
|
C14957gcv.a("");
|
|
button = null;
|
|
}
|
|
buttonArr[0] = button;
|
|
Button button3 = this.f;
|
|
if (button3 == null) {
|
|
C14957gcv.a("");
|
|
} else {
|
|
button2 = button3;
|
|
}
|
|
buttonArr[1] = button2;
|
|
C14957gcv.e(buttonArr, "");
|
|
C14957gcv.e(buttonArr, "");
|
|
List<Button> asList = Arrays.asList(buttonArr);
|
|
C14957gcv.c(asList, "");
|
|
return asList;
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
static final class RVV extends AbstractC14961gcz implements InterfaceC14890gbN<C14866gag> {
|
|
private HmlEditOperatingAccountFragment a;
|
|
|
|
@Override // o.InterfaceC14890gbN
|
|
public final /* synthetic */ C14866gag invoke() {
|
|
((C5372brm) this.a.c.e()).a();
|
|
return C14866gag.c;
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
RVV(HmlEditOperatingAccountFragment hmlEditOperatingAccountFragment) {
|
|
super(0);
|
|
this.a = hmlEditOperatingAccountFragment;
|
|
}
|
|
}
|
|
|
|
private final Button atp_(String str, int i, int i2, final InterfaceC14890gbN<C14866gag> interfaceC14890gbN) {
|
|
Button button = new Button(getContext());
|
|
button.setOnClickListener(new View.OnClickListener(interfaceC14890gbN) { // from class: o.fca
|
|
private InterfaceC14890gbN c;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
HmlEditOperatingAccountFragment.c(this.c);
|
|
}
|
|
|
|
{
|
|
this.c = interfaceC14890gbN;
|
|
}
|
|
});
|
|
button.setTextColor(nMh.getColor(button.getContext(), i));
|
|
button.setText(str);
|
|
button.setAllCaps(false);
|
|
button.setEnabled(false);
|
|
button.setBackground(nMh.getDrawable(button.getContext(), i2));
|
|
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, -2, g());
|
|
int dimensionPixelSize = button.getResources().getDimensionPixelSize(R.dimen.f16672131165433);
|
|
layoutParams.setMargins(dimensionPixelSize, dimensionPixelSize, dimensionPixelSize, dimensionPixelSize);
|
|
button.setLayoutParams(layoutParams);
|
|
return button;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
c("p10x1_business_main_operating_account_number_edit", new pug("user_type", "etb"));
|
|
}
|
|
|
|
@Override // o.InterfaceC9336dhn.Sts
|
|
public final void ba_() {
|
|
if (getContext() != null) {
|
|
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.hml_main_operating_acc_remove_acc_title).d(R.string.hml_main_operating_acc_remove_acc_description).aoT_(R.string.hml_main_operating_acc_remove_acc_confirm_button, new DialogInterface.OnClickListener(this) { // from class: o.fcb
|
|
private HmlEditOperatingAccountFragment d;
|
|
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
HmlEditOperatingAccountFragment.atn_(this.d, dialogInterface);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
}), Integer.valueOf(R.string.hml_occupation_back_dialog_cancel), new DialogInterface.OnClickListener() { // from class: o.fcg
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
dialogInterface.dismiss();
|
|
}
|
|
}})).show();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void atn_(HmlEditOperatingAccountFragment hmlEditOperatingAccountFragment, DialogInterface dialogInterface) {
|
|
C14957gcv.e(hmlEditOperatingAccountFragment, "");
|
|
((C5372brm) hmlEditOperatingAccountFragment.c.e()).d();
|
|
dialogInterface.dismiss();
|
|
}
|
|
|
|
public static /* synthetic */ void c(InterfaceC14890gbN interfaceC14890gbN) {
|
|
C14957gcv.e(interfaceC14890gbN, "");
|
|
interfaceC14890gbN.invoke();
|
|
}
|
|
}
|