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

import X.0CB;
import X.0CH;
import X.2wn;
import X.2xd;
import X.3ZQ;
import X.6Is;
import X.C5930CIc;
import X.C5953CIz;
import X.C6394CZy;
import X.CAZ;
import X.CH7;
import X.CH8;
import X.CH9;
import X.CHA;
import X.CHB;
import X.CIV;
import X.CJ3;
import X.Crj;
import X.DV0;
import X.LnI;
import X.M12;
import X.Qeg;
import X.Qen;
import android.content.Context;
import android.content.res.Resources;
import android.text.SpannableStringBuilder;
import android.util.TypedValue;
import android.view.View;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.ecommerce.pdp.PdpViewModel;
import kotlin.h.b.n;

public final class PdpMallFlashSalePromotionViewHolder extends AbsFullSpanVH<CHA> implements 6Is {
    public CHB LJFF;
    public CIV LJI;
    public Qeg LJIIIZ;
    public Qeg LJIIJ;
    public final Crj LJIIJJI;

    static {
        Covode.recordClassIndex(71625);
    }

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

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

    public final void LJ() {
        super.LJ();
        DV0.LIZ(this, LJIILIIL(), CJ3.LIZ, new CH8(this));
        DV0.LIZ(this, LJIILIIL(), C5953CIz.LIZ, new CH9(this));
    }

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

    public final void LIZ(Integer num) {
        if (num != null && num.intValue() == 2) {
            this.LJIIJ.setVisibility(0);
            this.LJFF.setVisibility(0);
            this.LJI.setVisibility(4);
            return;
        }
        this.LJIIJ.setVisibility(4);
        this.LJFF.setVisibility(4);
        this.LJI.setVisibility(0);
    }

    /* JADX WARNING: Illegal instructions before constructor call */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public PdpMallFlashSalePromotionViewHolder(android.view.ViewGroup r4) {
        /*
            r3 = this;
            X.M12.LIZ(r4)
            android.content.Context r2 = r4.getContext()
            r1 = 2131559129(0x7f0d02d9, float:1.8743593E38)
            r0 = 0
            android.view.View r0 = X.C6489CbV.LIZ(r2, r1, r4, r0)
            java.lang.String r2 = ""
            kotlin.h.b.n.LIZIZ(r0, r2)
            r3.<init>(r0)
            android.view.View r1 = r3.itemView
            r0 = 2131368758(0x7f0a1b36, float:1.8357475E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r2)
            X.CHB r0 = (X.CHB) r0
            r3.LJFF = r0
            android.view.View r1 = r3.itemView
            r0 = 2131365070(0x7f0a0cce, float:1.8349995E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r2)
            X.CIV r0 = (X.CIV) r0
            r3.LJI = r0
            android.view.View r1 = r3.itemView
            r0 = 2131367539(0x7f0a1673, float:1.8355003E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r2)
            X.Qeg r0 = (X.Qeg) r0
            r3.LJIIIZ = r0
            android.view.View r1 = r3.itemView
            r0 = 2131365071(0x7f0a0ccf, float:1.8349997E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r2)
            X.Qeg r0 = (X.Qeg) r0
            r3.LJIIJ = 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.BHV r0 = new X.BHV
            r0.<init>(r3, r1, r1)
            X.Crj r0 = X.7he.LIZ(r0)
            r3.LJIIJJI = r0
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.ecommerce.pdp.vh.PdpMallFlashSalePromotionViewHolder.<init>(android.view.ViewGroup):void");
    }

    /* JADX WARNING: type inference failed for: r0v17, types: [X.CH7, android.view.View$OnClickListener] */
    public final /* synthetic */ void LIZ(Object obj) {
        CHA cha = (CHA) obj;
        M12.LIZ(cha);
        Qeg qeg = this.LJIIIZ;
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
        3ZQ LIZ = 2xd.LIZ(2wn.LIZ);
        View view = this.itemView;
        n.LIZIZ(view, "");
        Context context = view.getContext();
        n.LIZIZ(context, "");
        C6394CZy LIZIZ = LIZ.LIZIZ(context);
        View view2 = this.itemView;
        n.LIZIZ(view2, "");
        Context context2 = view2.getContext();
        n.LIZIZ(context2, "");
        boolean LIZ2 = Qen.LIZ(context2);
        Resources system = Resources.getSystem();
        n.LIZIZ(system, "");
        C6394CZy.LIZ(LIZIZ, LIZ2, 0, LnI.LIZ(TypedValue.applyDimension(1, 2.0f, system.getDisplayMetrics())), 2);
        CAZ.LIZ(spannableStringBuilder, " ", LIZIZ);
        View view3 = this.itemView;
        n.LIZIZ(view3, "");
        spannableStringBuilder.append(view3.getContext().getText(2131824361));
        spannableStringBuilder.append(" · ");
        qeg.setText(spannableStringBuilder);
        this.LJIIJ.setText(cha.LIZ);
        CIV civ = this.LJI;
        String str = cha.LIZJ;
        if (str == null) {
            str = "";
        }
        civ.setStartTime(str);
        LIZ(cha.LJFF);
        View view4 = this.itemView;
        n.LIZIZ(view4, "");
        view4.setOnClickListener(new CH7(this, cha));
    }
}
