package com.scb.phone.view.fragment.remittance; import android.content.Context; import android.text.TextUtils; import android.util.Base64; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.custom.transferandpay.CustomNoteItem; 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 java.nio.charset.StandardCharsets; import o.C1099Vp; import o.C1114Vy; import o.C12891fKc; import o.C14957gcv; import o.C6204cLu; import o.VG; import o.fKR; import o.gdZ; import o.nMh; /* loaded from: classes5.dex */ public final class SlipScreenshot extends fKR { private static int b = 1; private static int c; private static byte e; private Context a; @BindView public ImageView pendingIcon; @BindView public View slipAmountsSeparatorSpace; @BindView public TextView slipCustomAmountToGet; @BindView public LinearLayout slipCustomAmountToGetLayout; @BindView public TextView slipCustomAmountToSend; @BindView public LinearLayout slipCustomAmountToSendLayout; @BindView public CustomTransferAndPayItem slipCustomConversionRate; @BindView public TextView slipCustomFee; @BindView public LinearLayout slipCustomFeeLayout; @BindView public CustomNoteItem slipCustomNote; @BindView public CustomNoteItem slipCustomPersonalDetail; @BindView public CustomNoteItem slipCustomRecipientAddress; @BindView public CustomNoteItem slipCustomRecipientContacts; @BindView public CustomTransferAndPaySource slipCustomSource; @BindView public CustomTransferAndPayTarget slipCustomTarget; @BindView public CustomNoteItem slipCustomTransactionDetails; @BindView public ImageView slipRemittanceLogo; @BindView public View slipSeparatorAmountToGet; @BindView public View slipSeparatorAmountToSend; @BindView public TextView slipTextViewRefId; @BindView public TextView slipTextViewSuccessfulHeaderTitle; @BindView public TextView slipTextViewTransactionDate; @BindView public TextView slipTextViewTransactionRemark; @BindView public ImageView successIcon; @Override // o.fKR public final /* synthetic */ void b(VG vg, View view) { Context context; CustomNoteItem customNoteItem; Context context2; CustomNoteItem customNoteItem2; Context context3; CustomNoteItem customNoteItem3; Context context4; CustomNoteItem customNoteItem4; Context context5; CustomNoteItem customNoteItem5; VG vg2 = vg; C14957gcv.e(vg2, ""); C14957gcv.e(view, ""); ButterKnife.c(this, view); C1114Vy c1114Vy = vg2.d; this.a = vg2.c; TextView textView = this.slipTextViewTransactionDate; ImageView imageView = null; if (textView == null) { C14957gcv.a(""); textView = null; } textView.setText(c1114Vy.s); TextView textView2 = this.slipTextViewRefId; if (textView2 == null) { C14957gcv.a(""); textView2 = null; } textView2.setText(c1114Vy.t); if (c1114Vy.i) { TextView textView3 = this.slipTextViewSuccessfulHeaderTitle; if (textView3 == null) { C14957gcv.a(""); textView3 = null; } Context context6 = this.a; if (context6 == null) { C14957gcv.a(""); context6 = null; } textView3.setText(context6.getString(R.string.remittance_request_success_header_title)); Context context7 = this.a; if (context7 == null) { C14957gcv.a(""); context7 = null; } textView3.setTextColor(nMh.getColor(context7, R.color.f13612131100869)); ImageView imageView2 = this.successIcon; if (imageView2 == null) { C14957gcv.a(""); imageView2 = null; } ImageView imageView3 = imageView2; C14957gcv.e(imageView3, ""); imageView3.setVisibility(8); ImageView imageView4 = this.pendingIcon; if (imageView4 == null) { C14957gcv.a(""); imageView4 = null; } ImageView imageView5 = imageView4; C14957gcv.e(imageView5, ""); imageView5.setVisibility(0); TextView textView4 = this.slipTextViewTransactionRemark; if (textView4 == null) { C14957gcv.a(""); textView4 = null; } TextView textView5 = textView4; C14957gcv.e(textView5, ""); textView5.setVisibility(0); } else { TextView textView6 = this.slipTextViewTransactionRemark; if (textView6 == null) { C14957gcv.a(""); textView6 = null; } TextView textView7 = textView6; C14957gcv.e(textView7, ""); textView7.setVisibility(8); } C1099Vp c1099Vp = c1114Vy.b; if (c1099Vp.a.length() > 0) { CustomTransferAndPaySource customTransferAndPaySource = this.slipCustomSource; if (customTransferAndPaySource == null) { C14957gcv.a(""); customTransferAndPaySource = null; } CustomTransferAndPaySource customTransferAndPaySource2 = customTransferAndPaySource; C14957gcv.e(customTransferAndPaySource2, ""); customTransferAndPaySource2.setVisibility(0); customTransferAndPaySource.setSourceName(c1099Vp.a); customTransferAndPaySource.setDivider(false); String str = c1099Vp.e; if (str.length() == 0) { str = c1099Vp.b; } customTransferAndPaySource.setAccountNumber(str); String str2 = c1099Vp.c; if (str2 == null) { str2 = ""; } customTransferAndPaySource.setAvatar(str2); } if (c1114Vy.d.a.length() > 0) { CustomTransferAndPayTarget customTransferAndPayTarget = this.slipCustomTarget; if (customTransferAndPayTarget == null) { C14957gcv.a(""); customTransferAndPayTarget = null; } CustomTransferAndPayTarget customTransferAndPayTarget2 = customTransferAndPayTarget; C14957gcv.e(customTransferAndPayTarget2, ""); customTransferAndPayTarget2.setVisibility(0); customTransferAndPayTarget.setFullDivider(true); customTransferAndPayTarget.setTargetName(c1114Vy.d.a); customTransferAndPayTarget.setReferenceNumbers(c1114Vy.d.b); customTransferAndPayTarget.setReferenceNo1(c1114Vy.d.e); String str3 = c1114Vy.d.d; if (str3 == null) { str3 = ""; } customTransferAndPayTarget.setAvatar(str3, R.drawable.bankicon_remittance); customTransferAndPayTarget.setAddFavoriteButtonVisible(false); customTransferAndPayTarget.mFavouriteIcon.setVisibility(8); customTransferAndPayTarget.mFavouriteName.setVisibility(8); } CustomTransferAndPayItem customTransferAndPayItem = this.slipCustomConversionRate; if (customTransferAndPayItem == null) { C14957gcv.a(""); customTransferAndPayItem = null; } String str4 = c1114Vy.c; if (str4.length() > 0) { CustomTransferAndPayItem customTransferAndPayItem2 = customTransferAndPayItem; C14957gcv.e(customTransferAndPayItem2, ""); customTransferAndPayItem2.setVisibility(0); customTransferAndPayItem.setValue(str4); } LinearLayout linearLayout = this.slipCustomAmountToSendLayout; if (linearLayout == null) { C14957gcv.a(""); linearLayout = null; } TextView textView8 = this.slipCustomAmountToSend; if (textView8 == null) { C14957gcv.a(""); textView8 = null; } axt_(linearLayout, textView8, c1114Vy.a); LinearLayout linearLayout2 = this.slipCustomAmountToGetLayout; if (linearLayout2 == null) { C14957gcv.a(""); linearLayout2 = null; } TextView textView9 = this.slipCustomAmountToGet; if (textView9 == null) { C14957gcv.a(""); textView9 = null; } axt_(linearLayout2, textView9, c1114Vy.e); LinearLayout linearLayout3 = this.slipCustomFeeLayout; if (linearLayout3 == null) { C14957gcv.a(""); linearLayout3 = null; } TextView textView10 = this.slipCustomFee; if (textView10 == null) { C14957gcv.a(""); textView10 = null; } axt_(linearLayout3, textView10, c1114Vy.f); String substring = c1114Vy.f.substring(0, gdZ.a((CharSequence) c1114Vy.f, ' ', 0, false)); C14957gcv.c((Object) substring, ""); if (substring.length() == 0 || C14957gcv.b((Object) substring, (Object) "0.00")) { LinearLayout linearLayout4 = this.slipCustomFeeLayout; if (linearLayout4 == null) { C14957gcv.a(""); linearLayout4 = null; } LinearLayout linearLayout5 = linearLayout4; C14957gcv.e(linearLayout5, ""); linearLayout5.setVisibility(8); } Context context8 = this.a; if (context8 == null) { C14957gcv.a(""); context = null; } else { context = context8; } CustomNoteItem customNoteItem6 = this.slipCustomPersonalDetail; if (customNoteItem6 != null) { customNoteItem = customNoteItem6; } else { C14957gcv.a(""); customNoteItem = null; } c(context, customNoteItem, R.string.remittance_review_recipient_personal_detail, c1114Vy.k, false); Context context9 = this.a; if (context9 == null) { C14957gcv.a(""); context2 = null; } else { context2 = context9; } CustomNoteItem customNoteItem7 = this.slipCustomRecipientAddress; if (customNoteItem7 != null) { customNoteItem2 = customNoteItem7; } else { C14957gcv.a(""); customNoteItem2 = null; } c(context2, customNoteItem2, R.string.remittance_review_recipient_address, c1114Vy.f8427o, false); CustomNoteItem customNoteItem8 = this.slipCustomRecipientAddress; if (customNoteItem8 == null) { C14957gcv.a(""); customNoteItem8 = null; } customNoteItem8.topSpace.setVisibility(8); Context context10 = this.a; if (context10 == null) { C14957gcv.a(""); context3 = null; } else { context3 = context10; } CustomNoteItem customNoteItem9 = this.slipCustomRecipientContacts; if (customNoteItem9 != null) { customNoteItem3 = customNoteItem9; } else { C14957gcv.a(""); customNoteItem3 = null; } c(context3, customNoteItem3, R.string.remittance_review_recipient_contact_details, c1114Vy.n, false); CustomNoteItem customNoteItem10 = this.slipCustomRecipientContacts; if (customNoteItem10 == null) { C14957gcv.a(""); customNoteItem10 = null; } customNoteItem10.topSpace.setVisibility(8); Context context11 = this.a; if (context11 == null) { C14957gcv.a(""); context4 = null; } else { context4 = context11; } CustomNoteItem customNoteItem11 = this.slipCustomTransactionDetails; if (customNoteItem11 != null) { customNoteItem4 = customNoteItem11; } else { C14957gcv.a(""); customNoteItem4 = null; } c(context4, customNoteItem4, R.string.remittance_review_transaction_details, c1114Vy.v, TextUtils.isEmpty(c1114Vy.h)); CustomNoteItem customNoteItem12 = this.slipCustomTransactionDetails; if (customNoteItem12 == null) { C14957gcv.a(""); customNoteItem12 = null; } customNoteItem12.topSpace.setVisibility(8); Context context12 = this.a; if (context12 == null) { C14957gcv.a(""); context5 = null; } else { context5 = context12; } CustomNoteItem customNoteItem13 = this.slipCustomNote; if (customNoteItem13 != null) { customNoteItem5 = customNoteItem13; } else { C14957gcv.a(""); customNoteItem5 = null; } c(context5, customNoteItem5, R.string.remittance_review_note, c1114Vy.h, true); CustomNoteItem customNoteItem14 = this.slipCustomNote; if (customNoteItem14 == null) { C14957gcv.a(""); customNoteItem14 = null; } customNoteItem14.topSpace.setVisibility(8); CustomTransferAndPayItem customTransferAndPayItem3 = this.slipCustomConversionRate; if (customTransferAndPayItem3 == null) { C14957gcv.a(""); customTransferAndPayItem3 = null; } customTransferAndPayItem3.mDividerView.setVisibility(8); CustomTransferAndPayItem customTransferAndPayItem4 = this.slipCustomConversionRate; if (customTransferAndPayItem4 == null) { C14957gcv.a(""); customTransferAndPayItem4 = null; } customTransferAndPayItem4.mBottomSpace.setVisibility(8); View view2 = this.slipAmountsSeparatorSpace; if (view2 == null) { C14957gcv.a(""); view2 = null; } C14957gcv.e(view2, ""); view2.setVisibility(8); CustomNoteItem customNoteItem15 = this.slipCustomTransactionDetails; if (customNoteItem15 == null) { C14957gcv.a(""); customNoteItem15 = null; } customNoteItem15.setFullDivider(true); View view3 = this.slipSeparatorAmountToSend; if (view3 == null) { C14957gcv.a(""); view3 = null; } C14957gcv.e(view3, ""); view3.setVisibility(8); View view4 = this.slipSeparatorAmountToGet; if (view4 == null) { C14957gcv.a(""); view4 = null; } C14957gcv.e(view4, ""); view4.setVisibility(8); LinearLayout linearLayout6 = this.slipCustomAmountToGetLayout; if (linearLayout6 == null) { C14957gcv.a(""); linearLayout6 = null; } linearLayout6.setPadding(0, 0, 0, 0); LinearLayout linearLayout7 = this.slipCustomFeeLayout; if (linearLayout7 == null) { C14957gcv.a(""); linearLayout7 = null; } linearLayout7.setPadding(0, 0, 0, 0); CustomNoteItem customNoteItem16 = this.slipCustomPersonalDetail; if (customNoteItem16 == null) { C14957gcv.a(""); customNoteItem16 = null; } customNoteItem16.d(); CustomNoteItem customNoteItem17 = this.slipCustomRecipientAddress; if (customNoteItem17 == null) { C14957gcv.a(""); customNoteItem17 = null; } customNoteItem17.d(); CustomNoteItem customNoteItem18 = this.slipCustomRecipientContacts; if (customNoteItem18 == null) { C14957gcv.a(""); customNoteItem18 = null; } customNoteItem18.d(); CustomNoteItem customNoteItem19 = this.slipCustomTransactionDetails; if (customNoteItem19 == null) { C14957gcv.a(""); customNoteItem19 = null; } customNoteItem19.d(); CustomNoteItem customNoteItem20 = this.slipCustomNote; if (customNoteItem20 == null) { C14957gcv.a(""); customNoteItem20 = null; } customNoteItem20.setFullDivider(true); customNoteItem20.d(); String str5 = c1114Vy.r; if (!(str5 == null || gdZ.d((CharSequence) str5))) { ImageView imageView6 = this.slipRemittanceLogo; if (imageView6 == null) { C14957gcv.a(""); imageView6 = null; } ImageView imageView7 = imageView6; C14957gcv.e(imageView7, ""); imageView7.setVisibility(0); ImageView imageView8 = this.slipRemittanceLogo; if (imageView8 != null) { imageView = imageView8; } else { C14957gcv.a(""); } C12891fKc.azE_(imageView, c1114Vy.r); } } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public SlipScreenshot(C6204cLu c6204cLu) { super(c6204cLu); C14957gcv.e(c6204cLu, ""); } private void d(String str, Object[] objArr) { byte[] decode = Base64.decode(str, 0); byte[] bArr = new byte[decode.length]; for (int i = 0; i < decode.length; i++) { bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ e); } objArr[0] = new String(bArr, StandardCharsets.UTF_8); } /* loaded from: classes5.dex */ public static final class HBt { private HBt() { } public /* synthetic */ HBt(byte b) { this(); } } private static void axt_(LinearLayout linearLayout, TextView textView, String str) { String str2 = str; if (TextUtils.isEmpty(str2)) { return; } LinearLayout linearLayout2 = linearLayout; C14957gcv.e(linearLayout2, ""); linearLayout2.setVisibility(0); textView.setText(str2); } private final void c(Context context, CustomNoteItem customNoteItem, int i, String str, boolean z) { int i2 = 2 % 2; int i3 = c + 95; b = i3 % 128; if (i3 % 2 == 0) { str.length(); throw null; } if (str.length() > 0) { CustomNoteItem customNoteItem2 = customNoteItem; C14957gcv.e(customNoteItem2, ""); customNoteItem2.setVisibility(0); String string = context.getString(i); if (string.startsWith(",*,)")) { int i4 = c + 83; b = i4 % 128; if (i4 % 2 == 0) { Object[] objArr = new Object[1]; d(string.substring(4), objArr); ((String) objArr[0]).intern(); throw null; } Object[] objArr2 = new Object[1]; d(string.substring(4), objArr2); string = ((String) objArr2[0]).intern(); } customNoteItem.setTitle(string); customNoteItem.setText(str); customNoteItem.divider.setVisibility(z ? 0 : 8); } } static void a() { e = (byte) 6; } static { a(); new HBt((byte) 0); } }