TikTok.apk(点击下载) / C63808P3l.java


package X;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.TextPaint;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import androidx.appcompat.widget.AppCompatImageView;
import com.bytedance.covode.number.Covode;
import com.bytedance.lighten.loader.SmartImageView;
import com.bytedance.router.SmartRouter;
import com.bytedance.tux.input.TuxTextView;
import com.bytedance.tux.widget.FlowLayout;
import com.ss.android.ugc.aweme.ecommerce.ECommerceService;
import com.ss.android.ugc.aweme.ecommercebase.dto.GImage;
import com.ss.android.ugc.aweme.ecommercebase.dto.PromotionItem;
import com.ss.android.ugc.aweme.ecommercebase.dto.PromotionView;
import com.ss.android.ugc.aweme.ecommercebase.network.BaseResponse;
import com.ss.android.ugc.aweme.ecommercelive.business.audience.api.AudienceProductListApi;
import com.ss.android.ugc.aweme.ecommercelive.business.audience.popcard.vo.PopupCardVO;
import com.ss.android.ugc.aweme.ecommercelive.business.common.view.LogoTuxTextView;
import com.ss.android.ugc.aweme.live.ILiveOuterService;
import com.ss.android.ugc.aweme.live.LiveOuterService;
import com.zhiliaoapp.musically.R;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Set;
import kotlin.g.b.m;

/* renamed from: X.P3l  reason: case insensitive filesystem */
public final class C63808P3l extends RelativeLayout implements P3Z {
    public static final P4H LIZ = new P4H((byte) 0);
    public AnonymousClass36P LIZIZ;
    public SparseArray LIZJ;

    static {
        Covode.recordClassIndex(64298);
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public C63808P3l(Context context) {
        super(context, null, 0);
        C21090sc.LIZ(context);
        this.LIZIZ = new AnonymousClass36P();
        LayoutInflater.from(context).cloneInContext(new ContextThemeWrapper(context, (int) R.style.y2)).inflate(R.layout.a4_, this);
        setLayoutParams(new RelativeLayout.LayoutParams(C44801pl.LIZ(300, context), -2));
        TuxTextView tuxTextView = (TuxTextView) LIZ(R.id.b2j);
        m.LIZIZ(tuxTextView, "");
        TextPaint paint = tuxTextView.getPaint();
        paint.setFlags(16);
        paint.setAntiAlias(true);
        setPadding(0, C44801pl.LIZ(2, context), 0, C44801pl.LIZ(8, context));
    }

    public /* synthetic */ C63808P3l(Context context, byte b) {
        this(context);
    }

    private final void LIZ(PopupCardVO popupCardVO) {
        List list;
        FlowLayout flowLayout = (FlowLayout) LIZ(R.id.b2k);
        m.LIZIZ(flowLayout, "");
        PromotionView promotionView = popupCardVO.getPromotionView();
        if (promotionView == null || (list = promotionView.LIZ) == null) {
            list = AnonymousClass1I6.INSTANCE;
        }
        C213108Yx.LIZ(flowLayout, list, AnonymousClass8Z1.POP_CARD);
    }

    private final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr, boolean z) {
        C87053bi r10 = new C87053bi();
        r10.element = System.currentTimeMillis();
        ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(getContext(), (int) R.style.y2);
        C225448tR r3 = new C225448tR();
        r3.LIZIZ = Integer.valueOf((int) R.attr.a5t);
        Resources system = Resources.getSystem();
        m.LIZIZ(system, "");
        r3.LIZJ = Float.valueOf(TypedValue.applyDimension(1, 2.0f, system.getDisplayMetrics()));
        Drawable LIZ2 = r3.LIZ(contextThemeWrapper);
        ((SmartImageView) LIZ(R.id.b2p)).setPlaceholderImage(LIZ2);
        String LIZ3 = C1810479p.LIZ(popupCardVO.getImageUrl(), 216, 216);
        C61449OAs oAs = new C61449OAs(this, fJr, LIZ3, LIZ2, r10, popupCardVO, z);
        AbstractC34521Yb<C23860x5> LIZ4 = C186727Vl.LIZ.LIZ(LIZ3);
        if (LIZ4 == null || !LIZ4.LJIIJ()) {
            AbstractC32261Pj unused = C24240xh.LIZ(AnonymousClass1JQ.LIZ, AnonymousClass2RI.LIZ, null, new C59569NaA(LIZ4, oAs, null), 2);
        } else {
            oAs.LIZ(true);
        }
    }

