package com.scb.phone.view.custom.item; import android.content.Context; import android.graphics.drawable.Drawable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.ViewGroup; 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.components.ItemCustom; import o.C12891fKc; import o.C14957gcv; import o.InterfaceC13391fZD; import o.QE; import o.nMh; /* loaded from: classes5.dex */ public final class ItemCardMaskCustom extends ItemCustom { @BindView public ImageView cardImage; @BindView public LinearLayout layoutCardNumber; @BindView public TextView tvCardNumber2nd; @BindView public TextView tvCardNumberEnd; @BindView public TextView tvCardNumberFront; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @InterfaceC13391fZD public ItemCardMaskCustom(Context context) { super(context); C14957gcv.e(context, ""); } @Override // com.scb.phone.components.ItemCustom public final void a(Context context) { C14957gcv.e(context, ""); Object systemService = context.getSystemService("layout_inflater"); C14957gcv.d(systemService, ""); ((LayoutInflater) systemService).inflate(R.layout.2131558966, (ViewGroup) this, true); ButterKnife.c(this); } @Override // com.scb.phone.components.ItemCustom public final void setUpWithDisplay(QE qe) { C14957gcv.e(qe, ""); ImageView imageView = null; if (TextUtils.isEmpty(qe.a)) { LinearLayout linearLayout = this.layoutCardNumber; if (linearLayout == null) { C14957gcv.a(""); linearLayout = null; } linearLayout.setVisibility(8); } else { LinearLayout linearLayout2 = this.layoutCardNumber; if (linearLayout2 == null) { C14957gcv.a(""); linearLayout2 = null; } linearLayout2.setVisibility(0); TextView textView = this.tvCardNumberFront; if (textView == null) { C14957gcv.a(""); textView = null; } textView.setText(qe.a.substring(0, 4)); TextView textView2 = this.tvCardNumber2nd; if (textView2 == null) { C14957gcv.a(""); textView2 = null; } textView2.setText(qe.a.substring(4, 6)); TextView textView3 = this.tvCardNumberEnd; if (textView3 == null) { C14957gcv.a(""); textView3 = null; } String str = qe.a; textView3.setText(str.substring(str.length() - 4)); } getContext(); Drawable drawable = nMh.getDrawable(getContext(), R.drawable.default_card); ImageView imageView2 = this.cardImage; if (imageView2 == null) { C14957gcv.a(""); imageView2 = null; } C12891fKc.azn_(drawable, imageView2, qe.c); ImageView imageView3 = this.cardImage; if (imageView3 != null) { imageView = imageView3; } else { C14957gcv.a(""); } imageView.setContentDescription(qe.b); } public final void setTvCardNumberFront(TextView textView) { C14957gcv.e(textView, ""); this.tvCardNumberFront = textView; } public final void setTvCardNumberEnd(TextView textView) { C14957gcv.e(textView, ""); this.tvCardNumberEnd = textView; } public final void setTvCardNumber2nd(TextView textView) { C14957gcv.e(textView, ""); this.tvCardNumber2nd = textView; } public final void setLayoutCardNumber(LinearLayout linearLayout) { C14957gcv.e(linearLayout, ""); this.layoutCardNumber = linearLayout; } public final void setCardImage(ImageView imageView) { C14957gcv.e(imageView, ""); this.cardImage = imageView; } }