what-the-bank/sources/com/scb/phone/view/fragment/mailingaddress/MailingAddressDetailsFragme...

304 lines
9.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.mailingaddress;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.fragment.BaseFragment;
import o.AbstractC14961gcz;
import o.C0937Rx;
import o.C14957gcv;
import o.C4144bRe;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC17396wQp;
import o.InterfaceC9443djo;
import o.Kmx;
import o.ZI;
import o.fZZ;
import o.gdZ;
/* loaded from: classes5.dex */
public final class MailingAddressDetailsFragment extends Hilt_MailingAddressDetailsFragment implements InterfaceC9443djo {
public static final RVV c = new RVV(0);
@BindView
public ConstraintLayout btnCurrentAddress;
@BindView
public RadioButton btnCurrentAddressIcon;
@BindView
public RadioButton btnNewAddressIcon;
@BindView
public Button btnNext;
private Sts d;
private final InterfaceC13393fZL h;
@InterfaceC13391fZD
public C4144bRe presenter;
@BindView
public TextView tvAddressDetails;
/* loaded from: classes5.dex */
public interface Sts {
void c(String str);
void e(String str);
}
public MailingAddressDetailsFragment() {
HBt hBt = HBt.a;
C14957gcv.e(hBt, "");
this.h = new fZZ(hBt);
}
/* loaded from: classes5.dex */
public static final class RVV {
private RVV() {
}
public /* synthetic */ RVV(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
InterfaceC17396wQp activity = getActivity();
this.d = activity instanceof Sts ? (Sts) activity : null;
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559497, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
C14957gcv.c(inflate, "");
return inflate;
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onActivityCreated(Bundle bundle) {
super.onActivityCreated(bundle);
C4144bRe c4144bRe = this.presenter;
if (c4144bRe == null) {
C14957gcv.a("");
c4144bRe = null;
}
c4144bRe.e((C4144bRe) this);
Bundle arguments = getArguments();
if (arguments != null) {
String string = arguments.getString("PARCELABLE_TOKEN_ID");
String str = string;
if (!(str == null || gdZ.d((CharSequence) str))) {
c4144bRe.b = string;
ZI.IeS ieS = new ZI.IeS() { // from class: o.bRr
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9443djo) obj).y();
}
};
if (c4144bRe.f != 0) {
ieS.e(c4144bRe.f);
}
c4144bRe.a.a(new C4144bRe.HBt(c4144bRe), new C4144bRe.IeS(c4144bRe));
}
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
super.onDestroy();
C4144bRe c4144bRe = this.presenter;
if (c4144bRe == null) {
C14957gcv.a("");
c4144bRe = null;
}
c4144bRe.w_();
}
@Override // o.InterfaceC9443djo
public final void c(C0937Rx c0937Rx) {
C14957gcv.e(c0937Rx, "");
TextView textView = this.tvAddressDetails;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0937Rx.e);
}
@Override // o.InterfaceC9443djo
public final void a() {
ConstraintLayout constraintLayout = this.btnCurrentAddress;
if (constraintLayout == null) {
C14957gcv.a("");
constraintLayout = null;
}
constraintLayout.setVisibility(8);
}
@Override // o.InterfaceC9443djo
public final void e() {
Button button = this.btnNext;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setEnabled(true);
}
@Override // o.InterfaceC9443djo
public final void d(String str) {
C14957gcv.e(str, "");
Sts sts = this.d;
if (sts != null) {
sts.c(str);
}
}
@Override // o.InterfaceC9443djo
public final void c(String str) {
C14957gcv.e(str, "");
Sts sts = this.d;
if (sts != null) {
sts.e(str);
}
}
@OnClick
public final void onNextClick() {
C4144bRe c4144bRe = this.presenter;
RadioButton radioButton = null;
if (c4144bRe == null) {
C14957gcv.a("");
c4144bRe = null;
}
Boolean bool = c4144bRe.c;
String str = c4144bRe.b;
if (bool != null && str != null) {
boolean booleanValue = bool.booleanValue();
ZI.IeS ieS = new ZI.IeS() { // from class: o.bRp
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9443djo) obj).y();
}
};
if (c4144bRe.f != 0) {
ieS.e(c4144bRe.f);
}
c4144bRe.a.d(str, booleanValue, new C4144bRe.LWm(c4144bRe), new C4144bRe.Sts(c4144bRe));
}
((Kmx) this.h.e()).e("change_mailing_address");
Kmx kmx = (Kmx) this.h.e();
RadioButton radioButton2 = this.btnCurrentAddressIcon;
if (radioButton2 != null) {
radioButton = radioButton2;
} else {
C14957gcv.a("");
}
kmx.d("mailing_address_selected", radioButton.isChecked() ? "rm_address" : "add_new_address");
Kmx kmx2 = (Kmx) this.h.e();
if (getActivity() != null) {
kmx2.c(((BaseActivity) getActivity()).scbAnalytics, "change_mailing_address_address_source");
}
}
@OnClick
public final void onRadioButtonCheckChanged(View view) {
C14957gcv.e(view, "");
int id = view.getId();
C4144bRe c4144bRe = null;
if (id == R.id.radioButton_current_address) {
RadioButton radioButton = this.btnNewAddressIcon;
if (radioButton == null) {
C14957gcv.a("");
radioButton = null;
}
radioButton.setChecked(false);
RadioButton radioButton2 = this.btnCurrentAddressIcon;
if (radioButton2 == null) {
C14957gcv.a("");
radioButton2 = null;
}
radioButton2.setChecked(true);
C4144bRe c4144bRe2 = this.presenter;
if (c4144bRe2 != null) {
c4144bRe = c4144bRe2;
} else {
C14957gcv.a("");
}
c4144bRe.c = Boolean.TRUE;
ZI.IeS ieS = new ZI.IeS() { // from class: o.bRq
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9443djo) obj).e();
}
};
if (c4144bRe.f != 0) {
ieS.e(c4144bRe.f);
return;
}
return;
}
if (id == R.id.radioButton_new_address) {
RadioButton radioButton3 = this.btnNewAddressIcon;
if (radioButton3 == null) {
C14957gcv.a("");
radioButton3 = null;
}
radioButton3.setChecked(true);
RadioButton radioButton4 = this.btnCurrentAddressIcon;
if (radioButton4 == null) {
C14957gcv.a("");
radioButton4 = null;
}
radioButton4.setChecked(false);
C4144bRe c4144bRe3 = this.presenter;
if (c4144bRe3 != null) {
c4144bRe = c4144bRe3;
} else {
C14957gcv.a("");
}
c4144bRe.c = Boolean.FALSE;
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bRn
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9443djo) obj).e();
}
};
if (c4144bRe.f != 0) {
ieS2.e(c4144bRe.f);
}
}
}
/* loaded from: classes5.dex */
static final class HBt extends AbstractC14961gcz implements InterfaceC14890gbN<Kmx> {
public static final HBt a = new HBt();
@Override // o.InterfaceC14890gbN
public final /* synthetic */ Kmx invoke() {
return new Kmx();
}
HBt() {
super(0);
}
}
}