what-the-bank/sources/com/scb/phone/view/fragment/investment/onboarding/FundAddressMainFragment.java

187 lines
6.8 KiB
Java

package com.scb.phone.view.fragment.investment.onboarding;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.custom.investment.onboarding.CustomFundAddressDetail;
import com.scb.phone.view.fragment.investment.onboarding.FundAddressDetailFragment;
import com.scb.phone.view.fragment.investment.onboarding.FundAddressMainFragment;
import o.C3687bDo;
import o.InterfaceC13391fZD;
import o.InterfaceC6669cZl;
import o.SP;
import o.fIE;
/* loaded from: classes5.dex */
public class FundAddressMainFragment extends Hilt_FundAddressMainFragment implements InterfaceC6669cZl.HBt {
@BindView
Button buttonNext;
private fIE c;
private fIE.HBt d;
@InterfaceC13391fZD
public C3687bDo fundAddressPresenter;
@BindView
TextView labelAddressDesc;
@BindView
TextView labelAddressTitle;
@BindView
CustomFundAddressDetail viewAddressDetailHome;
@BindView
CustomFundAddressDetail viewAddressDetailMail;
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.investment.onboarding.Hilt_FundAddressMainFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof fIE.HBt) {
this.d = (fIE.HBt) context;
}
if (context instanceof fIE) {
this.c = (fIE) context;
}
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559758, viewGroup, false);
ButterKnife.c(this, inflate);
this.fundAddressPresenter.e((C3687bDo) this);
this.buttonNext.setEnabled(false);
this.labelAddressTitle.setText(getText(R.string.mf_onboarding_address_main_registered));
this.viewAddressDetailHome.setOnCustomFundAddressDetailCompletion(new CustomFundAddressDetail.Sts(this) { // from class: com.scb.phone.view.fragment.investment.onboarding.FundAddressMainFragment.3
private FundAddressMainFragment c;
{
this.c = this;
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomFundAddressDetail.Sts
public final void c() {
this.c.fundAddressPresenter.c();
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomFundAddressDetail.Sts
public final void b(int i, boolean z) {
if (i == 1) {
this.c.fundAddressPresenter.a(z);
}
}
});
this.viewAddressDetailMail.setOnCustomFundAddressDetailCompletion(new CustomFundAddressDetail.Sts(this) { // from class: com.scb.phone.view.fragment.investment.onboarding.FundAddressMainFragment.5
private FundAddressMainFragment b;
{
this.b = this;
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomFundAddressDetail.Sts
public final void c() {
this.b.fundAddressPresenter.b();
}
@Override // com.scb.phone.view.custom.investment.onboarding.CustomFundAddressDetail.Sts
public final void b(int i, boolean z) {
if (i == 1) {
this.b.fundAddressPresenter.c(z);
} else if (i == 2) {
this.b.fundAddressPresenter.d(z);
}
}
});
this.fundAddressPresenter.d();
v("mfonboard_addressinfo");
return inflate;
}
@Override // o.InterfaceC6669cZl.HBt
public final void b(SP sp) {
FundAddressDetailFragment e = FundAddressDetailFragment.e(sp, 0, this.viewAddressDetailHome.checkbox1.isChecked(), this.viewAddressDetailMail.checkbox1.isChecked(), this.viewAddressDetailMail.checkbox2.isChecked());
e.d = new FundAddressDetailFragment.RVV(this) { // from class: o.fho
private FundAddressMainFragment a;
@Override // com.scb.phone.view.fragment.investment.onboarding.FundAddressDetailFragment.RVV
public final void b() {
this.a.fundAddressPresenter.d();
}
{
this.a = this;
}
};
e.g = getString(R.string.mf_onboarding_address_detail_home);
this.d.a(e);
}
@Override // o.InterfaceC6669cZl.HBt
public final void c(SP sp) {
FundAddressDetailFragment e = FundAddressDetailFragment.e(sp, 3, this.viewAddressDetailHome.checkbox1.isChecked(), this.viewAddressDetailMail.checkbox1.isChecked(), this.viewAddressDetailMail.checkbox2.isChecked());
e.d = new FundAddressDetailFragment.RVV(this) { // from class: o.fhq
private FundAddressMainFragment d;
@Override // com.scb.phone.view.fragment.investment.onboarding.FundAddressDetailFragment.RVV
public final void b() {
this.d.fundAddressPresenter.d();
}
{
this.d = this;
}
};
e.g = getString(R.string.mf_onboarding_address_detail_mail);
this.d.a(e);
}
@OnClick
public void onClickNext() {
this.fundAddressPresenter.c(this.viewAddressDetailHome.checkbox1.isChecked(), this.viewAddressDetailMail.checkbox1.isChecked(), this.viewAddressDetailMail.checkbox2.isChecked());
}
@Override // o.InterfaceC6669cZl.HBt
public final void d(String str, String str2, String str3, boolean z, boolean z2, boolean z3, boolean z4) {
this.labelAddressDesc.setText(str);
this.viewAddressDetailHome.setDescriptionText(str2);
this.viewAddressDetailMail.setDescriptionText(str3);
if (TextUtils.isEmpty(str2)) {
this.viewAddressDetailMail.setCheckbox2Visibility(8);
} else {
this.viewAddressDetailMail.setCheckbox2Visibility(0);
}
this.viewAddressDetailHome.setCheckbox1Checked(z, z4);
this.viewAddressDetailMail.setCheckbox1Checked(z2, z4);
this.viewAddressDetailMail.setCheckbox2Checked(z3, z4);
}
@Override // o.InterfaceC6669cZl.HBt
public final void b(boolean z) {
this.buttonNext.setEnabled(z);
}
@Override // o.InterfaceC6669cZl.HBt
public final void a() {
fIE fie = this.c;
if (fie != null) {
fie.s();
}
}
@Override // o.InterfaceC6669cZl.HBt
public final void e(boolean z) {
this.viewAddressDetailMail.setCheckbox2Visibility(z ? 0 : 8);
}
}