小红书.apk(点击下载) / AlphaAudienceGoodsCardView.java
package com.xingin.alpha.goods.view.card;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.net.Uri;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import bj2.l;
import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting;
import com.xingin.alpha.R$color;
import com.xingin.alpha.R$drawable;
import com.xingin.alpha.R$id;
import com.xingin.alpha.R$layout;
import com.xingin.alpha.bean.AlphaTextConfig;
import com.xingin.alpha.bean.GoodsCardConfig;
import com.xingin.alpha.bean.GoodsCardTagConfig;
import com.xingin.alpha.bean.IconUrlConfig;
import com.xingin.alpha.ui.widget.AlphaConfigLottieView;
import com.xingin.android.mixim.msg.bean.common.MsgGoodsCardInfo;
import com.xingin.android.xhscomm.router.Routers;
import com.xingin.ui.textview.XYTextView;
import com.xingin.utils.core.l0;
import com.xingin.widgets.XYImageView;
import el.g0;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import ln.d2;
import ms.e;
import ms.g;
import so.m;
import sy.i;
import sy.i0;
import sy.q1;
import sy.v0;
import y7.f;
@Metadata(bv = {}, d1 = {"\u0000J\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\u00020\u0001B'\b\u0007\u0012\u0006\u0010\u0017\u001a\u00020\u0016\u0012\n\b\u0002\u0010*\u001a\u0004\u0018\u00010)\u0012\b\b\u0002\u0010+\u001a\u00020\u0004¢\u0006\u0004\b,\u0010-J \u0010\t\u001a\u00020\b2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006J\b\u0010\n\u001a\u00020\bH\u0016J\b\u0010\u000b\u001a\u00020\bH\u0016J\b\u0010\f\u001a\u00020\bH\u0016J\u000e\u0010\u000f\u001a\u00020\b2\u0006\u0010\u000e\u001a\u00020\rJ\u0010\u0010\u0011\u001a\u00020\u00102\u0006\u0010\u0005\u001a\u00020\u0004H\u0002J\u0010\u0010\u0012\u001a\u00020\u00102\u0006\u0010\u0005\u001a\u00020\u0004H\u0002J\u0018\u0010\u0014\u001a\u00020\b2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0013\u001a\u00020\u0004H\u0002J\u0010\u0010\u0015\u001a\u00020\b2\u0006\u0010\u0013\u001a\u00020\u0004H\u0002J\u0010\u0010\u0018\u001a\u00020\b2\u0006\u0010\u0017\u001a\u00020\u0016H\u0002J\u0010\u0010\u001a\u001a\u00020\b2\u0006\u0010\u0019\u001a\u00020\u0002H\u0002J\u0010\u0010\u001b\u001a\u00020\b2\u0006\u0010\u0019\u001a\u00020\u0002H\u0002J\u0010\u0010\u001d\u001a\u00020\u001c2\u0006\u0010\u0003\u001a\u00020\u0002H\u0002R\u0018\u0010 \u001a\u0004\u0018\u00010\u00028\u0002@\u0002X\u000e¢\u0006\u0006\n\u0004\b\u001e\u0010\u001fR\u0018\u0010#\u001a\u0004\u0018\u00010\u00068\u0002@\u0002X\u000e¢\u0006\u0006\n\u0004\b!\u0010\"R\u001c\u0010(\u001a\u00020\u001c8\u0002@\u0002X\u000e¢\u0006\f\n\u0004\b$\u0010%\u0012\u0004\b&\u0010'¨\u0006."}, d2 = {"Lcom/xingin/alpha/goods/view/card/AlphaAudienceGoodsCardView;", "Lcom/xingin/alpha/goods/view/card/AlphaAbsGoodsCard;", "Lcom/xingin/android/mixim/msg/bean/common/MsgGoodsCardInfo;", "info", "", "type", "Landroid/view/View;", "rootView", "", "G0", com.igexin.push.core.d.c.f25536c, "O", "F0", "Lcom/xingin/alpha/bean/GoodsCardConfig;", "config", "setConfig", "", "C0", "D0", "cardType", "H0", "z0", "Landroid/content/Context;", "context", "B0", AdvanceSetting.NETWORK_TYPE, "E0", "I0", "", "A0", "e", "Lcom/xingin/android/mixim/msg/bean/common/MsgGoodsCardInfo;", "goodsCardInfo", f.f156778k, "Landroid/view/View;", "rootViewGroup", "g", "Ljava/lang/String;", "getGoodsCardType$annotations", "()V", "goodsCardType", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "alpha_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: AlphaAudienceGoodsCardView.kt */
public final class AlphaAudienceGoodsCardView extends AlphaAbsGoodsCard {
/* renamed from: e reason: collision with root package name */
public MsgGoodsCardInfo f43775e;
/* renamed from: f reason: collision with root package name */
public View f43776f;
/* renamed from: g reason: collision with root package name */
public String f43777g;
/* renamed from: h reason: collision with root package name */
public Map<Integer, View> f43778h;
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
/* compiled from: AlphaAudienceGoodsCardView.kt */
public static final class a extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AlphaAudienceGoodsCardView f43779a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ Context f43780b;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public a(AlphaAudienceGoodsCardView alphaAudienceGoodsCardView, Context context) {
super(0);
this.f43779a = alphaAudienceGoodsCardView;
this.f43780b = context;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
this.f43779a.B0(this.f43780b);
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
/* compiled from: AlphaAudienceGoodsCardView.kt */
public static final class b extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AlphaAudienceGoodsCardView f43781a;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public b(AlphaAudienceGoodsCardView alphaAudienceGoodsCardView) {
super(0);
this.f43781a = alphaAudienceGoodsCardView;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
this.f43781a.O();
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
/* compiled from: AlphaAudienceGoodsCardView.kt */
public static final class c extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AlphaAudienceGoodsCardView f43782a;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public c(AlphaAudienceGoodsCardView alphaAudienceGoodsCardView) {
super(0);
this.f43782a = alphaAudienceGoodsCardView;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
MsgGoodsCardInfo msgGoodsCardInfo = this.f43782a.f43775e;
if (msgGoodsCardInfo != null) {
this.f43782a.E0(msgGoodsCardInfo);
}
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
/* compiled from: AlphaAudienceGoodsCardView.kt */
public static final class d extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AlphaAudienceGoodsCardView f43783a;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public d(AlphaAudienceGoodsCardView alphaAudienceGoodsCardView) {
super(0);
this.f43783a = alphaAudienceGoodsCardView;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
l.b(this.f43783a);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@JvmOverloads
public AlphaAudienceGoodsCardView(Context context, AttributeSet attributeSet, int i10) {
super(context, attributeSet, i10);
Intrinsics.checkNotNullParameter(context, "context");
this.f43778h = new LinkedHashMap();
this.f43777g = "unknown";
ViewGroup.inflate(context, R$layout.f40370alpha_view_introducing_goods_card_v2, this);
Resources system = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
setLayoutParams(new ConstraintLayout.LayoutParams((int) TypedValue.applyDimension(1, (float) 108, system.getDisplayMetrics()), -2));
setBackgroundResource(R$drawable.alpha_bg_rectangle_white_4_corner);
((TextView) _$_findCachedViewById(R$id.ap7)).setTypeface(Typeface.createFromAsset(context.getAssets(), "fonts/REDNumber-Medium.ttf"));
q1.S(this, 0, new a(this, context), 1, null);
ImageView imageView = (ImageView) _$_findCachedViewById(R$id.closeBtn);
Intrinsics.checkNotNullExpressionValue(imageView, "closeBtn");
q1.S(imageView, 0, new b(this), 1, null);
}
private static /* synthetic */ void getGoodsCardType$annotations() {
}
public final String A0(MsgGoodsCardInfo msgGoodsCardInfo) {
Uri.Builder appendQueryParameter = Uri.parse(msgGoodsCardInfo.getLinkDetail()).buildUpon().appendQueryParameter("source", "live_page");
d2 d2Var = d2.f102239a;
String uri = appendQueryParameter.appendQueryParameter("anchor_id", d2Var.T()).appendQueryParameter("live_page_id", String.valueOf(d2Var.z0())).build().toString();
Intrinsics.checkNotNullExpressionValue(uri, "parse(link)\n …)\n .toString()");
return uri;
}
public final void B0(Context context) {
m.Z(m.f130812a, context, new c(this), null, false, true, 12, null);
}
public final boolean C0(int i10) {
if (i10 != 5) {
MsgGoodsCardInfo msgGoodsCardInfo = this.f43775e;
return msgGoodsCardInfo != null && msgGoodsCardInfo.getFlashBuy();
}
}
public final boolean D0(int i10) {
return i10 == 2;
}
public final void E0(MsgGoodsCardInfo msgGoodsCardInfo) {
String str;
String uuid = UUID.randomUUID().toString();
Intrinsics.checkNotNullExpressionValue(uuid, "randomUUID().toString()");
String a14 = i0.f131674a.a("&contract_track_id=" + uuid);
I0(msgGoodsCardInfo);
String linkSuffix = msgGoodsCardInfo.getLinkSuffix();
if (linkSuffix == null || linkSuffix.length() == 0) {
str = A0(msgGoodsCardInfo) + a14;
} else {
str = msgGoodsCardInfo.getLinkDetail() + msgGoodsCardInfo.getLinkSuffix() + a14;
}
v0.f131783a.c("AlphaGoodsCard", null, "AlphaIntroducingGoodsViewV2.gotoGoodsDetail url=" + str);
Routers.build(str).open(getContext());
ws.a.f151188a.d(0);
i.f131651a.L(true);
}
public void F0() {
d2.f102239a.a2(false);
e.f107591a.h();
v0();
this.f43775e = null;
}
public final void G0(MsgGoodsCardInfo msgGoodsCardInfo, int i10, View view) {
String str;
String d14;
String str2;
String str3;
String str4;
String str5;
Intrinsics.checkNotNullParameter(msgGoodsCardInfo, "info");
this.f43775e = msgGoodsCardInfo;
this.f43776f = view;
int i14 = R$id.c9z;
AlphaConfigLottieView alphaConfigLottieView = (AlphaConfigLottieView) _$_findCachedViewById(i14);
Intrinsics.checkNotNullExpressionValue(alphaConfigLottieView, "introducingLottie");
boolean z14 = false;
q1.Q(alphaConfigLottieView, msgGoodsCardInfo.isExplain() == 1, false, 2, null);
IconUrlConfig explainUrl = ak.c.f3514a.F().getExplainUrl();
if (explainUrl != null && msgGoodsCardInfo.isExplain() == 1) {
((AlphaConfigLottieView) _$_findCachedViewById(i14)).D(explainUrl);
}
z0(i10);
if (msgGoodsCardInfo.getSeckillState() == 1) {
int i15 = R$id.ffb;
XYImageView xYImageView = (XYImageView) _$_findCachedViewById(i15);
Intrinsics.checkNotNullExpressionValue(xYImageView, "tagView");
ViewGroup.LayoutParams layoutParams = xYImageView.getLayoutParams();
Objects.requireNonNull(layoutParams, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
ConstraintLayout.LayoutParams layoutParams2 = (ConstraintLayout.LayoutParams) layoutParams;
Resources system = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
((ViewGroup.MarginLayoutParams) layoutParams2).width = (int) TypedValue.applyDimension(1, (float) 30, system.getDisplayMetrics());
xYImageView.setLayoutParams(layoutParams2);
l.q((XYImageView) _$_findCachedViewById(i15));
XYImageView xYImageView2 = (XYImageView) _$_findCachedViewById(i15);
GoodsCardTagConfig tagConfig = getTagConfig();
if (tagConfig == null || (str5 = tagConfig.getSeckillTagUrl()) == null) {
str5 = "https://picasso-static.xiaohongshu.com/fe-platform/8f666f2b27537598d34529723ec5b1d6471e0da1.png";
}
xYImageView2.o(str5, g0.f72750a.t());
} else if (msgGoodsCardInfo.getSeckillState() == 2) {
int i16 = R$id.ffb;
XYImageView xYImageView3 = (XYImageView) _$_findCachedViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView3, "tagView");
ViewGroup.LayoutParams layoutParams3 = xYImageView3.getLayoutParams();
Objects.requireNonNull(layoutParams3, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
ConstraintLayout.LayoutParams layoutParams4 = (ConstraintLayout.LayoutParams) layoutParams3;
Resources system2 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system2, "Resources.getSystem()");
((ViewGroup.MarginLayoutParams) layoutParams4).width = (int) TypedValue.applyDimension(1, (float) 50, system2.getDisplayMetrics());
xYImageView3.setLayoutParams(layoutParams4);
l.q((XYImageView) _$_findCachedViewById(i16));
XYImageView xYImageView4 = (XYImageView) _$_findCachedViewById(i16);
GoodsCardTagConfig tagConfig2 = getTagConfig();
if (tagConfig2 == null || (str4 = tagConfig2.getSeckillPreTagUrl()) == null) {
str4 = "https://picasso-static.xiaohongshu.com/fe-platform/27881029296d4a0eba9932cc4b71ef3129c80482.png";
}
xYImageView4.o(str4, g0.f72750a.t());
} else if (C0(i10)) {
int i17 = R$id.ffb;
XYImageView xYImageView5 = (XYImageView) _$_findCachedViewById(i17);
Intrinsics.checkNotNullExpressionValue(xYImageView5, "tagView");
ViewGroup.LayoutParams layoutParams5 = xYImageView5.getLayoutParams();
Objects.requireNonNull(layoutParams5, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
ConstraintLayout.LayoutParams layoutParams6 = (ConstraintLayout.LayoutParams) layoutParams5;
Resources system3 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system3, "Resources.getSystem()");
((ViewGroup.MarginLayoutParams) layoutParams6).width = (int) TypedValue.applyDimension(1, (float) 30, system3.getDisplayMetrics());
xYImageView5.setLayoutParams(layoutParams6);
l.q((XYImageView) _$_findCachedViewById(i17));
XYImageView xYImageView6 = (XYImageView) _$_findCachedViewById(i17);
GoodsCardTagConfig tagConfig3 = getTagConfig();
if (tagConfig3 == null || (str3 = tagConfig3.getFlashBuyUrl()) == null) {
str3 = "https://picasso-static.xiaohongshu.com/fe-platform/85c57c7657b826aba8e4d1084575d9aa6352e11b.png";
}
xYImageView6.o(str3, g0.f72750a.t());
} else if (D0(i10)) {
int i18 = R$id.ffb;
XYImageView xYImageView7 = (XYImageView) _$_findCachedViewById(i18);
Intrinsics.checkNotNullExpressionValue(xYImageView7, "tagView");
ViewGroup.LayoutParams layoutParams7 = xYImageView7.getLayoutParams();
Objects.requireNonNull(layoutParams7, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
ConstraintLayout.LayoutParams layoutParams8 = (ConstraintLayout.LayoutParams) layoutParams7;
Resources system4 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system4, "Resources.getSystem()");
((ViewGroup.MarginLayoutParams) layoutParams8).width = (int) TypedValue.applyDimension(1, (float) 30, system4.getDisplayMetrics());
xYImageView7.setLayoutParams(layoutParams8);
l.q((XYImageView) _$_findCachedViewById(i18));
XYImageView xYImageView8 = (XYImageView) _$_findCachedViewById(i18);
GoodsCardTagConfig tagConfig4 = getTagConfig();
if (tagConfig4 == null || (str2 = tagConfig4.getRecommendTagUrl()) == null) {
str2 = "https://picasso-static.xiaohongshu.com/fe-platform/80e4f0074795e6eb82d3030ed46489b722e732f7.png";
}
xYImageView8.o(str2, g0.f72750a.t());
} else {
l.b((XYImageView) _$_findCachedViewById(R$id.ffb));
}
e eVar = e.f107591a;
String d15 = eVar.d();
if (!(d15 != null && d15.length() > 0) || !Intrinsics.areEqual(eVar.d(), msgGoodsCardInfo.getContractId())) {
((XYTextView) _$_findCachedViewById(R$id.bh3)).setMaxLines(2);
((TextView) _$_findCachedViewById(R$id.ap7)).setTextSize(16.0f);
} else {
((XYTextView) _$_findCachedViewById(R$id.bh3)).setMaxLines(1);
((TextView) _$_findCachedViewById(R$id.ap7)).setTextSize(12.0f);
eVar.c();
}
if (msgGoodsCardInfo.getImage().length() > 0) {
XYImageView xYImageView9 = (XYImageView) _$_findCachedViewById(R$id.goodsImageView);
String image = msgGoodsCardInfo.getImage();
float f14 = (float) 100;
Resources system5 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system5, "Resources.getSystem()");
int applyDimension = (int) TypedValue.applyDimension(1, f14, system5.getDisplayMetrics());
Resources system6 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system6, "Resources.getSystem()");
g9.c.h(xYImageView9, image, applyDimension, (int) TypedValue.applyDimension(1, f14, system6.getDisplayMetrics()), null, g0.f72750a.t(), null, 40, null);
}
XYTextView xYTextView = (XYTextView) _$_findCachedViewById(R$id.bh3);
String subTitle = msgGoodsCardInfo.getSubTitle();
xYTextView.setText(subTitle != null && subTitle.length() > 0 ? msgGoodsCardInfo.getSubTitle() : msgGoodsCardInfo.getTitle());
TextView textView = (TextView) _$_findCachedViewById(R$id.ap7);
String str6 = "";
if (msgGoodsCardInfo.getShowFinalPrice()) {
String finalPrice = msgGoodsCardInfo.getFinalPrice();
if (finalPrice != null && finalPrice.length() > 0) {
z14 = true;
}
if (z14) {
String finalPrice2 = msgGoodsCardInfo.getFinalPrice();
if (finalPrice2 != null) {
str6 = finalPrice2;
}
str = ks.e.L(str6);
textView.setText(str);
l.q(this);
H0(msgGoodsCardInfo, i10);
d2.f102239a.a2(true);
AlphaAbsGoodsCard.q0(this, this.f43776f, null, 2, null);
r0(Integer.valueOf(msgGoodsCardInfo.getDuration()));
setConfig(getIntroduceConfig());
}
}
Double discountPrice = msgGoodsCardInfo.getDiscountPrice();
if (!(discountPrice == null || (d14 = discountPrice.toString()) == null)) {
str6 = d14;
}
str = ks.e.L(str6);
textView.setText(str);
l.q(this);
H0(msgGoodsCardInfo, i10);
d2.f102239a.a2(true);
AlphaAbsGoodsCard.q0(this, this.f43776f, null, 2, null);
r0(Integer.valueOf(msgGoodsCardInfo.getDuration()));
setConfig(getIntroduceConfig());
}
public final void H0(MsgGoodsCardInfo msgGoodsCardInfo, int i10) {
fy.l lVar = fy.l.f79526a;
d2 d2Var = d2.f102239a;
String valueOf = String.valueOf(d2Var.z0());
String T = d2Var.T();
String goodsId = msgGoodsCardInfo.getGoodsId();
String couponTrackId = msgGoodsCardInfo.getCouponTrackId();
int goodsType = msgGoodsCardInfo.getGoodsType();
Double discountPrice = msgGoodsCardInfo.getDiscountPrice();
lVar.i(valueOf, T, goodsId, couponTrackId, goodsType, discountPrice != null ? (float) discountPrice.doubleValue() : 0.0f, d2Var.J(), msgGoodsCardInfo.getSource(), msgGoodsCardInfo.getSellerRole(), this.f43777g, msgGoodsCardInfo.isExplain() == 1, false);
}
public final void I0(MsgGoodsCardInfo msgGoodsCardInfo) {
if (msgGoodsCardInfo.getFlashBuy()) {
fy.l lVar = fy.l.f79526a;
d2 d2Var = d2.f102239a;
String valueOf = String.valueOf(d2Var.z0());
String T = d2Var.T();
String goodsId = msgGoodsCardInfo.getGoodsId();
String couponTrackId = msgGoodsCardInfo.getCouponTrackId();
int goodsType = msgGoodsCardInfo.getGoodsType();
Double discountPrice = msgGoodsCardInfo.getDiscountPrice();
lVar.f(valueOf, T, goodsId, couponTrackId, goodsType, discountPrice != null ? (float) discountPrice.doubleValue() : 0.0f, d2Var.G(), d2Var.J(), msgGoodsCardInfo.getSource(), this.f43777g, msgGoodsCardInfo.isExplain() == 1, false);
return;
}
fy.l lVar2 = fy.l.f79526a;
d2 d2Var2 = d2.f102239a;
String valueOf2 = String.valueOf(d2Var2.z0());
String T2 = d2Var2.T();
String goodsId2 = msgGoodsCardInfo.getGoodsId();
String couponTrackId2 = msgGoodsCardInfo.getCouponTrackId();
int goodsType2 = msgGoodsCardInfo.getGoodsType();
Double discountPrice2 = msgGoodsCardInfo.getDiscountPrice();
float doubleValue = discountPrice2 != null ? (float) discountPrice2.doubleValue() : 0.0f;
String G = d2Var2.G();
boolean J2 = d2Var2.J();
Integer source = msgGoodsCardInfo.getSource();
Integer sellerRole = msgGoodsCardInfo.getSellerRole();
String str = this.f43777g;
boolean z14 = msgGoodsCardInfo.isExplain() == 1;
String contractId = msgGoodsCardInfo.getContractId();
if (contractId == null) {
contractId = "";
}
lVar2.h(valueOf2, T2, goodsId2, couponTrackId2, goodsType2, doubleValue, G, J2, source, sellerRole, str, z14, false, contractId);
}
@Override // ms.f
public void O() {
F0();
View view = this.f43776f;
View view2 = null;
View findViewById = view != null ? view.findViewById(R$id.ben) : null;
View view3 = this.f43776f;
if (view3 != null) {
view2 = view3.findViewById(R$id.bh6);
}
if (findViewById != null && view2 != null) {
g.f107596a.b(view2, findViewById, new d(this));
}
}
public View _$_findCachedViewById(int i10) {
Map<Integer, View> map = this.f43778h;
View view = map.get(Integer.valueOf(i10));
if (view != null) {
return view;
}
View findViewById = findViewById(i10);
if (findViewById == null) {
return null;
}
map.put(Integer.valueOf(i10), findViewById);
return findViewById;
}
@Override // ms.f
public void p() {
F0();
l.b(this);
}
public final void setConfig(GoodsCardConfig goodsCardConfig) {
Intrinsics.checkNotNullParameter(goodsCardConfig, "config");
XYTextView xYTextView = (XYTextView) _$_findCachedViewById(R$id.bh3);
sy.f fVar = sy.f.f131630a;
AlphaTextConfig titleColor = goodsCardConfig.getTitleColor();
String str = null;
xYTextView.setTextColor(fVar.b(titleColor != null ? titleColor.getColor() : null, l0.a(getContext(), R$color.alpha_goods_card_title_color)));
TextView textView = (TextView) _$_findCachedViewById(R$id.ap7);
AlphaTextConfig priceColor = goodsCardConfig.getPriceColor();
String color = priceColor != null ? priceColor.getColor() : null;
Context context = getContext();
int i10 = R$color.xhsTheme_colorGrayPatch1_unchanged;
textView.setTextColor(fVar.b(color, l0.a(context, i10)));
TextView textView2 = (TextView) _$_findCachedViewById(R$id.e9j);
AlphaTextConfig priceColor2 = goodsCardConfig.getPriceColor();
if (priceColor2 != null) {
str = priceColor2.getColor();
}
textView2.setTextColor(fVar.b(str, l0.a(getContext(), i10)));
}
public final void z0(int i10) {
this.f43777g = i10 != 2 ? i10 != 5 ? i10 != 6 ? i10 != 7 ? "unknown" : "manner_popup_goods" : "sec-killing goods" : "flash_buy" : "recommend_goods";
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ AlphaAudienceGoodsCardView(Context context, AttributeSet attributeSet, int i10, int i14, DefaultConstructorMarker defaultConstructorMarker) {
this(context, (i14 & 2) != 0 ? null : attributeSet, (i14 & 4) != 0 ? 0 : i10);
}
}