小红书.apk(点击下载) / AudienceGoodsViewHolderV2.java
package com.xingin.alpha.goods.adapter.holder;
import android.annotation.SuppressLint;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
import bj2.l;
import com.google.android.gms.common.GoogleApiAvailabilityLight;
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$string;
import com.xingin.alpha.api.service.AlphaGoodsService;
import com.xingin.alpha.bean.AlphaTextConfig;
import com.xingin.alpha.bean.GoodsActivity;
import com.xingin.alpha.bean.GoodsBagItemConfig;
import com.xingin.alpha.bean.GoodsDrawInfo;
import com.xingin.alpha.bean.GoodsExplainConfig;
import com.xingin.alpha.bean.GoodsId;
import com.xingin.alpha.bean.GoodsItemIndexConfig;
import com.xingin.alpha.bean.GoodsLink;
import com.xingin.alpha.bean.GoodsOneRMBInfo;
import com.xingin.alpha.bean.GoodsPriceInfo;
import com.xingin.alpha.bean.GoodsState;
import com.xingin.alpha.bean.IconUrlConfig;
import com.xingin.alpha.bean.LiveGoodsBean;
import com.xingin.alpha.bean.SubTitle;
import com.xingin.alpha.bean.TextViewConfig;
import com.xingin.alpha.goods.view.AlphaGoodsTagLayout;
import com.xingin.alpha.goods.view.AlphaSeckillProgressView;
import com.xingin.alpha.ui.widget.AlphaConfigLottieView;
import com.xingin.alpha.ui.widget.AlphaTextView;
import com.xingin.android.xhscomm.router.Routers;
import com.xingin.foundation.framework.v2.recyclerview.KotlinViewHolder;
import com.xingin.skynet.utils.ServerError;
import com.xingin.ui.round.SelectRoundLinearLayout;
import com.xingin.ui.textview.XYTextView;
import com.xingin.utils.core.d1;
import com.xingin.utils.core.l0;
import com.xingin.widgets.XYImageView;
import el.g0;
import fy.m;
import fy.x;
import fy0.j0;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.TypeCastException;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.StringCompanionObject;
import ln.d2;
import sy.d0;
import sy.f0;
import sy.i0;
import sy.q1;
import sy.y;
@Metadata(bv = {}, d1 = {"\u0000\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0012\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0010\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000b\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010}\u001a\u00020*¢\u0006\u0004\b~\u0010J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0018\u0010\b\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0007\u001a\u00020\u0006H\u0002J\u0010\u0010\t\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0010\u0010\f\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\nH\u0002J \u0010\u000f\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\r2\u0006\u0010\u0007\u001a\u00020\u0006H\u0002J\u0010\u0010\u0010\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0010\u0010\u0011\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0010\u0010\u0012\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\nH\u0002J\u0018\u0010\u0013\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\rH\u0002J\b\u0010\u0014\u001a\u00020\u0004H\u0002J\u0010\u0010\u0015\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0010\u0010\u0016\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0003J \u0010\u0018\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\r2\u0006\u0010\u0017\u001a\u00020\nH\u0002J\u0018\u0010\u0019\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\rH\u0002J\u0018\u0010\u001a\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\rH\u0002J\u0018\u0010\u001b\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\rH\u0002J\u0010\u0010\u001d\u001a\u00020\u00042\u0006\u0010\u001c\u001a\u00020\nH\u0002J\b\u0010\u001e\u001a\u00020\rH\u0002J\u001e\u0010\u001f\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\r2\u0006\u0010\u0007\u001a\u00020\u0006JJ\u0010(\u001a\u00020\u00042\u0006\u0010!\u001a\u00020 2:\b\u0002\u0010'\u001a4\u0012\u0013\u0012\u00110\r¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(%\u0012\u0013\u0012\u00110\n¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(&\u0012\u0004\u0012\u00020\u0004\u0018\u00010\"J\u0006\u0010)\u001a\u00020\u0004RT\u00102\u001a4\u0012\u0013\u0012\u00110*¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(+\u0012\u0013\u0012\u00110\r¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(\u000e\u0012\u0004\u0012\u00020\u0004\u0018\u00010\"8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b,\u0010-\u001a\u0004\b.\u0010/\"\u0004\b0\u00101RT\u00106\u001a4\u0012\u0013\u0012\u00110*¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(+\u0012\u0013\u0012\u00110\r¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(\u000e\u0012\u0004\u0012\u00020\u0004\u0018\u00010\"8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b3\u0010-\u001a\u0004\b4\u0010/\"\u0004\b5\u00101R?\u0010@\u001a\u001f\u0012\u0013\u0012\u001108¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(9\u0012\u0004\u0012\u00020\u0004\u0018\u0001078\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b:\u0010;\u001a\u0004\b<\u0010=\"\u0004\b>\u0010?RT\u0010D\u001a4\u0012\u0013\u0012\u00110*¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(+\u0012\u0013\u0012\u00110\r¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(\u000e\u0012\u0004\u0012\u00020\u0004\u0018\u00010\"8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\bA\u0010-\u001a\u0004\bB\u0010/\"\u0004\bC\u00101RT\u0010H\u001a4\u0012\u0013\u0012\u00110*¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(+\u0012\u0013\u0012\u00110\r¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(\u000e\u0012\u0004\u0012\u00020\u0004\u0018\u00010\"8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\bE\u0010-\u001a\u0004\bF\u0010/\"\u0004\bG\u00101R*\u0010P\u001a\n\u0012\u0004\u0012\u00020\u0004\u0018\u00010I8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\bJ\u0010K\u001a\u0004\bL\u0010M\"\u0004\bN\u0010OR\u001c\u0010U\u001a\n R*\u0004\u0018\u00010Q0Q8\u0002X\u0004¢\u0006\u0006\n\u0004\bS\u0010TR\"\u0010\\\u001a\u00020\r8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\bV\u0010W\u001a\u0004\bX\u0010Y\"\u0004\bZ\u0010[R$\u0010d\u001a\u0004\u0018\u00010]8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b^\u0010_\u001a\u0004\b`\u0010a\"\u0004\bb\u0010cR$\u0010l\u001a\u0004\u0018\u00010e8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\bf\u0010g\u001a\u0004\bh\u0010i\"\u0004\bj\u0010kR$\u0010t\u001a\u0004\u0018\u00010m8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\bn\u0010o\u001a\u0004\bp\u0010q\"\u0004\br\u0010sR$\u0010|\u001a\u0004\u0018\u00010u8\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\bv\u0010w\u001a\u0004\bx\u0010y\"\u0004\bz\u0010{¨\u0006\u0001"}, d2 = {"Lcom/xingin/alpha/goods/adapter/holder/AudienceGoodsViewHolderV2;", "Lcom/xingin/foundation/framework/v2/recyclerview/KotlinViewHolder;", "Lcom/xingin/alpha/bean/LiveGoodsBean;", "goodsBean", "", "R", "Lkp/c;", "model", "A", "E", "", "isShow", "V", "", "position", "D", "B", "y", "s0", "w", "r0", "p0", "z", "isImageArea", "T", "M", "N", "o0", "hasSeckill", "c0", "F", "x", "", "remainTime", "Lkotlin/Function2;", "Lkotlin/ParameterName;", "name", "time", "isFinished", "onCallback", "n0", "W", "Landroid/view/View;", qo2.a.COPY_LINK_TYPE_VIEW, "b", "Lkotlin/jvm/functions/Function2;", "getOnItemClick", "()Lkotlin/jvm/functions/Function2;", j0.f80220a, "(Lkotlin/jvm/functions/Function2;)V", "onItemClick", "c", "getOnBuyClick", "g0", "onBuyClick", "Lkotlin/Function1;", "Luq/i;", "data", "d", "Lkotlin/jvm/functions/Function1;", "getOpenOneRMBDetail", "()Lkotlin/jvm/functions/Function1;", "l0", "(Lkotlin/jvm/functions/Function1;)V", "openOneRMBDetail", "e", "L", "k0", "onPlayBackClick", y7.f.f156778k, "K", "i0", "onExplainGoods", "Lkotlin/Function0;", "g", "Lkotlin/jvm/functions/Function0;", "H", "()Lkotlin/jvm/functions/Function0;", "h0", "(Lkotlin/jvm/functions/Function0;)V", "onCountDownEnd", "Landroid/graphics/Typeface;", "kotlin.jvm.PlatformType", z60.h.f160753a, "Landroid/graphics/Typeface;", "priceFont", "k", "I", "getUseSource", "()I", "m0", "(I)V", "useSource", "Lcom/xingin/alpha/bean/GoodsBagItemConfig;", "l", "Lcom/xingin/alpha/bean/GoodsBagItemConfig;", "getItemConfig", "()Lcom/xingin/alpha/bean/GoodsBagItemConfig;", "f0", "(Lcom/xingin/alpha/bean/GoodsBagItemConfig;)V", "itemConfig", "Lcom/xingin/alpha/bean/GoodsExplainConfig;", "m", "Lcom/xingin/alpha/bean/GoodsExplainConfig;", "getExplainConfig", "()Lcom/xingin/alpha/bean/GoodsExplainConfig;", "Z", "(Lcom/xingin/alpha/bean/GoodsExplainConfig;)V", "explainConfig", "Lcom/xingin/alpha/bean/TextViewConfig;", GoogleApiAvailabilityLight.TRACKING_SOURCE_NOTIFICATION, "Lcom/xingin/alpha/bean/TextViewConfig;", "getBuyConfig", "()Lcom/xingin/alpha/bean/TextViewConfig;", "Y", "(Lcom/xingin/alpha/bean/TextViewConfig;)V", "buyConfig", "Lcom/xingin/alpha/bean/GoodsItemIndexConfig;", "o", "Lcom/xingin/alpha/bean/GoodsItemIndexConfig;", "getIndexConfig", "()Lcom/xingin/alpha/bean/GoodsItemIndexConfig;", "d0", "(Lcom/xingin/alpha/bean/GoodsItemIndexConfig;)V", "indexConfig", "containerView", "<init>", "(Landroid/view/View;)V", "alpha_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: AudienceGoodsViewHolderV2.kt */
public final class AudienceGoodsViewHolderV2 extends KotlinViewHolder {
/* renamed from: b reason: collision with root package name */
public Function2<? super View, ? super Integer, Unit> f42853b;
/* renamed from: c reason: collision with root package name */
public Function2<? super View, ? super Integer, Unit> f42854c;
/* renamed from: d reason: collision with root package name */
public Function1<? super uq.i, Unit> f42855d;
/* renamed from: e reason: collision with root package name */
public Function2<? super View, ? super Integer, Unit> f42856e;
/* renamed from: f reason: collision with root package name */
public Function2<? super View, ? super Integer, Unit> f42857f;
/* renamed from: g reason: collision with root package name */
public Function0<Unit> f42858g;
/* renamed from: h reason: collision with root package name */
public final Typeface f42859h;
/* renamed from: i reason: collision with root package name */
public yl.g f42860i;
/* renamed from: j reason: collision with root package name */
public hw2.c f42861j;
/* renamed from: k reason: collision with root package name */
public int f42862k;
/* renamed from: l reason: collision with root package name */
public GoodsBagItemConfig f42863l;
/* renamed from: m reason: collision with root package name */
public GoodsExplainConfig f42864m;
/* renamed from: n reason: collision with root package name */
public TextViewConfig f42865n;
/* renamed from: o reason: collision with root package name */
public GoodsItemIndexConfig f42866o;
/* renamed from: p reason: collision with root package name */
public Map<Integer, View> f42867p = new LinkedHashMap();
@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: AudienceGoodsViewHolderV2.kt */
public static final class a extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42868a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ LiveGoodsBean f42869b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ int f42870c;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public a(AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2, LiveGoodsBean liveGoodsBean, int i10) {
super(0);
this.f42868a = audienceGoodsViewHolderV2;
this.f42869b = liveGoodsBean;
this.f42870c = i10;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
this.f42868a.T(this.f42869b, this.f42870c, true);
}
}
@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: AudienceGoodsViewHolderV2.kt */
public static final class b extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42871a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ LiveGoodsBean f42872b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ int f42873c;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public b(AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2, LiveGoodsBean liveGoodsBean, int i10) {
super(0);
this.f42871a = audienceGoodsViewHolderV2;
this.f42872b = liveGoodsBean;
this.f42873c = i10;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
this.f42871a.T(this.f42872b, this.f42873c, false);
}
}
@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: AudienceGoodsViewHolderV2.kt */
public static final class c extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42874a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ LiveGoodsBean f42875b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ int f42876c;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public c(AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2, LiveGoodsBean liveGoodsBean, int i10) {
super(0);
this.f42874a = audienceGoodsViewHolderV2;
this.f42875b = liveGoodsBean;
this.f42876c = i10;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
this.f42874a.M(this.f42875b, this.f42876c);
}
}
@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: AudienceGoodsViewHolderV2.kt */
public static final class d extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42877a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ LiveGoodsBean f42878b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ int f42879c;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public d(AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2, LiveGoodsBean liveGoodsBean, int i10) {
super(0);
this.f42877a = audienceGoodsViewHolderV2;
this.f42878b = liveGoodsBean;
this.f42879c = i10;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
this.f42877a.N(this.f42878b, this.f42879c);
}
}
@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: AudienceGoodsViewHolderV2.kt */
public static final class e extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42880a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ int f42881b;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public e(AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2, int i10) {
super(0);
this.f42880a = audienceGoodsViewHolderV2;
this.f42881b = i10;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
Function2<View, Integer, Unit> L = this.f42880a.L();
if (L != null) {
L.invoke(this.f42880a.i(), Integer.valueOf(this.f42881b));
}
}
}
@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: AudienceGoodsViewHolderV2.kt */
public static final class f extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ LiveGoodsBean f42882a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42883b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ int f42884c;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public f(LiveGoodsBean liveGoodsBean, AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2, int i10) {
super(0);
this.f42882a = liveGoodsBean;
this.f42883b = audienceGoodsViewHolderV2;
this.f42884c = i10;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
String str;
Function2<View, Integer, Unit> K;
y yVar = y.f131790a;
GoodsId goodsId = this.f42882a.getGoodsId();
if (goodsId == null || (str = goodsId.getContractId()) == null) {
str = "";
}
if (!yVar.b(str) && !this.f42882a.isSellOut() && (K = this.f42883b.K()) != null) {
K.invoke(this.f42883b.i(), Integer.valueOf(this.f42884c));
}
}
}
@Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"", "time", "", "isFinished", "", "a", "(IZ)V"}, k = 3, mv = {1, 6, 0})
/* compiled from: AudienceGoodsViewHolderV2.kt */
public static final class g extends Lambda implements Function2<Integer, Boolean, Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42885a;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public g(AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2) {
super(2);
this.f42885a = audienceGoodsViewHolderV2;
}
public final void a(int i10, boolean z14) {
if (z14) {
View i14 = this.f42885a.i();
int i15 = R$id.countDownTextView;
XYTextView xYTextView = (XYTextView) i14.findViewById(i15);
Intrinsics.checkNotNullExpressionValue(xYTextView, "containerView.countDownTextView");
q1.O(xYTextView, false, 0, 3, null);
((XYTextView) this.f42885a.i().findViewById(i15)).setText(this.f42885a.j().getString(R$string.f40415alpha_after_when_show_lottery_result, 0));
Function0<Unit> H = this.f42885a.H();
if (H != null) {
H.invoke();
return;
}
return;
}
View i16 = this.f42885a.i();
int i17 = R$id.countDownTextView;
XYTextView xYTextView2 = (XYTextView) i16.findViewById(i17);
Intrinsics.checkNotNullExpressionValue(xYTextView2, "containerView.countDownTextView");
q1.O(xYTextView2, false, 0, 3, null);
((XYTextView) this.f42885a.i().findViewById(i17)).setText(this.f42885a.j().getString(R$string.f40415alpha_after_when_show_lottery_result, d0.f131608a.x(i10)));
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(Integer num, Boolean bool) {
a(num.intValue(), bool.booleanValue());
return Unit.INSTANCE;
}
}
@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: AudienceGoodsViewHolderV2.kt */
public static final class h extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ LiveGoodsBean f42886a;
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ AudienceGoodsViewHolderV2 f42887b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ int f42888c;
/* renamed from: d reason: collision with root package name */
public final /* synthetic */ kp.c f42889d;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public h(LiveGoodsBean liveGoodsBean, AudienceGoodsViewHolderV2 audienceGoodsViewHolderV2, int i10, kp.c cVar) {
super(0);
this.f42886a = liveGoodsBean;
this.f42887b = audienceGoodsViewHolderV2;
this.f42888c = i10;
this.f42889d = cVar;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
String seckillPriceStr = this.f42886a.getGoodsActivity().getSeckillInfo().getSeckillPriceStr();
if (seckillPriceStr != null) {
this.f42886a.getGoodsPrice().setFinalPriceString(seckillPriceStr);
GoodsPriceInfo goodsPrice = this.f42886a.getGoodsPrice();
String seckillPriceDesc = this.f42886a.getGoodsActivity().getSeckillInfo().getSeckillPriceDesc();
if (seckillPriceDesc == null) {
seckillPriceDesc = "";
}
goodsPrice.setFinalPriceDesc(seckillPriceDesc);
}
this.f42887b.x(this.f42886a, this.f42888c, this.f42889d);
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\t\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
/* compiled from: AudienceGoodsViewHolderV2.kt */
public static final class i extends Lambda implements Function1<Long, Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ Function2<Integer, Boolean, Unit> f42890a;
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: kotlin.jvm.functions.Function2<? super java.lang.Integer, ? super java.lang.Boolean, kotlin.Unit> */
/* JADX WARN: Multi-variable type inference failed */
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public i(Function2<? super Integer, ? super Boolean, Unit> function2) {
super(1);
this.f42890a = function2;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Long l14) {
invoke(l14.longValue());
return Unit.INSTANCE;
}
public final void invoke(long j14) {
Function2<Integer, Boolean, Unit> function2 = this.f42890a;
if (function2 != null) {
function2.invoke(Integer.valueOf((int) j14), Boolean.FALSE);
}
}
}
@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: AudienceGoodsViewHolderV2.kt */
public static final class j extends Lambda implements Function0<Unit> {
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ Function2<Integer, Boolean, Unit> f42891a;
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: kotlin.jvm.functions.Function2<? super java.lang.Integer, ? super java.lang.Boolean, kotlin.Unit> */
/* JADX WARN: Multi-variable type inference failed */
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public j(Function2<? super Integer, ? super Boolean, Unit> function2) {
super(0);
this.f42891a = function2;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
Function2<Integer, Boolean, Unit> function2 = this.f42891a;
if (function2 != null) {
function2.invoke(0, Boolean.TRUE);
}
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AudienceGoodsViewHolderV2(View view) {
super(view);
Intrinsics.checkNotNullParameter(view, "containerView");
this.f42859h = Typeface.createFromAsset(view.getContext().getAssets(), "fonts/REDNumber-Medium.ttf");
}
public static final void O(LiveGoodsBean liveGoodsBean, int i10, Object obj) {
Intrinsics.checkNotNullParameter(liveGoodsBean, "$goodsBean");
f0.c(f0.f131631a, R$string.f40505alpha_cart_success, 0, 2, null);
m mVar = m.f79689a;
d2 d2Var = d2.f102239a;
String T = d2Var.T();
String A0 = d2Var.A0();
String itemId = liveGoodsBean.getItemId();
boolean isShopGoods = liveGoodsBean.isShopGoods();
boolean isExplaining = liveGoodsBean.isExplaining();
boolean isSellOut = liveGoodsBean.isSellOut();
Double salePrice = liveGoodsBean.getGoodsPrice().getSalePrice();
mVar.h(T, A0, itemId, isShopGoods, isExplaining, i10, isSellOut, salePrice != null ? (float) salePrice.doubleValue() : 0.0f);
}
public static final void Q(Throwable th3) {
if (th3 instanceof ServerError) {
f0.d(f0.f131631a, ((ServerError) th3).getMsg(), 0, 2, null);
}
}
public final void A(LiveGoodsBean liveGoodsBean, kp.c cVar) {
Unit unit;
GoodsDrawInfo goodsDrawInfo;
String str;
GoodsActivity goodsActivity = liveGoodsBean.getGoodsActivity();
boolean z14 = true;
if (goodsActivity == null || !goodsActivity.getSupportOneRMB()) {
z14 = false;
}
if (z14) {
GoodsOneRMBInfo oneRMBInfo = liveGoodsBean.getGoodsActivity().getOneRMBInfo();
if (oneRMBInfo == null || (goodsDrawInfo = oneRMBInfo.getGoodsDrawInfo()) == null) {
unit = null;
} else {
if (goodsDrawInfo.getState() == 0) {
x xVar = x.f80083a;
GoodsId goodsId = liveGoodsBean.getGoodsId();
if (goodsId == null || (str = goodsId.getContractId()) == null) {
str = "";
}
xVar.e(str);
((AlphaTextView) i().findViewById(R$id.a0f)).setText(j().getString(R$string.f40786alpha_join_go_now));
long drawStartTime = goodsDrawInfo.getDrawStartTime() - cVar.a();
if (drawStartTime >= 0) {
n0(drawStartTime, new g(this));
}
} else {
XYTextView xYTextView = (XYTextView) i().findViewById(R$id.countDownTextView);
Intrinsics.checkNotNullExpressionValue(xYTextView, "containerView.countDownTextView");
q1.r(xYTextView, false, 0, null, 7, null);
if (goodsDrawInfo.getUserIsLucky() == 0) {
((AlphaTextView) i().findViewById(R$id.a0f)).setText(j().getString(R$string.f40672alpha_end));
} else {
((AlphaTextView) i().findViewById(R$id.a0f)).setText(j().getString(R$string.a1l));
}
}
unit = Unit.INSTANCE;
}
if (unit == null) {
XYTextView xYTextView2 = (XYTextView) i().findViewById(R$id.countDownTextView);
Intrinsics.checkNotNullExpressionValue(xYTextView2, "containerView.countDownTextView");
q1.r(xYTextView2, false, 0, null, 7, null);
return;
}
return;
}
XYTextView xYTextView3 = (XYTextView) i().findViewById(R$id.countDownTextView);
Intrinsics.checkNotNullExpressionValue(xYTextView3, "containerView.countDownTextView");
q1.r(xYTextView3, false, 0, null, 7, null);
}
public final void B(LiveGoodsBean liveGoodsBean) {
String str;
int i10;
String str2;
String str3;
GoodsExplainConfig goodsExplainConfig;
TextViewConfig requestExplainBtn;
GoodsExplainConfig goodsExplainConfig2;
TextViewConfig hasSendBtn;
TextViewConfig requestExplainBtn2;
TextViewConfig hasSendBtn2;
String itemId;
TextViewConfig backExplain;
y yVar = y.f131790a;
GoodsId goodsId = liveGoodsBean.getGoodsId();
String str4 = "";
if (goodsId == null || (str = goodsId.getContractId()) == null) {
str = str4;
}
boolean b14 = yVar.b(str);
if (liveGoodsBean.hasPlayBack()) {
View i14 = i();
int i15 = R$id.e6i;
AlphaTextView alphaTextView = (AlphaTextView) i14.findViewById(i15);
Intrinsics.checkNotNullExpressionValue(alphaTextView, "containerView.playBackView");
q1.O(alphaTextView, false, 0, 3, null);
GoodsExplainConfig goodsExplainConfig3 = this.f42864m;
if (!(goodsExplainConfig3 == null || (backExplain = goodsExplainConfig3.getBackExplain()) == null)) {
String backgroundUrl = backExplain.getBackgroundUrl();
Resources system = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
Resources system2 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system2, "Resources.getSystem()");
((AlphaTextView) p(i15)).i(backgroundUrl, (int) TypedValue.applyDimension(1, (float) 54, system2.getDisplayMetrics()), (int) TypedValue.applyDimension(1, (float) 20, system.getDisplayMetrics()));
((AlphaTextView) p(i15)).setTextColor(sy.f.f131630a.b(backExplain.m807getTextColor(), l0.a(j(), R$color.xhsTheme_always_colorWhite1000)));
}
AlphaTextView alphaTextView2 = (AlphaTextView) i().findViewById(R$id.elu);
Intrinsics.checkNotNullExpressionValue(alphaTextView2, "containerView.requestExplainView");
q1.r(alphaTextView2, false, 0, null, 7, null);
m mVar = m.f79689a;
d2 d2Var = d2.f102239a;
String valueOf = String.valueOf(d2Var.z0());
String T = d2Var.T();
GoodsId goodsId2 = liveGoodsBean.getGoodsId();
if (!(goodsId2 == null || (itemId = goodsId2.getItemId()) == null)) {
str4 = itemId;
}
mVar.D(valueOf, T, str4);
return;
}
AlphaTextView alphaTextView3 = (AlphaTextView) i().findViewById(R$id.e6i);
Intrinsics.checkNotNullExpressionValue(alphaTextView3, "containerView.playBackView");
q1.r(alphaTextView3, false, 0, null, 7, null);
if (this.f42862k == 1) {
AlphaTextView alphaTextView4 = (AlphaTextView) i().findViewById(R$id.elu);
Intrinsics.checkNotNullExpressionValue(alphaTextView4, "containerView.requestExplainView");
q1.r(alphaTextView4, false, 0, null, 7, null);
return;
}
View i16 = i();
int i17 = R$id.elu;
AlphaTextView alphaTextView5 = (AlphaTextView) i16.findViewById(i17);
Intrinsics.checkNotNullExpressionValue(alphaTextView5, "containerView.requestExplainView");
String str5 = null;
q1.Q(alphaTextView5, d2.f102239a.w0() && !liveGoodsBean.isTopArea() && !liveGoodsBean.isOneRMBGoods(), false, 2, null);
s0(false);
if (!liveGoodsBean.isSellOut() || b14) {
AlphaTextView alphaTextView6 = (AlphaTextView) i().findViewById(i17);
if (b14) {
sy.f fVar = sy.f.f131630a;
GoodsExplainConfig goodsExplainConfig4 = this.f42864m;
if (!(goodsExplainConfig4 == null || (hasSendBtn2 = goodsExplainConfig4.getHasSendBtn()) == null)) {
str5 = hasSendBtn2.m807getTextColor();
}
i10 = fVar.b(str5, nu2.f.e(R$color.xhsTheme_always_colorWhite600));
} else {
sy.f fVar2 = sy.f.f131630a;
GoodsExplainConfig goodsExplainConfig5 = this.f42864m;
if (!(goodsExplainConfig5 == null || (requestExplainBtn2 = goodsExplainConfig5.getRequestExplainBtn()) == null)) {
str5 = requestExplainBtn2.m807getTextColor();
}
i10 = fVar2.b(str5, nu2.f.e(R$color.xhsTheme_always_colorWhite1000));
}
alphaTextView6.setTextColor(i10);
AlphaTextView alphaTextView7 = (AlphaTextView) i().findViewById(i17);
if (b14) {
str2 = j().getString(R$string.a3_);
} else {
str2 = j().getString(R$string.a38);
}
alphaTextView7.setText(str2);
AlphaTextView alphaTextView8 = (AlphaTextView) i().findViewById(i17);
if (!b14 ? !((goodsExplainConfig = this.f42864m) == null || (requestExplainBtn = goodsExplainConfig.getRequestExplainBtn()) == null || (str3 = requestExplainBtn.getBackgroundUrl()) == null) : !((goodsExplainConfig2 = this.f42864m) == null || (hasSendBtn = goodsExplainConfig2.getHasSendBtn()) == null || (str3 = hasSendBtn.getBackgroundUrl()) == null)) {
str4 = str3;
}
Resources system3 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system3, "Resources.getSystem()");
Resources system4 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system4, "Resources.getSystem()");
alphaTextView8.i(str4, (int) TypedValue.applyDimension(1, (float) 54, system4.getDisplayMetrics()), (int) TypedValue.applyDimension(1, (float) 20, system3.getDisplayMetrics()));
return;
}
AlphaTextView alphaTextView9 = (AlphaTextView) i().findViewById(i17);
Intrinsics.checkNotNullExpressionValue(alphaTextView9, "containerView.requestExplainView");
q1.r(alphaTextView9, false, 0, null, 7, null);
}
public final void D(LiveGoodsBean liveGoodsBean, int i10, kp.c cVar) {
GoodsActivity goodsActivity = liveGoodsBean.getGoodsActivity();
if ((goodsActivity != null ? goodsActivity.getSeckillInfo() : null) != null) {
((AlphaGoodsTagLayout) i().findViewById(R$id.bh3)).setMaxLines(1);
View i14 = i();
int i15 = R$id.ey4;
((AlphaSeckillProgressView) i14.findViewById(i15)).j(liveGoodsBean.getGoodsActivity().getSeckillInfo(), cVar.a(), new h(liveGoodsBean, this, i10, cVar));
AlphaSeckillProgressView alphaSeckillProgressView = (AlphaSeckillProgressView) i().findViewById(i15);
Intrinsics.checkNotNullExpressionValue(alphaSeckillProgressView, "containerView.seckillProgressView");
q1.O(alphaSeckillProgressView, false, 0, 3, null);
if (liveGoodsBean.isSeckilling()) {
AlphaGoodsTagLayout alphaGoodsTagLayout = (AlphaGoodsTagLayout) i().findViewById(R$id.f39840couponContainer);
Intrinsics.checkNotNullExpressionValue(alphaGoodsTagLayout, "containerView.couponContainer");
q1.r(alphaGoodsTagLayout, false, 0, null, 7, null);
l.d((TextView) i().findViewById(R$id.subTitleView));
return;
}
AlphaGoodsTagLayout alphaGoodsTagLayout2 = (AlphaGoodsTagLayout) i().findViewById(R$id.f39840couponContainer);
Intrinsics.checkNotNullExpressionValue(alphaGoodsTagLayout2, "containerView.couponContainer");
q1.O(alphaGoodsTagLayout2, false, 0, 3, null);
TextView textView = (TextView) i().findViewById(R$id.subTitleView);
Intrinsics.checkNotNullExpressionValue(textView, "containerView.subTitleView");
q1.r(textView, false, 0, null, 7, null);
return;
}
((AlphaGoodsTagLayout) i().findViewById(R$id.bh3)).setMaxLines(1);
AlphaSeckillProgressView alphaSeckillProgressView2 = (AlphaSeckillProgressView) i().findViewById(R$id.ey4);
Intrinsics.checkNotNullExpressionValue(alphaSeckillProgressView2, "containerView.seckillProgressView");
q1.r(alphaSeckillProgressView2, false, 0, null, 7, null);
}
public final void E(LiveGoodsBean liveGoodsBean) {
SubTitle subTitle = liveGoodsBean.getGoodsViewInfo().getSubTitle();
Unit unit = null;
if (subTitle != null) {
if (subTitle.isExamine()) {
if (!(subTitle.getDesc().length() == 0)) {
V(true);
View i10 = i();
int i14 = R$id.subTitleView;
((TextView) i10.findViewById(i14)).setTextColor(nu2.f.e(R$color.xhsTheme_colorGray600));
((TextView) i().findViewById(i14)).setText(subTitle.getDesc());
((TextView) i().findViewById(i14)).setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, (Drawable) null, (Drawable) null);
unit = Unit.INSTANCE;
}
}
V(false);
((TextView) i().findViewById(R$id.subTitleView)).setTextColor(ContextCompat.getColor(j(), com.xingin.xhstheme.R$color.xhsTheme_colorGrayLevel3));
unit = Unit.INSTANCE;
}
if (unit == null) {
V(false);
}
}
public final int F() {
int i10 = d1.i(j());
Resources system = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
return i10 - ((int) TypedValue.applyDimension(1, (float) 140, system.getDisplayMetrics()));
}
public final Function0<Unit> H() {
return this.f42858g;
}
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2<? super android.view.View, ? super java.lang.Integer, kotlin.Unit>, kotlin.jvm.functions.Function2<android.view.View, java.lang.Integer, kotlin.Unit> */
public final Function2<View, Integer, Unit> K() {
return this.f42857f;
}
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2<? super android.view.View, ? super java.lang.Integer, kotlin.Unit>, kotlin.jvm.functions.Function2<android.view.View, java.lang.Integer, kotlin.Unit> */
public final Function2<View, Integer, Unit> L() {
return this.f42856e;
}
public final void M(LiveGoodsBean liveGoodsBean, int i10) {
GoodsDrawInfo goodsDrawInfo;
Function2<? super View, ? super Integer, Unit> function2;
String str;
String str2;
String str3;
String contractId;
String d14;
GoodsActivity goodsActivity = liveGoodsBean.getGoodsActivity();
if (goodsActivity != null && goodsActivity.getSupportOneRMB()) {
GoodsOneRMBInfo oneRMBInfo = liveGoodsBean.getGoodsActivity().getOneRMBInfo();
if (oneRMBInfo != null && (goodsDrawInfo = oneRMBInfo.getGoodsDrawInfo()) != null) {
if (goodsDrawInfo.getState() == 0) {
x xVar = x.f80083a;
GoodsId goodsId = liveGoodsBean.getGoodsId();
if (goodsId == null || (str = goodsId.getContractId()) == null) {
str = "";
}
xVar.d(str);
Function1<? super uq.i, Unit> function1 = this.f42855d;
if (function1 != null) {
String image = liveGoodsBean.getGoodsViewInfo().getImage();
String title = liveGoodsBean.getGoodsViewInfo().getTitle();
Double salePrice = liveGoodsBean.getGoodsPrice().getSalePrice();
if (salePrice == null || (d14 = salePrice.toString()) == null) {
str2 = "";
} else {
str2 = d14;
}
String liveGoodsId = goodsDrawInfo.getLiveGoodsId();
GoodsId goodsId2 = liveGoodsBean.getGoodsId();
if (goodsId2 == null || (contractId = goodsId2.getContractId()) == null) {
str3 = "";
} else {
str3 = contractId;
}
function1.invoke(new uq.i(null, str3, image, title, str2, null, liveGoodsId, 0, 161, null));
}
} else if (goodsDrawInfo.getUserIsLucky() == 1 && (function2 = this.f42854c) != null) {
function2.invoke(i(), Integer.valueOf(i10));
}
}
} else if (!liveGoodsBean.isSellOut()) {
liveGoodsBean.setClickArea(0);
Function2<? super View, ? super Integer, Unit> function22 = this.f42854c;
if (function22 != null) {
function22.invoke(i(), Integer.valueOf(i10));
}
}
}
public final void N(LiveGoodsBean liveGoodsBean, int i10) {
if (!liveGoodsBean.isSellOut()) {
GoodsState goodsState = liveGoodsBean.getGoodsState();
if (goodsState != null) {
if (goodsState.getHasMultiSpecification()) {
GoodsLink goodsLink = liveGoodsBean.getGoodsLink();
if (goodsLink != null) {
Routers.build(goodsLink.getGoodsCartLink() + goodsLink.getLinkSuffix()).open(i().getContext());
o0(liveGoodsBean, i10);
}
} else {
hw2.c cVar = this.f42861j;
if (cVar != null) {
cVar.dispose();
}
AlphaGoodsService s14 = cl.a.f12786a.s();
long z04 = d2.f102239a.z0();
String contractId = liveGoodsBean.getContractId();
String itemId = liveGoodsBean.getItemId();
Double salePrice = liveGoodsBean.getGoodsPrice().getSalePrice();
this.f42861j = ty.a.a(s14.addGoodsCart(z04, contractId, itemId, salePrice != null ? salePrice.doubleValue() : 0.0d)).t1(new kp.a(liveGoodsBean, i10), kp.b.f99020a);
}
}
m mVar = m.f79689a;
d2 d2Var = d2.f102239a;
mVar.i(d2Var.T(), d2Var.A0(), liveGoodsBean.getItemId(), liveGoodsBean.getContractId(), i0.f131674a.U(liveGoodsBean.getGoodsPrice().getFinalPriceString()), i10, liveGoodsBean.getType(), Integer.valueOf(liveGoodsBean.getSource()), liveGoodsBean.isExplaining(), liveGoodsBean.isSellOut());
}
}
public final void R(LiveGoodsBean liveGoodsBean) {
Drawable drawable;
if (liveGoodsBean.isFlashBuyGoods()) {
((TextView) i().findViewById(R$id.g0x)).setText(j().getString(R$string.f40772alpha_flash_buy_short));
} else if (liveGoodsBean.isSeckillPreheat()) {
((TextView) i().findViewById(R$id.g0x)).setText(j().getString(R$string.apk));
} else {
((TextView) i().findViewById(R$id.g0x)).setText(j().getString(R$string.aob));
}
View i10 = i();
int i14 = R$id.g0x;
TextView textView = (TextView) i10.findViewById(i14);
Intrinsics.checkNotNullExpressionValue(textView, "containerView.tvTagBehindIndex");
q1.O(textView, false, 0, 3, null);
TextView textView2 = (TextView) i().findViewById(i14);
if (liveGoodsBean.isTopArea()) {
drawable = j().getDrawable(R$drawable.alpha_shape_second_buy_will_begin_two_corner);
} else {
drawable = j().getDrawable(R$drawable.alpha_shape_second_buy_will_begin);
}
textView2.setBackground(drawable);
}
public final void T(LiveGoodsBean liveGoodsBean, int i10, boolean z14) {
if (!liveGoodsBean.isOneRMBGoods()) {
if (liveGoodsBean.isFlashBuyGoods()) {
liveGoodsBean.setClickArea(z14 ? 1 : 2);
Function2<? super View, ? super Integer, Unit> function2 = this.f42854c;
if (function2 != null) {
function2.invoke(i(), Integer.valueOf(i10));
return;
}
return;
}
Function2<? super View, ? super Integer, Unit> function22 = this.f42853b;
if (function22 != null) {
function22.invoke(i(), Integer.valueOf(i10));
}
}
}
public final void V(boolean z14) {
if (z14) {
TextView textView = (TextView) i().findViewById(R$id.subTitleView);
Intrinsics.checkNotNullExpressionValue(textView, "containerView.subTitleView");
q1.O(textView, false, 0, 3, null);
return;
}
l.d((TextView) i().findViewById(R$id.subTitleView));
}
public final void W() {
((AlphaSeckillProgressView) i().findViewById(R$id.ey4)).h();
}
public final void Y(TextViewConfig textViewConfig) {
this.f42865n = textViewConfig;
}
public final void Z(GoodsExplainConfig goodsExplainConfig) {
this.f42864m = goodsExplainConfig;
}
/* JADX WARNING: Code restructure failed: missing block: B:8:0x0015, code lost:
if ((r0.length() == 0) == true) goto L_0x0019;
*/
public final void c0(boolean z14) {
int i10;
GoodsItemIndexConfig goodsItemIndexConfig = this.f42866o;
boolean z15 = true;
if (!(goodsItemIndexConfig == null || (r0 = goodsItemIndexConfig.getIndexBackgroundUrl(z14)) == null)) {
}
z15 = false;
if (z15) {
XYImageView xYImageView = (XYImageView) i().findViewById(R$id.bfo);
if (z14) {
i10 = R$drawable.alpha_bg_goods_index_single_round_corner;
} else {
i10 = R$drawable.alpha_bg_goods_index;
}
xYImageView.setBackgroundResource(i10);
return;
}
XYImageView xYImageView2 = (XYImageView) i().findViewById(R$id.bfo);
GoodsItemIndexConfig goodsItemIndexConfig2 = this.f42866o;
xYImageView2.o(goodsItemIndexConfig2 != null ? goodsItemIndexConfig2.getIndexBackgroundUrl(z14) : null, g0.f72750a.t());
}
public final void d0(GoodsItemIndexConfig goodsItemIndexConfig) {
this.f42866o = goodsItemIndexConfig;
}
public final void f0(GoodsBagItemConfig goodsBagItemConfig) {
this.f42863l = goodsBagItemConfig;
}
public final void g0(Function2<? super View, ? super Integer, Unit> function2) {
this.f42854c = function2;
}
public final void h0(Function0<Unit> function0) {
this.f42858g = function0;
}
public final void i0(Function2<? super View, ? super Integer, Unit> function2) {
this.f42857f = function2;
}
public final void j0(Function2<? super View, ? super Integer, Unit> function2) {
this.f42853b = function2;
}
public final void k0(Function2<? super View, ? super Integer, Unit> function2) {
this.f42856e = function2;
}
public final void l0(Function1<? super uq.i, Unit> function1) {
this.f42855d = function1;
}
public final void m0(int i10) {
this.f42862k = i10;
}
public final void n0(long j14, Function2<? super Integer, ? super Boolean, Unit> function2) {
yl.g gVar = this.f42860i;
if (gVar != null) {
gVar.r();
}
yl.g gVar2 = new yl.g();
this.f42860i = gVar2;
gVar2.j(j14, new i(function2), new j(function2));
}
public final void o0(LiveGoodsBean liveGoodsBean, int i10) {
m mVar = m.f79689a;
d2 d2Var = d2.f102239a;
mVar.j(d2Var.T(), d2Var.A0(), liveGoodsBean.getItemId(), liveGoodsBean.getContractId(), i0.f131674a.U(liveGoodsBean.getGoodsPrice().getFinalPriceString()), i10, liveGoodsBean.getType(), Integer.valueOf(liveGoodsBean.getSource()), liveGoodsBean.isExplaining(), liveGoodsBean.isSellOut());
}
public View p(int i10) {
View findViewById;
Map<Integer, View> map = this.f42867p;
View view = map.get(Integer.valueOf(i10));
if (view != null) {
return view;
}
View i14 = i();
if (i14 == null || (findViewById = i14.findViewById(i10)) == null) {
return null;
}
map.put(Integer.valueOf(i10), findViewById);
return findViewById;
}
public final void p0(LiveGoodsBean liveGoodsBean) {
AlphaTextView alphaTextView = (AlphaTextView) i().findViewById(R$id.a0f);
if (liveGoodsBean.isSellOut() || (liveGoodsBean.hasOneRMBDraw() && !liveGoodsBean.hasOneRmbLucky())) {
alphaTextView.setTextColor(ContextCompat.getColor(j(), R$color.xhsTheme_colorGray200));
alphaTextView.setBackground(ContextCompat.getDrawable(j(), R$drawable.alpha_bg_rectangle_gray_middle));
return;
}
alphaTextView.setBackground(ContextCompat.getDrawable(j(), R$drawable.alpha_bg_btn_red_1000_corner));
sy.f fVar = sy.f.f131630a;
TextViewConfig textViewConfig = this.f42865n;
String str = null;
alphaTextView.setTextColor(fVar.b(textViewConfig != null ? textViewConfig.m807getTextColor() : null, ContextCompat.getColor(j(), R$color.xhsTheme_colorSurfaceForeground)));
TextViewConfig textViewConfig2 = this.f42865n;
if (textViewConfig2 != null) {
str = textViewConfig2.getBackgroundUrl();
}
boolean z14 = false;
if (str != null) {
if (str.length() > 0) {
z14 = true;
}
}
if (z14) {
Resources system = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
Resources system2 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system2, "Resources.getSystem()");
alphaTextView.i(str, (int) TypedValue.applyDimension(1, (float) 72, system2.getDisplayMetrics()), (int) TypedValue.applyDimension(1, (float) 24, system.getDisplayMetrics()));
}
}
public final void r0() {
View i10 = i();
int i14 = R$id.a0f;
AlphaTextView alphaTextView = (AlphaTextView) i10.findViewById(i14);
Intrinsics.checkNotNullExpressionValue(alphaTextView, "containerView.buyBtn");
ViewGroup.LayoutParams layoutParams = alphaTextView.getLayoutParams();
if (layoutParams != null) {
Resources system = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
layoutParams.width = (int) TypedValue.applyDimension(1, (float) 72, system.getDisplayMetrics());
alphaTextView.setLayoutParams(layoutParams);
AlphaTextView alphaTextView2 = (AlphaTextView) i().findViewById(i14);
Intrinsics.checkNotNullExpressionValue(alphaTextView2, "containerView.buyBtn");
alphaTextView2.setPadding(0, alphaTextView2.getPaddingTop(), 0, alphaTextView2.getPaddingBottom());
return;
}
throw new TypeCastException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
}
public final void s0(boolean z14) {
AlphaTextConfig explaining;
View i10 = i();
View findViewById = i10.findViewById(R$id.b4n);
Intrinsics.checkNotNullExpressionValue(findViewById, "explainGradientView");
String str = null;
q1.Q(findViewById, z14, false, 2, null);
LinearLayout linearLayout = (LinearLayout) i10.findViewById(R$id.b4s);
Intrinsics.checkNotNullExpressionValue(linearLayout, "explainingContainer");
q1.Q(linearLayout, z14, false, 2, null);
if (z14) {
((AlphaConfigLottieView) i10.findViewById(R$id.f39877lottieExplainView)).r();
XYTextView xYTextView = (XYTextView) i10.findViewById(R$id.b4t);
sy.f fVar = sy.f.f131630a;
GoodsExplainConfig goodsExplainConfig = this.f42864m;
if (!(goodsExplainConfig == null || (explaining = goodsExplainConfig.getExplaining()) == null)) {
str = explaining.getColor();
}
xYTextView.setTextColor(fVar.b(str, l0.a(i10.getContext(), R$color.xhsTheme_always_colorWhite1000)));
return;
}
((AlphaConfigLottieView) i10.findViewById(R$id.f39877lottieExplainView)).q();
}
public final void w(LiveGoodsBean liveGoodsBean, int i10) {
String str;
RelativeLayout relativeLayout = (RelativeLayout) i().findViewById(R$id.bfm);
Intrinsics.checkNotNullExpressionValue(relativeLayout, "containerView.goodsImageLayout");
q1.S(relativeLayout, 0, new a(this, liveGoodsBean, i10), 1, null);
q1.S(i(), 0, new b(this, liveGoodsBean, i10), 1, null);
View i14 = i();
int i15 = R$id.a0f;
AlphaTextView alphaTextView = (AlphaTextView) i14.findViewById(i15);
Intrinsics.checkNotNullExpressionValue(alphaTextView, "containerView.buyBtn");
q1.S(alphaTextView, 0, new c(this, liveGoodsBean, i10), 1, null);
View i16 = i();
int i17 = R$id.f39660addCartView;
XYImageView xYImageView = (XYImageView) i16.findViewById(i17);
Intrinsics.checkNotNullExpressionValue(xYImageView, "containerView.addCartView");
GoodsState goodsState = liveGoodsBean.getGoodsState();
q1.Q(xYImageView, goodsState != null ? goodsState.getHasAddCart() : false, false, 2, null);
XYImageView xYImageView2 = (XYImageView) i().findViewById(i17);
if (liveGoodsBean.isSellOut()) {
str = gu2.a.k() ? "https://fe-video-qc.xhscdn.com/fe-platform/d6eeed0e71b957171d352ab121eb08c99c187c00.png?attname=fe-platform/d6eeed0e71b957171d352ab121eb08c99c187c00.png" : "https://fe-video-qc.xhscdn.com/fe-platform/2444d56ad1cf8e2795347ede2d66c17d096b9c33.png?attname=fe-platform/2444d56ad1cf8e2795347ede2d66c17d096b9c33.png";
} else {
str = gu2.a.k() ? "https://fe-video-qc.xhscdn.com/fe-platform/72f1794dd8907d708017c31e9d432a68f8a0f490.png?attname=fe-platform/72f1794dd8907d708017c31e9d432a68f8a0f490.png" : "https://fe-video-qc.xhscdn.com/fe-platform/f354962be2395ddd906d30558ec13db4527347f8/cart_dark.png?attname=fe-platform/f354962be2395ddd906d30558ec13db4527347f8/cart_dark.png";
}
xYImageView2.o(str, g0.f72750a.b());
XYImageView xYImageView3 = (XYImageView) i().findViewById(i17);
Intrinsics.checkNotNullExpressionValue(xYImageView3, "containerView.addCartView");
q1.S(xYImageView3, 0, new d(this, liveGoodsBean, i10), 1, null);
AlphaTextView alphaTextView2 = (AlphaTextView) i().findViewById(i15);
Intrinsics.checkNotNullExpressionValue(alphaTextView2, "containerView.buyBtn");
q1.O(alphaTextView2, false, 0, 3, null);
((AlphaTextView) i().findViewById(i15)).setText(liveGoodsBean.getGoodsViewInfo().getButtonDesc());
r0();
p0(liveGoodsBean);
}
public final void x(LiveGoodsBean liveGoodsBean, int i10, kp.c cVar) {
String str;
String recommendTagUrl;
Intrinsics.checkNotNullParameter(liveGoodsBean, "goodsBean");
Intrinsics.checkNotNullParameter(cVar, "model");
View i14 = i();
int i15 = R$id.g0x;
TextView textView = (TextView) i14.findViewById(i15);
Intrinsics.checkNotNullExpressionValue(textView, "containerView.tvTagBehindIndex");
ViewGroup.LayoutParams layoutParams = textView.getLayoutParams();
Objects.requireNonNull(layoutParams, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
RelativeLayout.LayoutParams layoutParams2 = (RelativeLayout.LayoutParams) layoutParams;
int i16 = R$id.bfo;
layoutParams2.addRule(1, i16);
textView.setLayoutParams(layoutParams2);
if (this.f42862k == 1) {
XYImageView xYImageView = (XYImageView) i().findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView, "containerView.goodsIndexBgView");
q1.r(xYImageView, false, 0, null, 7, null);
TextView textView2 = (TextView) i().findViewById(R$id.beq);
Intrinsics.checkNotNullExpressionValue(textView2, "containerView.goodsCheckedIndexView");
q1.r(textView2, false, 0, null, 7, null);
TextView textView3 = (TextView) i().findViewById(i15);
Intrinsics.checkNotNullExpressionValue(textView3, "containerView.tvTagBehindIndex");
q1.r(textView3, false, 0, null, 7, null);
} else {
boolean z14 = false;
if (liveGoodsBean.isTopArea()) {
TextView textView4 = (TextView) i().findViewById(R$id.beq);
Intrinsics.checkNotNullExpressionValue(textView4, "containerView.goodsCheckedIndexView");
q1.r(textView4, false, 0, null, 7, null);
if (liveGoodsBean.hasSeckill() || liveGoodsBean.isFlashBuyGoods()) {
TextView textView5 = (TextView) i().findViewById(i15);
Intrinsics.checkNotNullExpressionValue(textView5, "containerView.tvTagBehindIndex");
ViewGroup.LayoutParams layoutParams3 = textView5.getLayoutParams();
Objects.requireNonNull(layoutParams3, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
RelativeLayout.LayoutParams layoutParams4 = (RelativeLayout.LayoutParams) layoutParams3;
layoutParams4.removeRule(1);
textView5.setLayoutParams(layoutParams4);
XYImageView xYImageView2 = (XYImageView) i().findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView2, "containerView.goodsIndexBgView");
q1.r(xYImageView2, false, 0, null, 7, null);
R(liveGoodsBean);
} else {
XYImageView xYImageView3 = (XYImageView) i().findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView3, "containerView.goodsIndexBgView");
String str2 = null;
q1.Q(xYImageView3, liveGoodsBean.isHot(), false, 2, null);
TextView textView6 = (TextView) i().findViewById(i15);
Intrinsics.checkNotNullExpressionValue(textView6, "containerView.tvTagBehindIndex");
q1.r(textView6, false, 0, null, 7, null);
GoodsItemIndexConfig goodsItemIndexConfig = this.f42866o;
if (!(goodsItemIndexConfig == null || (recommendTagUrl = goodsItemIndexConfig.getRecommendTagUrl()) == null)) {
if (recommendTagUrl.length() == 0) {
z14 = true;
}
}
if (z14) {
((XYImageView) i().findViewById(i16)).setBackgroundResource(R$drawable.alpha_ic_audience_goods_hot);
} else {
XYImageView xYImageView4 = (XYImageView) i().findViewById(i16);
GoodsItemIndexConfig goodsItemIndexConfig2 = this.f42866o;
if (goodsItemIndexConfig2 != null) {
str2 = goodsItemIndexConfig2.getRecommendTagUrl();
}
xYImageView4.o(str2, g0.f72750a.t());
}
}
} else {
XYImageView xYImageView5 = (XYImageView) i().findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView5, "containerView.goodsIndexBgView");
q1.O(xYImageView5, false, 0, 3, null);
View i17 = i();
int i18 = R$id.beq;
TextView textView7 = (TextView) i17.findViewById(i18);
Intrinsics.checkNotNullExpressionValue(textView7, "containerView.goodsCheckedIndexView");
q1.O(textView7, false, 0, 3, null);
TextView textView8 = (TextView) i().findViewById(i18);
if (cVar.d()) {
str = String.valueOf(liveGoodsBean.getSequenceNumber());
} else {
str = String.valueOf(cVar.c());
}
textView8.setText(str);
if (liveGoodsBean.isFlashBuyGoods() || liveGoodsBean.hasSeckill()) {
c0(true);
R(liveGoodsBean);
} else {
TextView textView9 = (TextView) i().findViewById(i15);
Intrinsics.checkNotNullExpressionValue(textView9, "containerView.tvTagBehindIndex");
q1.r(textView9, false, 0, null, 7, null);
c0(false);
}
}
}
if (liveGoodsBean.isTopArea()) {
((RelativeLayout) i().findViewById(R$id.rootLayout)).setBackgroundColor(nu2.f.e(com.xingin.xhstheme.R$color.xhsTheme_colorGrayLevel7));
} else {
((RelativeLayout) i().findViewById(R$id.rootLayout)).setBackgroundColor(nu2.f.e(com.xingin.xhstheme.R$color.xhsTheme_colorWhite));
}
if (liveGoodsBean.isTopArea()) {
XYImageView xYImageView6 = (XYImageView) i().findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView6, "containerView.goodsIndexBgView");
ViewGroup.LayoutParams layoutParams5 = xYImageView6.getLayoutParams();
if (layoutParams5 != null) {
Resources system = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
layoutParams5.width = (int) TypedValue.applyDimension(1, (float) 30, system.getDisplayMetrics());
xYImageView6.setLayoutParams(layoutParams5);
} else {
throw new TypeCastException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
}
} else if (cVar.b() > 100) {
TextView textView10 = (TextView) i().findViewById(R$id.beq);
Intrinsics.checkNotNullExpressionValue(textView10, "containerView.goodsCheckedIndexView");
ViewGroup.LayoutParams layoutParams6 = textView10.getLayoutParams();
if (layoutParams6 != null) {
float f14 = (float) 25;
Resources system2 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system2, "Resources.getSystem()");
layoutParams6.width = (int) TypedValue.applyDimension(1, f14, system2.getDisplayMetrics());
textView10.setLayoutParams(layoutParams6);
XYImageView xYImageView7 = (XYImageView) i().findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView7, "containerView.goodsIndexBgView");
ViewGroup.LayoutParams layoutParams7 = xYImageView7.getLayoutParams();
if (layoutParams7 != null) {
Resources system3 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system3, "Resources.getSystem()");
layoutParams7.width = (int) TypedValue.applyDimension(1, f14, system3.getDisplayMetrics());
xYImageView7.setLayoutParams(layoutParams7);
} else {
throw new TypeCastException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
}
} else {
throw new TypeCastException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
}
} else {
XYImageView xYImageView8 = (XYImageView) i().findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYImageView8, "containerView.goodsIndexBgView");
ViewGroup.LayoutParams layoutParams8 = xYImageView8.getLayoutParams();
if (layoutParams8 != null) {
Resources system4 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system4, "Resources.getSystem()");
layoutParams8.width = (int) TypedValue.applyDimension(1, (float) 20, system4.getDisplayMetrics());
xYImageView8.setLayoutParams(layoutParams8);
} else {
throw new TypeCastException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
}
}
((XYImageView) i().findViewById(R$id.goodsImageView)).o(liveGoodsBean.getGoodsViewInfo().getImage(), g0.f72750a.b());
View i19 = i();
ViewGroup.LayoutParams layoutParams9 = i19.getLayoutParams();
if (layoutParams9 != null) {
Resources system5 = Resources.getSystem();
Intrinsics.checkExpressionValueIsNotNull(system5, "Resources.getSystem()");
layoutParams9.height = (int) TypedValue.applyDimension(1, (float) 124, system5.getDisplayMetrics());
i19.setLayoutParams(layoutParams9);
AlphaTextView alphaTextView = (AlphaTextView) i().findViewById(R$id.e6i);
Intrinsics.checkNotNullExpressionValue(alphaTextView, "containerView.playBackView");
q1.S(alphaTextView, 0, new e(this, i10), 1, null);
AlphaTextView alphaTextView2 = (AlphaTextView) i().findViewById(R$id.elu);
Intrinsics.checkNotNullExpressionValue(alphaTextView2, "containerView.requestExplainView");
q1.S(alphaTextView2, 0, new f(liveGoodsBean, this, i10), 1, null);
if (liveGoodsBean.isSellOut()) {
SelectRoundLinearLayout selectRoundLinearLayout = (SelectRoundLinearLayout) i().findViewById(R$id.bgq);
Intrinsics.checkNotNullExpressionValue(selectRoundLinearLayout, "containerView.goodsSellOutContainer");
q1.O(selectRoundLinearLayout, false, 0, 3, null);
} else {
SelectRoundLinearLayout selectRoundLinearLayout2 = (SelectRoundLinearLayout) i().findViewById(R$id.bgq);
Intrinsics.checkNotNullExpressionValue(selectRoundLinearLayout2, "containerView.goodsSellOutContainer");
q1.r(selectRoundLinearLayout2, false, 0, null, 7, null);
}
((AlphaGoodsTagLayout) i().findViewById(R$id.bh3)).u(liveGoodsBean.getGoodsViewInfo().getTitle(), liveGoodsBean.getGoodsViewInfo().getTitleIcons(), F());
A(liveGoodsBean, cVar);
B(liveGoodsBean);
y(liveGoodsBean);
w(liveGoodsBean, i10);
z(liveGoodsBean);
E(liveGoodsBean);
D(liveGoodsBean, i10, cVar);
return;
}
throw new TypeCastException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
}
public final void y(LiveGoodsBean liveGoodsBean) {
GoodsExplainConfig explainConfig;
IconUrlConfig explainLottie;
if (liveGoodsBean.isExplaining()) {
s0(true);
GoodsBagItemConfig goodsBagItemConfig = this.f42863l;
if (!(goodsBagItemConfig == null || (explainConfig = goodsBagItemConfig.getExplainConfig()) == null || (explainLottie = explainConfig.getExplainLottie()) == null)) {
((AlphaConfigLottieView) i().findViewById(R$id.f39877lottieExplainView)).D(explainLottie);
}
AlphaTextView alphaTextView = (AlphaTextView) i().findViewById(R$id.elu);
Intrinsics.checkNotNullExpressionValue(alphaTextView, "containerView.requestExplainView");
q1.r(alphaTextView, false, 0, null, 7, null);
AlphaTextView alphaTextView2 = (AlphaTextView) i().findViewById(R$id.e6i);
Intrinsics.checkNotNullExpressionValue(alphaTextView2, "containerView.playBackView");
q1.r(alphaTextView2, false, 0, null, 7, null);
return;
}
s0(false);
}
@SuppressLint({"SetTextI18n"})
public final void z(LiveGoodsBean liveGoodsBean) {
AlphaTextConfig finalPriceColor;
AlphaTextConfig finalPriceColor2;
AlphaTextConfig finalPriceColor3;
GoodsPriceInfo goodsPrice = liveGoodsBean.getGoodsPrice();
((AlphaGoodsTagLayout) p(R$id.f39840couponContainer)).s(liveGoodsBean.getGoodsViewInfo().getPriceTags(), F());
Double salePrice = goodsPrice.getSalePrice();
double doubleValue = salePrice != null ? salePrice.doubleValue() : 0.0d;
boolean z14 = true;
if (goodsPrice.getShowFinalPrice()) {
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
String format = String.format("¥%s", Arrays.copyOf(new Object[]{ks.e.L(String.valueOf(doubleValue))}, 1));
Intrinsics.checkNotNullExpressionValue(format, "format(format, *args)");
((TextView) i().findViewById(R$id.eua)).setText(format);
} else {
((TextView) i().findViewById(R$id.b8p)).setText(ks.e.L(String.valueOf(doubleValue)));
}
View i10 = i();
int i14 = R$id.eua;
TextView textView = (TextView) i10.findViewById(i14);
i0 i0Var = i0.f131674a;
float f14 = 12.0f;
textView.setTextSize(i0Var.R() ? 8.0f : 12.0f);
TextView textView2 = (TextView) i().findViewById(i14);
Intrinsics.checkNotNullExpressionValue(textView2, "containerView.salePriceView");
q1.Q(textView2, goodsPrice.getShowSalePrice(), false, 2, null);
View i15 = i();
int i16 = R$id.fjb;
XYTextView xYTextView = (XYTextView) i15.findViewById(i16);
Intrinsics.checkNotNullExpressionValue(xYTextView, "containerView.textPricePrefix");
String finalPriceDesc = goodsPrice.getFinalPriceDesc();
q1.Q(xYTextView, (finalPriceDesc != null && finalPriceDesc.length() > 0) && goodsPrice.getShowFinalPrice(), false, 2, null);
View i17 = i();
int i18 = R$id.b8p;
TextView textView3 = (TextView) i17.findViewById(i18);
sy.f fVar = sy.f.f131630a;
GoodsBagItemConfig goodsBagItemConfig = this.f42863l;
String color = (goodsBagItemConfig == null || (finalPriceColor3 = goodsBagItemConfig.getFinalPriceColor()) == null) ? null : finalPriceColor3.getColor();
int i19 = R$color.xhsTheme_colorRed400;
textView3.setTextColor(fVar.b(color, nu2.f.e(i19)));
XYTextView xYTextView2 = (XYTextView) i().findViewById(i16);
GoodsBagItemConfig goodsBagItemConfig2 = this.f42863l;
xYTextView2.setTextColor(fVar.b((goodsBagItemConfig2 == null || (finalPriceColor2 = goodsBagItemConfig2.getFinalPriceColor()) == null) ? null : finalPriceColor2.getColor(), nu2.f.e(i19)));
TextView textView4 = (TextView) i().findViewById(R$id.fzh);
GoodsBagItemConfig goodsBagItemConfig3 = this.f42863l;
textView4.setTextColor(fVar.b((goodsBagItemConfig3 == null || (finalPriceColor = goodsBagItemConfig3.getFinalPriceColor()) == null) ? null : finalPriceColor.getColor(), nu2.f.e(i19)));
((XYTextView) i().findViewById(i16)).setText(goodsPrice.getFinalPriceDesc());
TextView textView5 = (TextView) i().findViewById(i18);
if (!i0Var.R()) {
f14 = 16.0f;
}
textView5.setTextSize(f14);
textView5.setText(ks.e.L(goodsPrice.getFinalPriceString()));
textView5.setTypeface(this.f42859h);
TextView textView6 = (TextView) i().findViewById(i14);
textView6.setTextColor(nu2.f.e(R$color.xhsTheme_colorGray400));
textView6.getPaint().setAntiAlias(true);
textView6.getPaint().setFlags(16);
textView6.setTypeface(this.f42859h);
((TextView) i().findViewById(R$id.subTitleView)).setTextColor(nu2.f.e(R$color.xhsTheme_colorGray600));
View i24 = i();
int i25 = R$id.fja;
((TextView) i24.findViewById(i25)).setTextColor(nu2.f.e(R$color.xhsTheme_colorRed));
TextView textView7 = (TextView) i().findViewById(i25);
Intrinsics.checkNotNullExpressionValue(textView7, "containerView.textPriceDesc");
String afterPriceDesc = liveGoodsBean.getGoodsPrice().getAfterPriceDesc();
if (afterPriceDesc == null || afterPriceDesc.length() <= 0) {
z14 = false;
}
q1.Q(textView7, z14, false, 2, null);
((TextView) i().findViewById(i25)).setText(liveGoodsBean.getGoodsPrice().getAfterPriceDesc());
}
}