231 lines
8.0 KiB
Java
231 lines
8.0 KiB
Java
|
package com.scb.phone.view.fragment.easycash.issuer;
|
||
|
|
||
|
import android.content.Context;
|
||
|
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 androidx.recyclerview.widget.LinearLayoutManager;
|
||
|
import androidx.recyclerview.widget.RecyclerView;
|
||
|
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.adapter.easycash.LendingIssuerAdapter;
|
||
|
import com.scb.phone.view.custom.RectangleRelativeLayout;
|
||
|
import com.scb.phone.view.custom.common.CustomDialog;
|
||
|
import com.scb.phone.view.fragment.easycash.EasycashContactInformationFragment;
|
||
|
import com.scb.phone.view.fragment.easycash.issuer.EasycashIssuerLandingFragment;
|
||
|
import java.util.List;
|
||
|
import o.C0649Li;
|
||
|
import o.C0690Mh;
|
||
|
import o.C0693Mj;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC1903aRj;
|
||
|
import o.InterfaceC6621cYR;
|
||
|
import o.Lld;
|
||
|
import o.aWO;
|
||
|
import o.gjJ;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class EasycashIssuerLandingFragment extends Hilt_EasycashIssuerLandingFragment implements InterfaceC6621cYR.SWS {
|
||
|
|
||
|
@BindView
|
||
|
Button addIssuerButton;
|
||
|
private InterfaceC1903aRj d;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public aWO easycashIssuerLandingPresenter;
|
||
|
|
||
|
@BindView
|
||
|
RectangleRelativeLayout issuerErrorCard;
|
||
|
|
||
|
@BindView
|
||
|
public RecyclerView issuerRecyclerView;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public Lld tracker;
|
||
|
|
||
|
@Override // o.InterfaceC9713dpA.HBt
|
||
|
public boolean p() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9713dpA.HBt
|
||
|
public final int t() {
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
boolean z = false;
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559601, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
this.easycashIssuerLandingPresenter.e((aWO) this);
|
||
|
aWO awo = this.easycashIssuerLandingPresenter;
|
||
|
InterfaceC1903aRj interfaceC1903aRj = this.d;
|
||
|
String e = interfaceC1903aRj != null ? interfaceC1903aRj.e() : null;
|
||
|
if (getArguments() != null && getArguments().getBoolean("IS_HML_ISSUER_FLAG", false)) {
|
||
|
z = true;
|
||
|
}
|
||
|
awo.d(e, z);
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC6621cYR.SWS
|
||
|
public final void d(boolean z) {
|
||
|
this.addIssuerButton.setEnabled(z);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC6621cYR.SWS
|
||
|
public final void b(List<C0649Li> list) {
|
||
|
this.issuerErrorCard.setVisibility(8);
|
||
|
this.issuerRecyclerView.setVisibility(0);
|
||
|
getContext();
|
||
|
this.issuerRecyclerView.setLayoutManager(new LinearLayoutManager(1, false));
|
||
|
this.issuerRecyclerView.setNestedScrollingEnabled(false);
|
||
|
this.issuerRecyclerView.setAdapter(new LendingIssuerAdapter(list, new LendingIssuerAdapter.Sts(this) { // from class: o.eVz
|
||
|
private EasycashIssuerLandingFragment b;
|
||
|
|
||
|
@Override // com.scb.phone.view.adapter.easycash.LendingIssuerAdapter.Sts
|
||
|
public final void e(String str) {
|
||
|
EasycashIssuerLandingFragment.d(this.b, str);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
}));
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC6621cYR.SWS
|
||
|
public final void e() {
|
||
|
C0693Mj c0693Mj = new C0693Mj();
|
||
|
c0693Mj.c = getString(R.string.error_generic_resource);
|
||
|
C0690Mh c0690Mh = new C0690Mh();
|
||
|
c0690Mh.e = C0690Mh.IeS.JUST_DISMISS;
|
||
|
c0690Mh.b = getString(R.string.ok);
|
||
|
c0693Mj.e = c0690Mh;
|
||
|
e(c0693Mj);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC6621cYR.SWS
|
||
|
public final void d() {
|
||
|
this.issuerErrorCard.setVisibility(0);
|
||
|
}
|
||
|
|
||
|
protected void c(String str) {
|
||
|
this.easycashIssuerLandingPresenter.d(str, this.d.e());
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC6621cYR.SWS
|
||
|
public final void c() {
|
||
|
aWO awo = this.easycashIssuerLandingPresenter;
|
||
|
InterfaceC1903aRj interfaceC1903aRj = this.d;
|
||
|
String e = interfaceC1903aRj != null ? interfaceC1903aRj.e() : null;
|
||
|
boolean z = false;
|
||
|
if (getArguments() != null && getArguments().getBoolean("IS_HML_ISSUER_FLAG", false)) {
|
||
|
z = true;
|
||
|
}
|
||
|
awo.d(e, z);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@OnClick
|
||
|
public void onIssuerErrorClick() {
|
||
|
this.issuerErrorCard.setVisibility(8);
|
||
|
c();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@OnClick
|
||
|
public void addIssuerClick() {
|
||
|
i();
|
||
|
}
|
||
|
|
||
|
protected void i() {
|
||
|
this.k.e(this, new EasycashIssuerInputFragment());
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@OnClick
|
||
|
public void nextButtonClick() {
|
||
|
f();
|
||
|
}
|
||
|
|
||
|
protected void f() {
|
||
|
this.easycashIssuerLandingPresenter.d.e.b();
|
||
|
if (this.d != null && this.issuerRecyclerView.g != null) {
|
||
|
this.tracker.j(this.d.j());
|
||
|
this.tracker.b(this.issuerRecyclerView.g.getItemCount() > 0);
|
||
|
Lld lld = this.tracker;
|
||
|
if (getActivity() != null) {
|
||
|
lld.c(((BaseActivity) getActivity()).scbAnalytics, "apply_loan_issuers");
|
||
|
}
|
||
|
}
|
||
|
this.k.e(this, EasycashContactInformationFragment.E());
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9713dpA.HBt
|
||
|
public final String q() {
|
||
|
return getString(R.string.occupation_info_title);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.scb.phone.view.fragment.easycash.issuer.Hilt_EasycashIssuerLandingFragment, com.scb.phone.view.fragment.etb.BreadcrumbFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onAttach(Context context) {
|
||
|
super.onAttach(context);
|
||
|
if (context instanceof InterfaceC1903aRj) {
|
||
|
this.d = (InterfaceC1903aRj) context;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onDestroy() {
|
||
|
this.tracker = null;
|
||
|
this.d = null;
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void a(EasycashIssuerLandingFragment easycashIssuerLandingFragment, String str) {
|
||
|
easycashIssuerLandingFragment.issuerRecyclerView.setVisibility(8);
|
||
|
easycashIssuerLandingFragment.c(str);
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void d(final EasycashIssuerLandingFragment easycashIssuerLandingFragment, final String str) {
|
||
|
CustomDialog b = CustomDialog.b(easycashIssuerLandingFragment.getContext());
|
||
|
String string = easycashIssuerLandingFragment.getString(R.string.delete_title_dialog);
|
||
|
if (gjJ.a(string)) {
|
||
|
b.mTitleTextView.setVisibility(0);
|
||
|
b.mTitleTextView.setText(string);
|
||
|
}
|
||
|
String string2 = easycashIssuerLandingFragment.getString(R.string.delete_text_dialog);
|
||
|
if (gjJ.a(string2)) {
|
||
|
b.mTextTextView.setVisibility(0);
|
||
|
b.mTextTextView.setText(string2);
|
||
|
}
|
||
|
((CustomDialog) CustomDialog.e(new Object[]{b.aoT_(R.string.delete_button, new DialogInterface.OnClickListener(easycashIssuerLandingFragment, str) { // from class: o.eVv
|
||
|
private EasycashIssuerLandingFragment a;
|
||
|
private String d;
|
||
|
|
||
|
@Override // android.content.DialogInterface.OnClickListener
|
||
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
||
|
EasycashIssuerLandingFragment.a(this.a, this.d);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = easycashIssuerLandingFragment;
|
||
|
this.d = str;
|
||
|
}
|
||
|
}), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.eVC
|
||
|
@Override // android.content.DialogInterface.OnClickListener
|
||
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
||
|
dialogInterface.dismiss();
|
||
|
}
|
||
|
}})).show();
|
||
|
}
|
||
|
}
|