    private final void LIZJ(PopupCardVO popupCardVO, C38750FJr fJr) {
        if (popupCardVO.getPlatform() == 5 || (popupCardVO.getPlatform() == 6 && popupCardVO.getSchema() != null)) {
            String str = null;
            String LIZJ2 = fJr != null ? fJr.LIZJ("author_id") : null;
            String LIZJ3 = fJr != null ? fJr.LIZJ("room_id") : null;
            String LIZJ4 = fJr != null ? fJr.LIZJ("enter_from_merge") : null;
            String LIZJ5 = fJr != null ? fJr.LIZJ("enter_method") : null;
            String LIZJ6 = fJr != null ? fJr.LIZJ("action_type") : null;
            String LIZJ7 = fJr != null ? fJr.LIZJ("follow_status") : null;
            String LIZJ8 = fJr != null ? fJr.LIZJ("list_skin_type") : null;
            if (fJr != null) {
                str = fJr.LIZJ("product_skin_type");
            }
            int platform = popupCardVO.getPlatform();
            String schema = popupCardVO.getSchema();
            C63810P3n p3n = new C63810P3n((byte) 0);
            if (LIZJ2 == null) {
                LIZJ2 = "";
            }
            p3n.LIZIZ = LIZJ2;
            p3n.LIZJ = String.valueOf(popupCardVO.getProductId());
            p3n.LJIIJ = "live";
            p3n.LIZ = "live_popup_card";
            p3n.LJIIIIZZ = LIZJ3;
            p3n.LIZLLL = LIZJ4 + "_temai_" + LIZJ5;
            p3n.LJ = LIZJ6;
            p3n.LJFF = String.valueOf(popupCardVO.getPlatform());
            p3n.LJI = String.valueOf(popupCardVO.getSourceFrom());
            p3n.LJII = popupCardVO.getSource();
            p3n.LJIIIZ = LIZJ7;
            p3n.LJIILLIIL = LIZJ8;
            p3n.LJIIZILJ = str;
            String LIZ2 = C63809P3m.LIZ(platform, schema, p3n);
            if (LIZ2 != null) {
                ECommerceService.createIECommerceServicebyMonsterPlugin(false).prefetchPdp(LIZ2, getContext());
            }
        }
    }

    public final C39381h1 LIZ(Integer num, String str, String str2, String str3) {
        Object obj;
        T t;
        Boolean valueOf = Boolean.valueOf(new C63821P3y(num, str, str2, str3).LIZ());
        C39381h1 r3 = null;
        if (!valueOf.booleanValue() || valueOf == null) {
            return null;
        }
        valueOf.booleanValue();
        try {
            AudienceProductListApi audienceProductListApi = (AudienceProductListApi) C782836j.LIZ.LIZ(AudienceProductListApi.class, "https://oec-api.tiktokv.com");
            int intValue = num != null ? num.intValue() : 0;
            if (str == null) {
                str = "";
            }
            if (str2 == null) {
                str2 = "";
            }
            if (str3 == null) {
                str3 = "";
            }
            C09430Zo<BaseResponse<C39381h1>> execute = audienceProductListApi.getFansPopUp(intValue, str, str2, str3).execute();
            obj = C23790wy.m3constructorimpl((execute == null || (t = execute.LIZIZ) == null) ? null : (C39381h1) t.getData());
        } catch (Throwable th) {
            obj = C23790wy.m3constructorimpl(C23800wz.LIZ(th));
        }
        if (!C23790wy.m8isFailureimpl(obj)) {
            r3 = obj;
        }
        return r3;
    }

    public final C52664Km5 LIZ() {
        C52665Km6 km6 = new C52665Km6();
        km6.LJ = C74082vt.LIZ(2.0f);
        km6.LIZ = false;
        C52664Km5 LIZ2 = km6.LIZ();
        m.LIZIZ(LIZ2, "");
        return LIZ2;
    }

