小红书.apk(点击下载) / AlphaIntroducingThemeCardViewV2.java


package com.xingin.alpha.goods.view.card;

import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.xingin.alpha.R$drawable;
import com.xingin.alpha.R$id;
import com.xingin.alpha.R$layout;
import com.xingin.alpha.bean.GoodsCardTagConfig;
import com.xingin.alpha.goods.view.events.AlphaThemeBannerPagerAdapter;
import com.xingin.alpha.ui.loop.BannerViewPager;
import com.xingin.alpha.ui.loop.BannerViewPagerAdapter;
import com.xingin.android.mixim.msg.bean.common.MsgThemeGoodsCardInfo;
import com.xingin.ui.textview.XYTextView;
import com.xingin.widgets.XYImageView;
import el.g0;
import fy.l;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Deprecated;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
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 sy.q1;
import y7.f;
import z60.h;

@Deprecated(message = "下线一半了")
@Metadata(bv = {}, d1 = {"\u0000b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000f\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\t\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u0007\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0007\u0018\u00002\u00020\u0001B'\b\u0007\u0012\u0006\u00105\u001a\u000204\u0012\n\b\u0002\u00107\u001a\u0004\u0018\u000106\u0012\b\b\u0002\u00108\u001a\u00020,¢\u0006\u0004\b9\u0010:J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J*\u0010\u000b\u001a\u00020\u00042\u0006\u0010\u0006\u001a\u00020\u00022\u0010\b\u0002\u0010\b\u001a\n\u0012\u0004\u0012\u00020\u0004\u0018\u00010\u00072\b\u0010\n\u001a\u0004\u0018\u00010\tJ\b\u0010\f\u001a\u00020\u0004H\u0016J\b\u0010\r\u001a\u00020\u0004H\u0016J\b\u0010\u000e\u001a\u00020\u0004H\u0016J\b\u0010\u000f\u001a\u00020\u0004H\u0002J\b\u0010\u0010\u001a\u00020\u0004H\u0002R\u0018\u0010\u0013\u001a\u0004\u0018\u00010\u00028\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\b\u0011\u0010\u0012R\u001e\u0010\b\u001a\n\u0012\u0004\u0012\u00020\u0004\u0018\u00010\u00078\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\b\u0014\u0010\u0015R\u0018\u0010\u0018\u001a\u0004\u0018\u00010\t8\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\b\u0016\u0010\u0017R&\u0010\u001e\u001a\u0012\u0012\u0004\u0012\u00020\u001a0\u0019j\b\u0012\u0004\u0012\u00020\u001a`\u001b8\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\b\u001c\u0010\u001dR\u001c\u0010#\u001a\u00020\u001a8\u0002@\u0002X‚\u000e¢\u0006\f\n\u0004\b\u001f\u0010 \u0012\u0004\b!\u0010\"R\u0016\u0010'\u001a\u00020$8\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\b%\u0010&R\u0014\u0010+\u001a\u00020(8\u0002X‚\u0004¢\u0006\u0006\n\u0004\b)\u0010*R\u0016\u0010/\u001a\u00020,8\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\b-\u0010.R\u0016\u00103\u001a\u0002008\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\b1\u00102¨\u0006;"}, d2 = {"Lcom/xingin/alpha/goods/view/card/AlphaIntroducingThemeCardViewV2;", "Lcom/xingin/alpha/goods/view/card/AlphaAbsGoodsCard;", "Lcom/xingin/android/mixim/msg/bean/common/MsgThemeGoodsCardInfo;", "themeGoodsBean", "", "setNewThemeGoodsInfo", "themeGoods", "Lkotlin/Function0;", "onOpenSingleGoodsDialog", "Landroid/view/View;", "rootView", "E0", com.igexin.push.core.d.c.f25536c, "O", "D0", "F0", "C0", "e", "Lcom/xingin/android/mixim/msg/bean/common/MsgThemeGoodsCardInfo;", "themeGoodsCardInfo", f.f156778k, "Lkotlin/jvm/functions/Function0;", "g", "Landroid/view/View;", "rootViewGroup", "Ljava/util/ArrayList;", "", "Lkotlin/collections/ArrayList;", h.f160753a, "Ljava/util/ArrayList;", "dataList", "i", "Ljava/lang/String;", "getGoodsCardType$annotations", "()V", "goodsCardType", "", "j", "J", "startDisplayTime", "Lcom/xingin/alpha/goods/view/events/AlphaThemeBannerPagerAdapter;", "k", "Lcom/xingin/alpha/goods/view/events/AlphaThemeBannerPagerAdapter;", "adapter", "", "l", "I", "isExplain", "", "m", "F", "priceSum", "Landroid/content/Context;", "context", "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: AlphaIntroducingThemeCardViewV2.kt */
public final class AlphaIntroducingThemeCardViewV2 extends AlphaAbsGoodsCard {

    /* renamed from: e  reason: collision with root package name */
    public MsgThemeGoodsCardInfo f43859e;

    /* renamed from: f  reason: collision with root package name */
    public Function0<Unit> f43860f;

    /* renamed from: g  reason: collision with root package name */
    public View f43861g;

    /* renamed from: h  reason: collision with root package name */
    public ArrayList<String> f43862h;

    /* renamed from: i  reason: collision with root package name */
    public String f43863i;

    /* renamed from: j  reason: collision with root package name */
    public long f43864j;

    /* renamed from: k  reason: collision with root package name */
    public final AlphaThemeBannerPagerAdapter f43865k;

    /* renamed from: l  reason: collision with root package name */
    public int f43866l;

    /* renamed from: m  reason: collision with root package name */
    public float f43867m;

    /* renamed from: n  reason: collision with root package name */
    public Map<Integer, View> f43868n;

    @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: AlphaIntroducingThemeCardViewV2.kt */
    public static final class a extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaIntroducingThemeCardViewV2 f43869a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(AlphaIntroducingThemeCardViewV2 alphaIntroducingThemeCardViewV2) {
            super(0);
            this.f43869a = alphaIntroducingThemeCardViewV2;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            Function0 function0 = this.f43869a.f43860f;
            if (function0 != null) {
                function0.invoke();
            }
            l lVar = l.f79526a;
            d2 d2Var = d2.f102239a;
            String A0 = d2Var.A0();
            String T = d2Var.T();
            float h10 = is.a.f92323a.h(this.f43869a.f43859e);
            boolean J2 = d2Var.J();
            String str = this.f43869a.f43863i;
            MsgThemeGoodsCardInfo msgThemeGoodsCardInfo = this.f43869a.f43859e;
            lVar.h(A0, T, "suit", "", 0, h10, "", J2, null, null, str, msgThemeGoodsCardInfo != null && msgThemeGoodsCardInfo.isExplain() == 1, false, "suit");
        }
    }

    @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: AlphaIntroducingThemeCardViewV2.kt */
    public static final class b extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaIntroducingThemeCardViewV2 f43870a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(AlphaIntroducingThemeCardViewV2 alphaIntroducingThemeCardViewV2) {
            super(0);
            this.f43870a = alphaIntroducingThemeCardViewV2;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            this.f43870a.v0();
            this.f43870a.O();
            l lVar = l.f79526a;
            d2 d2Var = d2.f102239a;
            String A0 = d2Var.A0();
            String T = d2Var.T();
            float h10 = is.a.f92323a.h(this.f43870a.f43859e);
            int currentTimeMillis = (int) (System.currentTimeMillis() - this.f43870a.f43864j);
            boolean J2 = d2Var.J();
            String str = this.f43870a.f43863i;
            MsgThemeGoodsCardInfo msgThemeGoodsCardInfo = this.f43870a.f43859e;
            lVar.g(A0, T, "", "", 0, h10, currentTimeMillis, J2, null, null, str, msgThemeGoodsCardInfo != null && msgThemeGoodsCardInfo.isExplain() == 1, false);
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\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 = {"", "<anonymous parameter 0>", "", "<anonymous parameter 1>", "", "a", "(ILjava/lang/String;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaIntroducingThemeCardViewV2.kt */
    public static final class c extends Lambda implements Function2<Integer, String, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaIntroducingThemeCardViewV2 f43871a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(AlphaIntroducingThemeCardViewV2 alphaIntroducingThemeCardViewV2) {
            super(2);
            this.f43871a = alphaIntroducingThemeCardViewV2;
        }

        public final void a(int i10, String str) {
            Intrinsics.checkNotNullParameter(str, "<anonymous parameter 1>");
            Function0 function0 = this.f43871a.f43860f;
            if (function0 != null) {
                function0.invoke();
            }
            l lVar = l.f79526a;
            d2 d2Var = d2.f102239a;
            lVar.h(d2Var.A0(), d2Var.T(), "suit", "", 0, this.f43871a.f43867m, "", d2Var.J(), null, null, "mall_goods_suit", this.f43871a.f43866l == 1, false, "suit");
        }

        /* 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, String str) {
            a(num.intValue(), str);
            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: AlphaIntroducingThemeCardViewV2.kt */
    public static final class d extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaIntroducingThemeCardViewV2 f43872a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(AlphaIntroducingThemeCardViewV2 alphaIntroducingThemeCardViewV2) {
            super(0);
            this.f43872a = alphaIntroducingThemeCardViewV2;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            bj2.l.b(this.f43872a);
        }
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    @JvmOverloads
    public AlphaIntroducingThemeCardViewV2(Context context, AttributeSet attributeSet, int i10) {
        super(context, attributeSet, i10);
        String str;
        Intrinsics.checkNotNullParameter(context, "context");
        this.f43868n = new LinkedHashMap();
        this.f43862h = new ArrayList<>();
        this.f43863i = "mall_goods_suit";
        AlphaThemeBannerPagerAdapter alphaThemeBannerPagerAdapter = new AlphaThemeBannerPagerAdapter(context);
        this.f43865k = alphaThemeBannerPagerAdapter;
        ViewGroup.inflate(context, R$layout.f40371alpha_view_introducing_theme_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);
        XYImageView xYImageView = (XYImageView) _$_findCachedViewById(R$id.ffb);
        GoodsCardTagConfig tagConfig = getTagConfig();
        xYImageView.o((tagConfig == null || (str = tagConfig.getThemeTagUrl()) == null) ? "https://picasso-static.xiaohongshu.com/fe-platform/e4557569e69e157ff11a5017f15d036a933a1ad2.png" : str, g0.f72750a.t());
        q1.S(this, 0, new a(this), 1, null);
        ImageView imageView = (ImageView) _$_findCachedViewById(R$id.closeBtn);
        Intrinsics.checkNotNullExpressionValue(imageView, "closeBtn");
        q1.S(imageView, 0, new b(this), 1, null);
        ((BannerViewPager) _$_findCachedViewById(R$id.cwr)).setAdapter((BannerViewPagerAdapter) alphaThemeBannerPagerAdapter);
    }

    private static /* synthetic */ void getGoodsCardType$annotations() {
    }

    private final void setNewThemeGoodsInfo(MsgThemeGoodsCardInfo msgThemeGoodsCardInfo) {
        ((XYTextView) _$_findCachedViewById(R$id.titleView)).setText(msgThemeGoodsCardInfo.getTitle());
        MsgThemeGoodsCardInfo msgThemeGoodsCardInfo2 = this.f43859e;
        if (msgThemeGoodsCardInfo2 != null) {
            this.f43862h.clear();
            ArrayList<String> arrayList = this.f43862h;
            is.a aVar = is.a.f92323a;
            arrayList.addAll(aVar.b(msgThemeGoodsCardInfo2));
            this.f43867m = aVar.h(msgThemeGoodsCardInfo2);
            this.f43866l = msgThemeGoodsCardInfo2.isExplain();
            F0();
        }
    }

    public final void C0() {
        this.f43865k.k(new c(this));
    }

    public void D0() {
        d2.f102239a.a2(false);
        e.f107591a.h();
        v0();
    }

    public final void E0(MsgThemeGoodsCardInfo msgThemeGoodsCardInfo, Function0<Unit> function0, View view) {
        Intrinsics.checkNotNullParameter(msgThemeGoodsCardInfo, "themeGoods");
        this.f43859e = msgThemeGoodsCardInfo;
        this.f43861g = view;
        this.f43860f = function0;
        this.f43864j = System.currentTimeMillis();
        setNewThemeGoodsInfo(msgThemeGoodsCardInfo);
        bj2.l.q(this);
        d2 d2Var = d2.f102239a;
        d2Var.a2(true);
        AlphaAbsGoodsCard.q0(this, view, null, 2, null);
        AlphaAbsGoodsCard.s0(this, null, 1, null);
        l.f79526a.i(d2Var.A0(), d2Var.T(), "suit", "", 0, is.a.f92323a.h(this.f43859e), d2Var.J(), null, null, this.f43863i, msgThemeGoodsCardInfo.isExplain() == 1, false);
    }

    public final void F0() {
        AlphaThemeBannerPagerAdapter alphaThemeBannerPagerAdapter = this.f43865k;
        boolean z14 = true;
        if (this.f43862h.size() <= 1) {
            z14 = false;
        }
        alphaThemeBannerPagerAdapter.b(z14);
        BannerViewPagerAdapter.n(this.f43865k, this.f43862h, false, 2, null);
        C0();
    }

    @Override // ms.f
    public void O() {
        D0();
        View view = this.f43861g;
        View view2 = null;
        View findViewById = view != null ? view.findViewById(R$id.ben) : null;
        View view3 = this.f43861g;
        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.f43868n;
        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() {
        D0();
        bj2.l.b(this);
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ AlphaIntroducingThemeCardViewV2(Context context, AttributeSet attributeSet, int i10, int i14, DefaultConstructorMarker defaultConstructorMarker) {
        this(context, (i14 & 2) != 0 ? null : attributeSet, (i14 & 4) != 0 ? 0 : i10);
    }
}