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

240 lines
7.0 KiB
Java

package com.scb.phone.view.fragment.mailingaddress;
import android.content.Context;
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 android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.custom.mailingaddress.BulletThaiTextView;
import com.scb.phone.view.fragment.BaseFragment;
import java.util.List;
import o.C0690Mh;
import o.C0938Ry;
import o.C0942Rz;
import o.C14957gcv;
import o.C15715hv;
import o.C15968jy;
import o.InterfaceC13391fZD;
import o.InterfaceC17396wQp;
import o.InterfaceC9449dju;
import o.YTQ;
import o.ZI;
import o.bRR;
/* loaded from: classes5.dex */
public final class MailingAddressReviewFragment extends Hilt_MailingAddressReviewFragment implements InterfaceC9449dju {
public static final IeS c = new IeS(0);
@BindView
public Button btnNext;
private Sts d;
@BindView
public LinearLayout llRelatedAccount;
@BindView
public LinearLayout llRemarks;
@InterfaceC13391fZD
public bRR presenter;
@BindView
public TextView tvNewAddress;
@BindView
public TextView tvNewAddressUsage;
/* loaded from: classes5.dex */
public interface Sts {
void c(String str);
void c(C0938Ry c0938Ry);
}
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(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.2131559498, 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);
final bRR brr = this.presenter;
if (brr == null) {
C14957gcv.a("");
brr = null;
}
brr.e((bRR) this);
Bundle arguments = getArguments();
if (arguments != null) {
String string = arguments.getString("PARCELABLE_TOKEN_ID");
brr.e = string;
ZI.IeS ieS = new ZI.IeS(brr) { // from class: o.bRU
private bRR b;
@Override // o.ZI.IeS
public final void e(Object obj) {
bRR.e(this.b, (InterfaceC9449dju) obj);
}
{
this.b = brr;
}
};
if (brr.f != 0) {
ieS.e(brr.f);
}
if (string == null) {
brr.d(brr.j.c(C15715hv.tOB.error_default_title, C15715hv.tOB.error_generic_resource, new Runnable() { // from class: o.bRW
@Override // java.lang.Runnable
public final void run() {
C0690Mh.IeS.JUST_DISMISS;
}
}));
return;
}
if (brr.f != 0) {
brr.f.y();
}
C15968jy c15968jy = brr.a;
bRR.HBt hBt = new bRR.HBt(brr);
bRR.Sts sts = new bRR.Sts(brr);
C14957gcv.e(string, "");
C14957gcv.e(hBt, "");
C14957gcv.e(sts, "");
c15968jy.b(c15968jy.e, hBt, sts, new YTQ.HBt(string), new C15968jy.LWm(c15968jy));
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
super.onDestroy();
bRR brr = this.presenter;
if (brr == null) {
C14957gcv.a("");
brr = null;
}
brr.w_();
}
@Override // o.InterfaceC9449dju
public final void b() {
Button button = this.btnNext;
if (button == null) {
C14957gcv.a("");
button = null;
}
button.setEnabled(true);
}
@Override // o.InterfaceC9449dju
public final void a(List<String> list) {
C14957gcv.e(list, "");
for (String str : list) {
Context context = getContext();
if (context != null) {
LinearLayout linearLayout = this.llRemarks;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
C14957gcv.c(context, "");
BulletThaiTextView bulletThaiTextView = new BulletThaiTextView(context);
bulletThaiTextView.setText(str);
linearLayout.addView(bulletThaiTextView);
}
}
}
@Override // o.InterfaceC9449dju
public final void c(C0942Rz c0942Rz) {
C14957gcv.e(c0942Rz, "");
TextView textView = this.tvNewAddressUsage;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0942Rz.c);
TextView textView2 = this.tvNewAddress;
if (textView2 == null) {
C14957gcv.a("");
textView2 = null;
}
textView2.setText(c0942Rz.b);
for (String str : c0942Rz.d) {
Context context = getContext();
if (context != null) {
LinearLayout linearLayout = this.llRelatedAccount;
if (linearLayout == null) {
C14957gcv.a("");
linearLayout = null;
}
C14957gcv.c(context, "");
BulletThaiTextView bulletThaiTextView = new BulletThaiTextView(context);
bulletThaiTextView.setText(str);
linearLayout.addView(bulletThaiTextView);
}
}
}
@Override // o.InterfaceC9449dju
public final void a(C0938Ry c0938Ry) {
C14957gcv.e(c0938Ry, "");
Sts sts = this.d;
if (sts != null) {
sts.c(c0938Ry);
}
}
@Override // o.InterfaceC9449dju
public final void c(String str) {
C14957gcv.e(str, "");
Sts sts = this.d;
if (sts != null) {
sts.c(str);
}
}
@OnClick
public final void onNextClick() {
bRR brr = this.presenter;
if (brr == null) {
C14957gcv.a("");
brr = null;
}
if (brr.f != 0) {
brr.f.y();
}
String str = brr.e;
brr.a.e(new C15968jy.RVV(null, null, str != null ? str : ""), new bRR.LWm(brr), new bRR.IeS(brr));
}
}