package com.scb.phone.view.fragment.chequemanagement; import android.content.Context; import android.content.Intent; import android.text.SpannableString; import android.text.TextPaint; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.view.View; import android.widget.TextView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.activity.chequemanagement.ChequeReviewActivity; import com.scb.phone.view.activity.chequemanagement.ordercheque.OrderChequeHelpActivity; import com.scb.phone.view.custom.common.CustomAddressItem; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayTarget; import com.scb.phone.view.fragment.BaseFragment; import java.util.Iterator; import java.util.List; import o.C0503Ic; import o.C1189Xo; import o.C6583cXR; import o.HT; import o.nMh; import o.pug; /* loaded from: classes5.dex */ public class BaseChequeReviewFragment extends BaseFragment { private Context c; private C1189Xo d; @BindView TextView detailText; @BindView CustomTransferAndPayTarget feeDetail; @BindView CustomAddressItem mailingAddressDetail; @BindView CustomTransferAndPayTarget quantityDetail; @BindView CustomTransferAndPaySource sourceDetail; @BindView CustomTransferAndPayTarget targetDetail; /* JADX INFO: Access modifiers changed from: protected */ public final void e(C1189Xo c1189Xo, View view, Context context) { ButterKnife.c(this, view); this.c = context; this.d = c1189Xo; if (c1189Xo instanceof HT) { HT ht = (HT) c1189Xo; StringBuilder sb = new StringBuilder(); sb.append(ht.e); sb.append(" - "); sb.append(ht.d); c1189Xo.y = sb.toString(); this.d = ht; String str = ht.a; d(); h(); c(str); if (getActivity() instanceof ChequeReviewActivity) { c("activatechq_review", new pug[0]); return; } return; } if (!(c1189Xo instanceof C0503Ic)) { d(); h(); if (getActivity() instanceof ChequeReviewActivity) { c("stopchq_review", new pug[0]); return; } return; } C0503Ic c0503Ic = (C0503Ic) c1189Xo; String str2 = c0503Ic.b; d(); c(str2); String str3 = c0503Ic.a; this.feeDetail.setVisibility(0); this.feeDetail.setTargetName(str3); this.feeDetail.setReferenceNumbersVisible(false); this.feeDetail.setText(this.c.getString(R.string.order_cheque_review_fee)); List list = c0503Ic.e; StringBuilder sb2 = new StringBuilder(); Iterator it = list.iterator(); while (it.hasNext()) { sb2.append(it.next()); sb2.append(" "); } this.mailingAddressDetail.setVisibility(0); this.mailingAddressDetail.setText(sb2.toString()); this.mailingAddressDetail.setTitle(this.c.getString(R.string.order_cheque_review_mailing_address)); if (this.detailText != null) { String string = getString(R.string.order_cheque_review_description); String string2 = getString(R.string.order_cheque_review_find_out_more); StringBuilder sb3 = new StringBuilder(); sb3.append(string); sb3.append(string2); String obj = sb3.toString(); SpannableString spannableString = new SpannableString(obj); spannableString.setSpan(new ClickableSpan(this) { // from class: com.scb.phone.view.fragment.chequemanagement.BaseChequeReviewFragment.1 private BaseChequeReviewFragment d; { this.d = this; } @Override // android.text.style.ClickableSpan public final void onClick(View view2) { this.d.startActivity(new Intent(this.d.c, (Class) OrderChequeHelpActivity.class)); } @Override // android.text.style.ClickableSpan, android.text.style.CharacterStyle public final void updateDrawState(TextPaint textPaint) { super.updateDrawState(textPaint); textPaint.setUnderlineText(false); textPaint.setColor(nMh.getColor(this.d.getContext(), R.color.f13682131100876)); } }, string.length(), obj.length(), 33); this.detailText.setText(spannableString); this.detailText.setMovementMethod(LinkMovementMethod.getInstance()); this.detailText.setHighlightColor(0); this.detailText.setVisibility(0); } if (getActivity() instanceof ChequeReviewActivity) { c("orderchq_review", new pug("quantity", str2)); } } private void d() { this.sourceDetail.setSourceName(this.d.b()); this.sourceDetail.setAccountNumber(this.d.d()); this.sourceDetail.setAvatar(C6583cXR.VS_(getContext(), R.drawable.bankicon_scb).toString()); } private void h() { this.targetDetail.setVisibility(0); this.targetDetail.setTargetName(this.d.e()); this.targetDetail.setReferenceNumbersVisible(false); this.targetDetail.setText(this.c.getString(R.string.cheque_no)); } private void c(String str) { this.quantityDetail.setVisibility(0); this.quantityDetail.setTargetName(str); this.quantityDetail.setReferenceNumbersVisible(false); this.quantityDetail.setText(this.c.getString(R.string.no_of_quantity)); } }