    public final View LIZ(int i2) {
        if (this.LIZJ == null) {
            this.LIZJ = new SparseArray();
        }
        View view = (View) this.LIZJ.get(i2);
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i2);
        this.LIZJ.put(i2, findViewById);
        return findViewById;
    }

    public final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr) {
        String str;
        AbstractC31108CJt LJ;
        P3Y LJIIIZ;
        AbstractC31108CJt LJ2;
        P3Y LJIIIZ2;
        String LIZJ2 = fJr != null ? fJr.LIZJ("author_id") : null;
        String LIZJ3 = fJr != null ? fJr.LIZJ("room_id") : null;
        String LIZJ4 = fJr != null ? fJr.LIZJ("enter_from_merge") : null;
        String LIZJ5 = fJr != null ? fJr.LIZJ("enter_method") : null;
        String LIZJ6 = fJr != null ? fJr.LIZJ("action_type") : null;
        String LIZJ7 = fJr != null ? fJr.LIZJ("follow_status") : null;
        String LIZJ8 = fJr != null ? fJr.LIZJ("entrance_form") : null;
        String LIZJ9 = fJr != null ? fJr.LIZJ("is_ad") : null;
        String LIZJ10 = fJr != null ? fJr.LIZJ("request_id") : null;
        String LIZJ11 = fJr != null ? fJr.LIZJ("list_skin_type") : null;
        String LIZJ12 = fJr != null ? fJr.LIZJ("product_skin_type") : null;
        String LIZJ13 = fJr != null ? fJr.LIZJ("search_id") : null;
        String LIZJ14 = fJr != null ? fJr.LIZJ("search_result_id") : null;
        if (fJr == null || (str = fJr.LIZJ("track_id")) == null) {
            str = "";
        }
        C63810P3n p3n = new C63810P3n((byte) 0);
        if (LIZJ2 == null) {
            LIZJ2 = "";
        }
        p3n.LIZIZ = LIZJ2;
        p3n.LIZJ = String.valueOf(popupCardVO.getProductId());
        p3n.LJIIJ = "live";
        p3n.LIZ = "live_popup_card";
        p3n.LJIIIIZZ = LIZJ3;
        p3n.LIZLLL = LIZJ4 + "_temai_" + LIZJ5;
        p3n.LJ = LIZJ6;
        p3n.LJFF = String.valueOf(popupCardVO.getPlatform());
        p3n.LJI = String.valueOf(popupCardVO.getSourceFrom());
        p3n.LJII = popupCardVO.getSource();
        p3n.LJIIIZ = LIZJ7;
        p3n.LJIIJJI = LIZJ8;
        p3n.LJIIL = LIZJ9;
        ILiveOuterService LJJIFFI = LiveOuterService.LJJIFFI();
        p3n.LJIILIIL = (LJJIFFI == null || (LJ2 = LJJIFFI.LJ()) == null || (LJIIIZ2 = LJ2.LJIIIZ()) == null) ? null : LJIIIZ2.LJIILL();
        ILiveOuterService LJJIFFI2 = LiveOuterService.LJJIFFI();
        p3n.LJIILJJIL = (LJJIFFI2 == null || (LJ = LJJIFFI2.LJ()) == null || (LJIIIZ = LJ.LJIIIZ()) == null) ? null : LJIIIZ.LJIILLIIL();
        if (LIZJ10 == null) {
            LIZJ10 = "";
        }
        p3n.LJIILL = LIZJ10;
        p3n.LJIILLIIL = LIZJ11;
        p3n.LJIIZILJ = LIZJ12;
        p3n.LJIJ = LIZJ13;
        p3n.LJIJI = LIZJ14;
        p3n.LJIJJLI = str;
        if (C80983Gt.LIZ(popupCardVO.getSchema())) {
            SmartRouter.buildRoute(getContext(), C63809P3m.LIZ(popupCardVO.getPlatform(), popupCardVO.getSchema(), p3n)).open();
            return;
        }
        int LIZJ15 = AnonymousClass0NQ.LIZJ(getContext(), ((float) AnonymousClass0NQ.LIZIZ(getContext())) * 0.9f);
        C11460d5 r3 = new C11460d5("sslocal://webcast_webview");
        r3.LIZ("title", popupCardVO.getTitle());
        r3.LIZ("gravity", "bottom");
        r3.LIZ("type", "popup");
        r3.LIZ(C62398Oeh.LJFF, String.valueOf(LIZJ15));
        r3.LIZ("hide_nav_bar", 1);
        C11460d5 r2 = new C11460d5(popupCardVO.getOpenUrl());
        r2.LIZ("web_bg_color", "FFFFFF");
        r2.LIZ("hide_loading", 0);
        r3.LIZ("url", r2.LIZ());
        ILiveOuterService LJJIFFI3 = LiveOuterService.LJJIFFI();
        m.LIZIZ(LJJIFFI3, "");
        LJJIFFI3.LJ().LIZ(getContext(), Uri.parse(r3.LIZ() + "&use_page_back=true&show_title_bar=true&show_title_close=true"));
    }

    public final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr, AnonymousClass1IM<? super String, C23860x5> r9, AnonymousClass1IL<C23860x5> r10, boolean z) {
        C21090sc.LIZ(popupCardVO);
        LIZJ(popupCardVO, fJr);
        LIZ(popupCardVO, fJr, z);
        LIZ(popupCardVO);
        ((LogoTuxTextView) LIZ(R.id.b2o)).LIZ(popupCardVO.getTitle(), popupCardVO.getPromotionLogos());
        TuxTextView tuxTextView = (TuxTextView) LIZ(R.id.b2q);
        m.LIZIZ(tuxTextView, "");
        String formatAvailablePrice = popupCardVO.getFormatAvailablePrice();
        if (formatAvailablePrice == null) {
            formatAvailablePrice = popupCardVO.getPrice();
        }
        tuxTextView.setText(formatAvailablePrice);
        ((TuxTextView) LIZ(R.id.b2q)).setMinTextSize(10.0f);
        TuxTextView tuxTextView2 = (TuxTextView) LIZ(R.id.b2j);
        m.LIZIZ(tuxTextView2, "");
        tuxTextView2.setText(popupCardVO.getFormatOriginPrice());
        if (popupCardVO.getBagIndex() == 0) {
            TuxTextView tuxTextView3 = (TuxTextView) LIZ(R.id.b2n);
            m.LIZIZ(tuxTextView3, "");
            tuxTextView3.setVisibility(8);
            TuxTextView tuxTextView4 = (TuxTextView) LIZ(R.id.b2l);
            m.LIZIZ(tuxTextView4, "");
            tuxTextView4.setVisibility(8);
        } else {
            TuxTextView tuxTextView5 = (TuxTextView) LIZ(R.id.b2n);
            m.LIZIZ(tuxTextView5, "");
            tuxTextView5.setVisibility(0);
            TuxTextView tuxTextView6 = (TuxTextView) LIZ(R.id.b2l);
            m.LIZIZ(tuxTextView6, "");
            tuxTextView6.setVisibility(0);
            TuxTextView tuxTextView7 = (TuxTextView) LIZ(R.id.b2l);
            m.LIZIZ(tuxTextView7, "");
            tuxTextView7.setText(popupCardVO.getSource());
            TuxTextView tuxTextView8 = (TuxTextView) LIZ(R.id.b2n);
            m.LIZIZ(tuxTextView8, "");
            tuxTextView8.setText(popupCardVO.getBagIndex() < 10 ? "0" + popupCardVO.getBagIndex() : String.valueOf(popupCardVO.getBagIndex()));
        }
        if (popupCardVO.isSoldOut()) {
            this.LIZIZ.LIZ(new P0R(this), new P0P(this));
            ((TuxTextView) LIZ(R.id.b2f)).setTextColor(C017906e.LIZJ(getContext(), R.color.c3));
            ((TuxTextView) LIZ(R.id.b2f)).setText(R.string.hz);
        } else {
            this.LIZIZ.LIZ(new P0S(this), new P0Q(this));
            ((TuxTextView) LIZ(R.id.b2f)).setTextColor(C017906e.LIZJ(getContext(), R.color.l));
        }
        AppCompatImageView appCompatImageView = (AppCompatImageView) LIZ(R.id.b2i);
        m.LIZIZ(appCompatImageView, "");
        appCompatImageView.setOnClickListener(new P49(r10));
        SmartImageView smartImageView = (SmartImageView) LIZ(R.id.b2p);
        m.LIZIZ(smartImageView, "");
        smartImageView.setOnClickListener(new P43(this, r9, popupCardVO, fJr));
        LogoTuxTextView logoTuxTextView = (LogoTuxTextView) LIZ(R.id.b2o);
        m.LIZIZ(logoTuxTextView, "");
        logoTuxTextView.setOnClickListener(new P44(this, r9, popupCardVO, fJr));
        TuxTextView tuxTextView9 = (TuxTextView) LIZ(R.id.b2f);
        m.LIZIZ(tuxTextView9, "");
        tuxTextView9.setOnClickListener(new P47(this, r9, popupCardVO, fJr));
        setOnClickListener(new P45(this, r9, popupCardVO, fJr));
    }

    public final void LIZ(PopupCardVO popupCardVO, C38750FJr fJr, C63813P3q p3q) {
        String str;
        String str2;
        List<String> urls;
        AbstractC31108CJt LJ;
        P3Y LJIIIZ;
        AbstractC31108CJt LJ2;
        P3Y LJIIIZ2;
        String LIZJ2 = fJr != null ? fJr.LIZJ("author_id") : null;
        String LIZJ3 = fJr != null ? fJr.LIZJ("room_id") : null;
        String LIZJ4 = fJr != null ? fJr.LIZJ("enter_from_merge") : null;
        String LIZJ5 = fJr != null ? fJr.LIZJ("enter_method") : null;
        String LIZJ6 = fJr != null ? fJr.LIZJ("action_type") : null;
        String LIZJ7 = fJr != null ? fJr.LIZJ("follow_status") : null;
        String LIZJ8 = fJr != null ? fJr.LIZJ("entrance_form") : null;
        String LIZJ9 = fJr != null ? fJr.LIZJ("is_ad") : null;
        String LIZJ10 = fJr != null ? fJr.LIZJ("request_id") : null;
        String LIZJ11 = fJr != null ? fJr.LIZJ("list_skin_type") : null;
        String LIZJ12 = fJr != null ? fJr.LIZJ("product_skin_type") : null;
        String LIZJ13 = fJr != null ? fJr.LIZJ("search_id") : null;
        String LIZJ14 = fJr != null ? fJr.LIZJ("search_result_id") : null;
        int platform = popupCardVO.getPlatform();
        String schema = popupCardVO.getSchema();
        C63810P3n p3n = new C63810P3n((byte) 0);
        if (LIZJ2 == null) {
            LIZJ2 = "";
        }
        p3n.LIZIZ = LIZJ2;
        p3n.LIZJ = String.valueOf(popupCardVO.getProductId());
        p3n.LJIIJ = "live";
        p3n.LIZ = "live_popup_card";
        p3n.LJIIIIZZ = LIZJ3;
        p3n.LIZLLL = LIZJ4 + "_temai_" + LIZJ5;
        p3n.LJ = LIZJ6;
        p3n.LJFF = String.valueOf(popupCardVO.getPlatform());
        p3n.LJI = String.valueOf(popupCardVO.getSourceFrom());
        p3n.LJII = popupCardVO.getSource();
        p3n.LJIIIZ = LIZJ7;
        p3n.LJIIJJI = LIZJ8;
        p3n.LJIIL = LIZJ9;
        ILiveOuterService LJJIFFI = LiveOuterService.LJJIFFI();
        p3n.LJIILIIL = (LJJIFFI == null || (LJ2 = LJJIFFI.LJ()) == null || (LJIIIZ2 = LJ2.LJIIIZ()) == null) ? null : LJIIIZ2.LJIILL();
        ILiveOuterService LJJIFFI2 = LiveOuterService.LJJIFFI();
        p3n.LJIILJJIL = (LJJIFFI2 == null || (LJ = LJJIFFI2.LJ()) == null || (LJIIIZ = LJ.LJIIIZ()) == null) ? null : LJIIIZ.LJIILLIIL();
        if (LIZJ10 == null) {
            LIZJ10 = "";
        }
        p3n.LJIILL = LIZJ10;
        p3n.LJIILLIIL = LIZJ11;
        p3n.LJIIZILJ = LIZJ12;
        p3n.LJIJ = LIZJ13;
        p3n.LJIJI = LIZJ14;
        String LIZ2 = C63809P3m.LIZ(platform, schema, p3n);
        Uri.Builder builder = new Uri.Builder();
        Uri parse = Uri.parse(p3q.LJI);
        if (parse != null) {
            Uri.Builder encodedPath = builder.scheme(parse.getScheme()).encodedAuthority(parse.getAuthority()).encodedPath(parse.getPath());
            Set<String> queryParameterNames = parse.getQueryParameterNames();
            m.LIZIZ(queryParameterNames, "");
            for (T t : queryParameterNames) {
                encodedPath.appendQueryParameter(t, parse.getQueryParameter(t));
            }
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            LinkedHashMap linkedHashMap2 = new LinkedHashMap();
            ArrayList arrayList = new ArrayList();
            GImage gImage = p3q.LJII;
            if (!(gImage == null || (urls = gImage.getUrls()) == null)) {
                arrayList.addAll(urls);
            }
            linkedHashMap2.put("image_url", arrayList);
            String str3 = p3q.LIZIZ;
            if (str3 == null) {
                str3 = "";
            }
            linkedHashMap2.put("title", str3);
            String str4 = p3q.LIZJ;
            if (str4 == null) {
                str4 = "";
            }
            linkedHashMap2.put("desc", str4);
            String str5 = p3q.LIZLLL;
            if (str5 == null) {
                str5 = "";
            }
            linkedHashMap2.put("from_price", str5);
            String str6 = p3q.LJ;
            if (str6 == null) {
                str6 = "";
            }
            linkedHashMap2.put("to_price", str6);
            ArrayList arrayList2 = new ArrayList();
            List<P4D> list = p3q.LJFF;
            if (list != null) {
                for (T t2 : list) {
                    LinkedHashMap linkedHashMap3 = new LinkedHashMap();
                    String str7 = t2.LIZ;
                    if (str7 == null) {
                        str7 = "";
                    }
                    linkedHashMap3.put("text", str7);
                    Integer num = t2.LIZIZ;
                    if (num == null) {
                        num = "";
                    }
                    linkedHashMap3.put("action", num);
                    linkedHashMap3.put("redirect", LIZ2 == null ? "" : LIZ2);
                    arrayList2.add(linkedHashMap3);
                }
            }
            linkedHashMap2.put("buttons", arrayList2);
            linkedHashMap.put("content_params", linkedHashMap2);
            LinkedHashMap linkedHashMap4 = new LinkedHashMap();
            linkedHashMap4.put("enter_from", P4K.LIZ);
            if (fJr == null || (str = fJr.LIZJ("room_id")) == null) {
                str = "";
            }
            linkedHashMap4.put("room_id", str);
            if (fJr == null || (str2 = fJr.LIZJ("author_id")) == null) {
                str2 = "";
            }
            linkedHashMap4.put("anchor_id", str2);
            linkedHashMap.put("track_params", linkedHashMap4);
            Integer num2 = p3q.LIZ;
            linkedHashMap.put("popup_type", Integer.valueOf(num2 != null ? num2.intValue() : 0));
            encodedPath.appendQueryParameter("popup_params", C20590ro.LIZ().toJson(linkedHashMap));
        }
        String uri = builder.build().toString();
        m.LIZIZ(uri, "");
        SmartRouter.buildRoute(getContext(), uri).open();
    }

    public final void LIZIZ(PopupCardVO popupCardVO, C38750FJr fJr) {
        List<PromotionItem> list;
        PromotionItem promotionItem;
        Integer style;
        List<PromotionItem> list2;
        PromotionItem promotionItem2;
        Integer type;
        PromotionView promotionView = popupCardVO.getPromotionView();
        int intValue = (promotionView == null || (list2 = promotionView.LIZ) == null || (promotionItem2 = (PromotionItem) AnonymousClass1ZP.LJII(list2)) == null || (type = promotionItem2.getType()) == null) ? 0 : type.intValue();
        PromotionView promotionView2 = popupCardVO.getPromotionView();
        int intValue2 = (promotionView2 == null || (list = promotionView2.LIZ) == null || (promotionItem = (PromotionItem) AnonymousClass1ZP.LJII(list)) == null || (style = promotionItem.getStyle()) == null) ? -1 : style.intValue();
        if (intValue == 3 && intValue2 == 1) {
            AbstractC32261Pj unused = C24240xh.LIZ(C184047Ld.LIZ(AnonymousClass7MD.LIZIZ), null, null, new C63812P3p(this, fJr, popupCardVO, null), 3);
        } else {
            LIZ(popupCardVO, fJr);
        }
    }

    @Override // X.P3Z
    public final void setFlashSaleInfo(String str) {
        C21090sc.LIZ(str);
        View childAt = ((FlowLayout) LIZ(R.id.b2k)).getChildAt(0);
        if (childAt instanceof C782336e) {
            ((C782336e) childAt).setFlashSaleInfo(str);
        }
    }

    @Override // X.P3Z
    public final void setFlashSaleViewVisible(boolean z) {
        View childAt = ((FlowLayout) LIZ(R.id.b2k)).getChildAt(0);
        if (childAt instanceof C782336e) {
            if (!z) {
                ((FlowLayout) LIZ(R.id.b2k)).removeView(childAt);
            }
        } else if (z) {
            Context context = getContext();
            m.LIZIZ(context, "");
            C782336e r2 = new C782336e(context, (byte) 0);
            ((FlowLayout) LIZ(R.id.b2k)).addView(r2, 0, r2.getLayoutParams());
        }
    }
}