package com.ss.android.ugc.aweme.ecommerce.pdp.vh;

import X.0CB;
import X.0CH;
import X.2Pr;
import X.6Is;
import X.BJ3;
import X.BTH;
import X.C5871CFv;
import X.C5872CFw;
import X.C5930CIc;
import X.C6154CQs;
import X.C6283CVr;
import X.CIX;
import X.CIY;
import X.CIZ;
import X.CJ2;
import X.CMC;
import X.Crj;
import X.DV0;
import X.Ls2;
import X.M12;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.bytedance.covode.number.Covode;
import com.gyf.barlibrary.OSUtils;
import com.ss.android.ugc.aweme.ecommerce.pdp.PdpViewModel;
import com.ss.android.ugc.aweme.ecommerce.pdp.repository.dto.FlashSale;
import kotlin.h.b.n;

public final class PdpInfoViewHolder extends AbsFullSpanVH<CMC> implements 6Is {
    public final C6154CQs LJFF;
    public C6154CQs LJI;
    public int LJIIIZ;
    public int LJIIJ;
    public final Crj LJIIJJI;
    public final C5872CFw LJIIL;
    public final C5871CFv LJIILIIL;

    static {
        Covode.recordClassIndex(71615);
    }

    public final PdpViewModel LJIILIIL() {
        return (PdpViewModel) this.LJIIJJI.getValue();
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final void LJI() {
        PdpInfoViewHolder.super.LJI();
        LIZ(new C5930CIc(LJIIJJI(), (byte) 0));
    }

    public final void LJ() {
        super.LJ();
        this.LJI.setAlpha(0.0f);
        this.LJFF.setAlpha(1.0f);
        if (LJIILIIL().LIZIZ) {
            this.LJI.setAlpha(1.0f);
            this.LJFF.setAlpha(0.0f);
        } else {
            this.LJI.setAlpha(0.0f);
            this.LJFF.setAlpha(1.0f);
        }
        LJIILIIL().LJI(new CIX(this, OSUtils.isMIUI6Later()));
        DV0.LIZ(this, LJIILIIL(), CJ2.LIZ, new CIZ(this));
    }

    /* JADX WARNING: Illegal instructions before constructor call */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public PdpInfoViewHolder(android.view.ViewGroup r5) {
        /*
            r4 = this;
            X.M12.LIZ(r5)
            android.content.Context r2 = r5.getContext()
            r1 = 2131559131(0x7f0d02db, float:1.8743597E38)
            r0 = 0
            android.view.View r0 = X.C6489CbV.LIZ(r2, r1, r5, r0)
            java.lang.String r2 = ""
            kotlin.h.b.n.LIZIZ(r0, r2)
            r4.<init>(r0)
            android.view.View r1 = r4.itemView
            r0 = 2131368865(0x7f0a1ba1, float:1.8357692E38)
            android.view.View r3 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r3, r2)
            X.CQs r3 = (X.C6154CQs) r3
            r4.LJFF = r3
            android.view.View r1 = r4.itemView
            r0 = 2131368863(0x7f0a1b9f, float:1.8357688E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r2)
            X.CQs r0 = (X.C6154CQs) r0
            r4.LJI = r0
            java.lang.Class<com.ss.android.ugc.aweme.ecommerce.pdp.PdpViewModel> r1 = com.ss.android.ugc.aweme.ecommerce.pdp.PdpViewModel.class
            X.KEN r0 = X.KEM.LIZ
            X.D1G r1 = r0.LIZ(r1)
            X.BHm r0 = new X.BHm
            r0.<init>(r4, r1, r1)
            X.Crj r0 = X.7he.LIZ(r0)
            r4.LJIIJJI = r0
            X.CFw r2 = new X.CFw
            r2.<init>(r4, r5)
            r4.LJIIL = r2
            X.CFv r1 = new X.CFv
            r1.<init>(r4)
            r4.LJIILIIL = r1
            r3.setCouponLogListener(r2)
            X.CQs r0 = r4.LJI
            r0.setCouponLogListener(r2)
            r3.setRatingListener(r1)
            X.CQs r0 = r4.LJI
            r0.setRatingListener(r1)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.ecommerce.pdp.vh.PdpInfoViewHolder.<init>(android.view.ViewGroup):void");
    }

    public final /* synthetic */ void LIZ(Object obj) {
        C6283CVr cVr;
        CMC cmc = (CMC) obj;
        M12.LIZ(cmc);
        this.LJIIJ = 0;
        this.LJIIIZ = 0;
        FlashSale flashSale = cmc.LJIIIZ;
        if (!(flashSale == null || (cVr = LJIILIIL().LJJI) == null)) {
            long j = cVr.LIZ;
            this.LJFF.LIZ(flashSale, j);
            this.LJI.LIZ(flashSale, j);
        }
        C6154CQs cQs = this.LJFF;
        ViewGroup.LayoutParams layoutParams = cQs.getLayoutParams();
        if (!(layoutParams instanceof FrameLayout.LayoutParams)) {
            layoutParams = null;
        }
        FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) layoutParams;
        if (layoutParams2 != null) {
            FrameLayout.LayoutParams layoutParams3 = layoutParams2;
            layoutParams3.height = -2;
            layoutParams3.width = -1;
            cQs.setLayoutParams(layoutParams2);
        }
        C6154CQs cQs2 = this.LJI;
        ViewGroup.LayoutParams layoutParams4 = cQs2.getLayoutParams();
        if (!(layoutParams4 instanceof FrameLayout.LayoutParams)) {
            layoutParams4 = null;
        }
        FrameLayout.LayoutParams layoutParams5 = (FrameLayout.LayoutParams) layoutParams4;
        if (layoutParams5 != null) {
            FrameLayout.LayoutParams layoutParams6 = layoutParams5;
            layoutParams6.height = -2;
            layoutParams6.width = -1;
            cQs2.setLayoutParams(layoutParams5);
        }
        View view = this.itemView;
        n.LIZIZ(view, "");
        ViewGroup.LayoutParams layoutParams7 = view.getLayoutParams();
        if ((layoutParams7 instanceof ViewGroup.LayoutParams) && layoutParams7 != null) {
            layoutParams7.height = -2;
            layoutParams7.width = -1;
            view.setLayoutParams(layoutParams7);
        }
        this.LJFF.LIZ(cmc, 1, (Ls2<2Pr>) null);
        this.LJI.LIZ(cmc, Integer.MAX_VALUE, (Ls2<2Pr>) new CIY(this));
        BJ3 bj3 = BTH.LIZLLL;
        View view2 = this.itemView;
        n.LIZIZ(view2, "");
        bj3.LIZ(view2, false);
    }
}
