package com.scb.phone.view.fragment.bulktransfer; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.core.view.ViewCompat; import androidx.fragment.app.FragmentActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.Optional; import butterknife.Unbinder; import com.scb.phone.R; import com.scb.phone.view.activity.BaseActivity; import com.scb.phone.view.activity.HomeActivity; import com.scb.phone.view.adapter.bulktransfer.BulkTransferSuccessAdapter; import com.scb.phone.view.adapter.bulktransfer.BulkTransferSummaryScreenshotAdapter; import com.scb.phone.view.custom.bulktransfer.CustomEffectiveDate; import com.scb.phone.view.custom.common.CustomDialog; import com.scb.phone.view.custom.common.DefaultButton; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayTarget; import com.scb.phone.view.fragment.bulktransfer.BulkTransferSuccessFragment; import java.util.ArrayList; import java.util.Collection; import java.util.List; import o.AbstractC13163fSk; import o.C10579eIb; import o.C13417fZt; import o.C2742akO; import o.C6204cLu; import o.EnumC8951daY; import o.FN; import o.FS; import o.FW; import o.InterfaceC1244Ytw; import o.InterfaceC13391fZD; import o.InterfaceC15577gud; import o.InterfaceC6636cYn; import o.PRA; import o.YKU; import o.ZI; import o.fKR; import o.fKY; import o.fRR; import o.guQ; import o.pyT; import o.wRi; import o.wxK; /* loaded from: classes5.dex */ public class BulkTransferSuccessFragment extends Hilt_BulkTransferSuccessFragment implements InterfaceC6636cYn.tOB { @InterfaceC13391fZD public C2742akO bulkTransferSuccessPresenter; @BindView protected LinearLayout buttonsContainer; @BindView protected TextView conclusionTitle; @BindView protected CustomTransferAndPaySource from; @BindView protected View fromViewSeparator; @BindView protected View fullDisclaimerViewSeparator; @BindView protected View fullFromViewSeparator; @BindView protected TextView groupId; @BindView protected TextView groupName; @BindView protected TextView paymentDate; @BindView protected RecyclerView recyclerView; @BindView protected TextView remainingBalance; @BindView protected DefaultButton saveSeparateSlips; @BindView protected TextView scheduleDisclaimer; @BindView protected CustomEffectiveDate scheduleEffectiveDate; @BindView protected TextView scheduleGroupId; @BindView protected ImageView scheduleIcon; @BindView TextView scheduleNote; @BindView protected TextView schedulePaymentDate; @BindView protected TextView scheduleSuccessfullText; @BindView protected CustomTransferAndPayItem successAmount; @BindView protected TextView successfulTransfer; @InterfaceC13391fZD public C6204cLu themesSlipPresenter; @BindView protected CustomTransferAndPayItem totalAmount; @BindView protected CustomTransferAndPayItem totalFee; @BindView protected TextView unsuccessfulTransfer; /* loaded from: classes5.dex */ public class IndividualScreenshot_ViewBinding implements Unbinder { private IndividualScreenshot b; public IndividualScreenshot_ViewBinding(IndividualScreenshot individualScreenshot, View view) { this.b = individualScreenshot; individualScreenshot.dateTime = (TextView) pyT.e(view, R.id.text_date_time, "field 'dateTime'", TextView.class); individualScreenshot.referenceId = (TextView) pyT.e(view, R.id.text_reference_id, "field 'referenceId'", TextView.class); individualScreenshot.source = (CustomTransferAndPaySource) pyT.e(view, R.id.source, "field 'source'", CustomTransferAndPaySource.class); individualScreenshot.target = (CustomTransferAndPayTarget) pyT.e(view, R.id.target, "field 'target'", CustomTransferAndPayTarget.class); individualScreenshot.amount = (CustomTransferAndPayItem) pyT.e(view, R.id.amount, "field 'amount'", CustomTransferAndPayItem.class); individualScreenshot.fee = (CustomTransferAndPayItem) pyT.e(view, R.id.fee, "field 'fee'", CustomTransferAndPayItem.class); } @Override // butterknife.Unbinder public final void a() { IndividualScreenshot individualScreenshot = this.b; if (individualScreenshot == null) { throw new IllegalStateException("Bindings already cleared."); } this.b = null; individualScreenshot.dateTime = null; individualScreenshot.referenceId = null; individualScreenshot.source = null; individualScreenshot.target = null; individualScreenshot.amount = null; individualScreenshot.fee = null; } } /* loaded from: classes5.dex */ public class SummaryScreenshot_ViewBinding implements Unbinder { private SummaryScreenshot d; public SummaryScreenshot_ViewBinding(SummaryScreenshot summaryScreenshot, View view) { this.d = summaryScreenshot; summaryScreenshot.groupName = (TextView) pyT.e(view, R.id.group_name_text_view, "field 'groupName'", TextView.class); summaryScreenshot.groupId = (TextView) pyT.e(view, R.id.group_id_text_view, "field 'groupId'", TextView.class); summaryScreenshot.successfulTransfer = (TextView) pyT.e(view, R.id.successful_transfer, "field 'successfulTransfer'", TextView.class); summaryScreenshot.unsuccessfulTransfer = (TextView) pyT.e(view, R.id.unsuccessful_transfer, "field 'unsuccessfulTransfer'", TextView.class); summaryScreenshot.dateTime = (TextView) pyT.e(view, R.id.date_time_text_view, "field 'dateTime'", TextView.class); summaryScreenshot.source = (CustomTransferAndPaySource) pyT.e(view, R.id.source, "field 'source'", CustomTransferAndPaySource.class); summaryScreenshot.amount = (CustomTransferAndPayItem) pyT.e(view, R.id.amount, "field 'amount'", CustomTransferAndPayItem.class); summaryScreenshot.totalFee = (CustomTransferAndPayItem) pyT.e(view, R.id.total_fee, "field 'totalFee'", CustomTransferAndPayItem.class); summaryScreenshot.totalAmount = (CustomTransferAndPayItem) pyT.e(view, R.id.total_amount, "field 'totalAmount'", CustomTransferAndPayItem.class); summaryScreenshot.recyclerView = (RecyclerView) pyT.e(view, R.id.recycler_view, "field 'recyclerView'", RecyclerView.class); } @Override // butterknife.Unbinder public final void a() { SummaryScreenshot summaryScreenshot = this.d; if (summaryScreenshot == null) { throw new IllegalStateException("Bindings already cleared."); } this.d = null; summaryScreenshot.groupName = null; summaryScreenshot.groupId = null; summaryScreenshot.successfulTransfer = null; summaryScreenshot.unsuccessfulTransfer = null; summaryScreenshot.dateTime = null; summaryScreenshot.source = null; summaryScreenshot.amount = null; summaryScreenshot.totalFee = null; summaryScreenshot.totalAmount = null; summaryScreenshot.recyclerView = null; } } public static BulkTransferSuccessFragment d(FS fs) { BulkTransferSuccessFragment bulkTransferSuccessFragment = new BulkTransferSuccessFragment(); Bundle bundle = new Bundle(); bundle.putParcelable("com.scb.phone.EXTRA_SUCCESS_DISPLAY", fs); bulkTransferSuccessFragment.setArguments(bundle); return bulkTransferSuccessFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559475, viewGroup, false); ButterKnife.c(this, inflate); this.bulkTransferSuccessPresenter.e((C2742akO) this); final C2742akO c2742akO = this.bulkTransferSuccessPresenter; final FS fs = (FS) getArguments().getParcelable("com.scb.phone.EXTRA_SUCCESS_DISPLAY"); c2742akO.b = fs; ZI.IeS ieS = new ZI.IeS(fs) { // from class: o.akU private FS a; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6636cYn.tOB) obj).a(this.a); } { this.a = fs; } }; if (c2742akO.f != 0) { ieS.e(c2742akO.f); } boolean z = c2742akO.b.b != null; ZI.IeS ieS2 = new ZI.IeS(fs) { // from class: o.akV private FS d; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6636cYn.tOB) obj).c(this.d); } { this.d = fs; } }; if (z && c2742akO.f != 0) { ieS2.e(c2742akO.f); } if (c2742akO.b.b == null) { ZI.IeS ieS3 = new ZI.IeS(c2742akO) { // from class: o.akS private C2742akO e; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC6636cYn.tOB) obj).c(this.e.d.a.V()); } { this.e = c2742akO; } }; if (c2742akO.f != 0) { ieS3.e(c2742akO.f); } if (c2742akO.d.a.V()) { c2742akO.a(false); } } return inflate; } @Override // o.InterfaceC6636cYn.tOB public final void c(FS fs) { this.totalFee.scheduleFeeText.setVisibility(0); this.totalAmount.scheduleFeeText.setVisibility(0); this.paymentDate.setVisibility(8); this.successfulTransfer.setVisibility(8); this.unsuccessfulTransfer.setVisibility(8); this.paymentDate.setVisibility(8); this.fromViewSeparator.setVisibility(8); this.scheduleIcon.setVisibility(0); this.scheduleGroupId.setText(fs.n); this.scheduleGroupId.setVisibility(0); this.scheduleSuccessfullText.setVisibility(0); this.schedulePaymentDate.setText(fs.c); this.schedulePaymentDate.setVisibility(0); this.fullDisclaimerViewSeparator.setVisibility(0); this.fullFromViewSeparator.setVisibility(0); this.buttonsContainer.setVisibility(8); this.scheduleEffectiveDate.setEffectiveDate(fs.b); this.scheduleEffectiveDate.setVisibility(0); this.conclusionTitle.setText(R.string.scheduled_transfer); this.scheduleNote.setVisibility(0); } @Override // o.InterfaceC8936daJ public final void c(boolean z) { this.saveSeparateSlips.setVisibility(z ? 8 : 0); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onDestroyView() { super.onDestroyView(); this.bulkTransferSuccessPresenter.w_(); } public final void e(final InterfaceC15577gud interfaceC15577gud) { guQ.b("onShowRationale", new Object[0]); ((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.permission_storage_title).d(R.string.permission_storage).aoT_(R.string.permission_allow, new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.eHW private InterfaceC15577gud d; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { this.d.c(); } { this.d = interfaceC15577gud; } }), Integer.valueOf(R.string.permission_deny), new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.eHY private InterfaceC15577gud e; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { this.e.e(); } { this.e = interfaceC15577gud; } }})).show(); } @Override // androidx.fragment.app.Fragment public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) { super.onRequestPermissionsResult(i, strArr, iArr); C10579eIb.a(this, i, iArr); } public static void d() { guQ.b("onNeverAskAgain", new Object[0]); } public static void h() { guQ.b("onNeverAskAgainAndroid13", new Object[0]); } public static void i() { guQ.b("onPermissionDenied", new Object[0]); } public static void f() { guQ.b("onPermissionDeniedAndroid13", new Object[0]); } public final void a(FW fw, List list) { ArrayList arrayList = new ArrayList(); arrayList.add(AbstractC13163fSk.fromCallable(new fKY(new SummaryScreenshot(this), fw, getContext())).observeOn(fRR.e()).subscribeOn(C13417fZt.b())); YKU yku = new YKU(list); arrayList.addAll((Collection) new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw(this) { // from class: o.eIa private BulkTransferSuccessFragment c; @Override // o.InterfaceC1244Ytw public final Object d(Object obj) { AbstractC13163fSk subscribeOn; subscribeOn = AbstractC13163fSk.fromCallable(new fKY(new BulkTransferSuccessFragment.IndividualScreenshot(r0), (FN) obj, this.c.getContext())).observeOn(fRR.e()).subscribeOn(C13417fZt.b()); return subscribeOn; } { this.c = this; } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8()))); AbstractC13163fSk.merge(arrayList).subscribe(new RVV(this)); } /* loaded from: classes5.dex */ protected class SummaryScreenshot extends fKR { @BindView protected CustomTransferAndPayItem amount; @BindView protected TextView dateTime; private BulkTransferSuccessFragment e; @BindView protected TextView groupId; @BindView protected TextView groupName; @BindView protected RecyclerView recyclerView; @BindView protected CustomTransferAndPaySource source; @BindView protected TextView successfulTransfer; @BindView protected CustomTransferAndPayItem totalAmount; @BindView protected CustomTransferAndPayItem totalFee; @BindView protected TextView unsuccessfulTransfer; @Override // o.fKR public final /* synthetic */ void b(FW fw, View view) { FW fw2 = fw; ButterKnife.c(this, view); this.groupName.setText(fw2.h); this.groupId.setText(fw2.f); if (TextUtils.isEmpty(fw2.k)) { this.successfulTransfer.setVisibility(8); } else { this.successfulTransfer.setText(fw2.k); } if (TextUtils.isEmpty(fw2.f8166o)) { this.unsuccessfulTransfer.setVisibility(8); } else { this.unsuccessfulTransfer.setText(fw2.f8166o); } this.dateTime.setText(fw2.d); this.source.setAvatar(fw2.g); this.source.setSourceName(fw2.i); this.source.setAccountNumber(fw2.j); this.amount.setValue(fw2.c); this.totalFee.setValue(fw2.m); this.totalAmount.setValue(fw2.l); this.totalAmount.lineView.setVisibility(8); RecyclerView recyclerView = this.recyclerView; view.getContext(); recyclerView.setLayoutManager(new LinearLayoutManager()); ViewCompat.d((View) this.recyclerView, false); this.recyclerView.setAdapter(new BulkTransferSummaryScreenshotAdapter(fw2.n)); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public SummaryScreenshot(BulkTransferSuccessFragment bulkTransferSuccessFragment) { super(bulkTransferSuccessFragment.themesSlipPresenter); this.e = bulkTransferSuccessFragment; } } /* JADX INFO: Access modifiers changed from: protected */ /* loaded from: classes5.dex */ public class IndividualScreenshot extends fKR { @BindView protected CustomTransferAndPayItem amount; @BindView protected TextView dateTime; private BulkTransferSuccessFragment e; @BindView protected CustomTransferAndPayItem fee; @BindView protected TextView referenceId; @BindView protected CustomTransferAndPaySource source; @BindView protected CustomTransferAndPayTarget target; @Override // o.fKR public final /* synthetic */ void b(FN fn, View view) { FN fn2 = fn; ButterKnife.c(this, view); this.dateTime.setText(fn2.c); this.referenceId.setText(fn2.f); this.source.setAvatar(fn2.h); this.source.setAccountNumber(fn2.g); this.source.setSourceName(fn2.j); this.target.setAvatar(fn2.n); this.target.setTargetName(fn2.m); this.target.setReferenceNumbers(fn2.l); this.target.setFavoriteName(fn2.f8159o); this.target.mFavouriteIcon.setVisibility(8); this.amount.setValue(fn2.d); this.fee.setValue(fn2.i); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public IndividualScreenshot(BulkTransferSuccessFragment bulkTransferSuccessFragment) { super(bulkTransferSuccessFragment.themesSlipPresenter); this.e = bulkTransferSuccessFragment; } } /* JADX INFO: Access modifiers changed from: package-private */ @OnClick @Optional public void onReturnHomeClick() { Intent intent = new Intent(getContext(), (Class) HomeActivity.class); intent.addFlags(603979776); intent.putExtra("com.scb.phone.EXTRA_NEW_INSTANCE_LAYOUT", R.id.account_summary_tab); intent.putExtra("com.scb.phone.EXTRA_NEW_INSTANCE_REFRESH", true); getContext().startActivity(intent); } /* loaded from: classes5.dex */ class RVV extends wRi.LWm { private BulkTransferSuccessFragment a; RVV(BulkTransferSuccessFragment bulkTransferSuccessFragment) { this.a = bulkTransferSuccessFragment; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { super.onError(th); FragmentActivity activity = this.a.getActivity(); if (this.a.isDetached() || activity == null) { return; } b(R.string.saved_slip_error, EnumC8951daY.ERROR); } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onComplete() { super.onComplete(); FragmentActivity activity = this.a.getActivity(); if (!this.a.getUserVisibleHint() || activity == null) { return; } b(R.string.saved_slip, EnumC8951daY.SUCCESS); } private void b(int i, EnumC8951daY enumC8951daY) { FragmentActivity activity = this.a.getActivity(); if (activity != null) { BulkTransferSuccessFragment bulkTransferSuccessFragment = this.a; String string = bulkTransferSuccessFragment.getString(i); if (bulkTransferSuccessFragment.getActivity() != null) { BaseActivity.a(new Object[]{(BaseActivity) bulkTransferSuccessFragment.getActivity(), activity, Integer.valueOf(R.id.root_view), string, enumC8951daY}, 855668825, -855668822, R.id.root_view); } } } } @OnClick public void saveSeparateSlipsClick() { if (getActivity() != null) { if (BaseActivity.P()) { C10579eIb.e(this); return; } } C10579eIb.d(this); } @Override // o.InterfaceC6636cYn.tOB public final void a(FS fs) { this.groupName.setText(fs.j); this.groupId.setText(fs.f); if (TextUtils.isEmpty(fs.l)) { this.successfulTransfer.setVisibility(8); } else { this.successfulTransfer.setText(fs.l); } if (TextUtils.isEmpty(fs.t)) { this.unsuccessfulTransfer.setVisibility(8); } else { this.unsuccessfulTransfer.setText(fs.t); } this.paymentDate.setText(fs.c); this.from.setSourceName(fs.d); this.from.setAccountNumber(fs.i); this.from.setAvatar(fs.g); this.successAmount.setValue(fs.a); this.totalAmount.setValue(fs.m); this.totalFee.setValue(fs.k); BulkTransferSuccessAdapter bulkTransferSuccessAdapter = new BulkTransferSuccessAdapter(fs.h); getContext(); this.recyclerView.setLayoutManager(new LinearLayoutManager()); ViewCompat.d((View) this.recyclerView, false); this.recyclerView.setAdapter(bulkTransferSuccessAdapter); if (TextUtils.isEmpty(fs.f8163o)) { this.remainingBalance.setVisibility(8); } else { this.remainingBalance.setText(fs.f8163o); } } @Override // o.InterfaceC6636cYn.tOB public final void b(FW fw, List list) { if (getActivity() != null) { if (BaseActivity.P()) { C10579eIb.e(this, fw, list); return; } } C10579eIb.b(this, fw, list); } }