what-the-bank/sources/com/scb/phone/view/fragment/ReviewCommonFragment.java

132 lines
4.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
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.components.ItemCustom;
import com.scb.phone.view.custom.common.DefaultButton;
import java.util.List;
import o.C14818gL;
import o.EM;
import o.ES;
import o.InterfaceC13391fZD;
import o.YC;
/* loaded from: classes5.dex */
public class ReviewCommonFragment extends Hilt_ReviewCommonFragment {
@BindView
TextView additionalConfirmText;
@BindView
TextView additionalInfoText;
@BindView
DefaultButton btConfirm;
@BindView
LinearLayout container;
private IeS d;
@InterfaceC13391fZD
public C14818gL factory;
@BindView
TextView tvWarningMessage;
@BindView
TextView tvWarningMessageHeader;
@BindView
LinearLayout warningMessageLayout;
/* loaded from: classes5.dex */
public interface IeS {
void h();
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559880, viewGroup, false);
ButterKnife.c(this, inflate);
ES es = (ES) getArguments().getParcelable("PURCHASE_REVIEW_DISPLAY");
if (es != null) {
a(es.a);
String str = es.d;
if (str != null) {
this.additionalInfoText.setText(str);
this.additionalInfoText.setVisibility(0);
}
String str2 = es.c;
if (str2 != null) {
this.additionalConfirmText.setText(str2);
this.additionalConfirmText.setVisibility(0);
}
if (es.e != null) {
YC yc = es.e;
this.warningMessageLayout.setVisibility(0);
this.tvWarningMessageHeader.setText(yc.e);
this.tvWarningMessage.setText(yc.c);
}
}
if (getArguments() != null && getArguments().getString("BUTTON_LABEL_EXTRA") != null) {
this.btConfirm.setText(getArguments().getString("BUTTON_LABEL_EXTRA"));
}
return inflate;
}
public static ReviewCommonFragment e(ES es) {
ReviewCommonFragment reviewCommonFragment = new ReviewCommonFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("PURCHASE_REVIEW_DISPLAY", es);
reviewCommonFragment.setArguments(bundle);
return reviewCommonFragment;
}
public static ReviewCommonFragment e(ES es, String str) {
ReviewCommonFragment reviewCommonFragment = new ReviewCommonFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("PURCHASE_REVIEW_DISPLAY", es);
bundle.putString("BUTTON_LABEL_EXTRA", str);
reviewCommonFragment.setArguments(bundle);
return reviewCommonFragment;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.scb.phone.view.fragment.Hilt_ReviewCommonFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof IeS) {
this.d = (IeS) context;
return;
}
throw new IllegalStateException("This context needs to implement the ReviewListener contract");
}
/* JADX INFO: Access modifiers changed from: protected */
public final void a(List<EM> list) {
for (EM em : list) {
ItemCustom e = this.factory.e(getContext(), em);
e.setUpWithDisplay(em);
this.container.addView(e);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
@OnClick
public void onConfirmButtonClicked() {
IeS ieS = this.d;
if (ieS != null) {
ieS.h();
}
}
}