package com.ss.android.ugc.aweme.cell;

import X.0HH;
import X.307;
import X.4FI;
import X.4ZZ;
import X.A7Z;
import X.C0546A7a;
import X.C0547A7b;
import X.C0548A7c;
import X.C0549A7d;
import X.C0550A7e;
import X.C0551A7f;
import X.C0552A7g;
import X.C1908Ajo;
import X.C1909Ajp;
import X.C1910Ajq;
import X.C1916Ajw;
import X.C1918Ajy;
import X.C1919Ajz;
import X.C1925Ak5;
import X.C2154Anm;
import X.C2156Ano;
import X.Csa;
import X.Csw;
import X.Csy;
import X.Ct1;
import X.D1G;
import X.KEM;
import X.M12;
import X.Qeg;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.bytedance.covode.number.Covode;
import com.bytedance.lighten.loader.SmartImageView;
import com.ss.android.ugc.aweme.base.model.UrlModel;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.feed.model.Video;
import com.ss.android.ugc.aweme.viewmodel.MentionPostedAndLikeVideoVM;
import kotlin.h.b.n;

public final class PostedAndLikeVideoCell extends BaseVideoCell<C1925Ak5> {
    public final Csa LJIILLIIL;
    public final String LJIIZILJ;
    public final 307 LJIJ;
    public 4ZZ LJIJI;
    public Qeg LJIJJ;
    public 4ZZ LJIJJLI;
    public View LJIL;
    public View LJJ;
    public TextView LJJI;
    public TextView LJJIFFI;

    static {
        Covode.recordClassIndex(55571);
    }

    public final MentionPostedAndLikeVideoVM LJIL() {
        return (MentionPostedAndLikeVideoVM) this.LJIILLIIL.getValue();
    }

    public final void bD_() {
        LIZ().setOnClickListener(new C2156Ano(this));
        LIZLLL().setOnClickListener(new C2154Anm(this));
    }

    public PostedAndLikeVideoCell() {
        Csa csa;
        Csy csy = Csy.LIZ;
        D1G LIZ = KEM.LIZ.LIZ(MentionPostedAndLikeVideoVM.class);
        C0552A7g a7g = new C0552A7g(LIZ);
        C1916Ajw ajw = C1916Ajw.INSTANCE;
        if (n.LIZ(csy, Csw.LIZ)) {
            csa = new Csa(LIZ, a7g, C1909Ajp.INSTANCE, new C0546A7a(this), new A7Z(this), C1919Ajz.INSTANCE, ajw);
        } else if (n.LIZ(csy, Csy.LIZ)) {
            csa = new Csa(LIZ, a7g, C1910Ajq.INSTANCE, new C0548A7c(this), new C0547A7b(this), C1918Ajy.INSTANCE, ajw);
        } else if (csy != null && !n.LIZ(csy, Ct1.LIZ)) {
            throw new IllegalArgumentException("Don't support this VMScope: " + csy + " there");
        } else {
            csa = new Csa(LIZ, a7g, C1908Ajo.INSTANCE, new C0551A7f(this), new C0549A7d(this), new C0550A7e(this), ajw);
        }
        this.LJIILLIIL = csa;
        this.LJIIZILJ = "PostedAndLikeVideoCell";
        this.LJIJ = new 307();
    }

    private final void LIZIZ(Aweme aweme) {
        Video video = aweme.getVideo();
        n.LIZIZ(video, "");
        if (video.getCover() != null) {
            UrlModel cover = video.getCover();
            n.LIZIZ(cover, "");
            if (cover.getUrlList() != null) {
                UrlModel cover2 = video.getCover();
                n.LIZIZ(cover2, "");
                if (cover2.getUrlList().size() != 0) {
                    UrlModel cover3 = video.getCover();
                    n.LIZIZ(cover3, "");
                    if (!TextUtils.isEmpty((CharSequence) cover3.getUrlList().get(0))) {
                        UrlModel animatedCover = video.getAnimatedCover();
                        if (animatedCover == null) {
                            animatedCover = video.getCover();
                        }
                        LIZ(animatedCover, this.LJIIZILJ, aweme);
                        return;
                    }
                }
            }
        }
        LIZ().setImageResource(2131099657);
    }

    public final View LIZ(ViewGroup viewGroup) {
        M12.LIZ(viewGroup);
        View LIZ = 0HH.LIZ(LayoutInflater.from(viewGroup.getContext()), 2131560610, viewGroup, false);
        4ZZ findViewById = LIZ.findViewById(2131372804);
        n.LIZIZ(findViewById, "");
        this.LJIJI = findViewById;
        Qeg findViewById2 = LIZ.findViewById(2131372209);
        n.LIZIZ(findViewById2, "");
        LIZ(findViewById2);
        Qeg findViewById3 = LIZ.findViewById(2131369023);
        n.LIZIZ(findViewById3, "");
        this.LJIJJ = findViewById3;
        4ZZ findViewById4 = LIZ.findViewById(2131372748);
        n.LIZIZ(findViewById4, "");
        this.LJIJJLI = findViewById4;
        View findViewById5 = LIZ.findViewById(2131372789);
        n.LIZIZ(findViewById5, "");
        LIZIZ((ViewGroup) findViewById5);
        View findViewById6 = LIZ.findViewById(2131367553);
        n.LIZIZ(findViewById6, "");
        this.LJIL = findViewById6;
        View findViewById7 = LIZ.findViewById(2131370568);
        n.LIZIZ(findViewById7, "");
        this.LJJ = findViewById7;
        View findViewById8 = LIZ.findViewById(2131370566);
        n.LIZIZ(findViewById8, "");
        this.LJJI = (TextView) findViewById8;
        View findViewById9 = LIZ.findViewById(2131372762);
        n.LIZIZ(findViewById9, "");
        LIZ(findViewById9);
        SmartImageView findViewById10 = LIZ.findViewById(2131363809);
        n.LIZIZ(findViewById10, "");
        LIZ(findViewById10);
        4FI findViewById11 = LIZ.findViewById(2131363271);
        n.LIZIZ(findViewById11, "");
        LIZ(findViewById11);
        View findViewById12 = LIZ.findViewById(2131372436);
        n.LIZIZ(findViewById12, "");
        this.LJJIFFI = (TextView) findViewById12;
        n.LIZIZ(LIZ, "");
        return LIZ;
    }

    /* JADX WARNING: Removed duplicated region for block: B:131:0x028c  */
    /* JADX WARNING: Removed duplicated region for block: B:68:0x0166  */
    /* JADX WARNING: Removed duplicated region for block: B:71:0x016f  */
    /* JADX WARNING: Removed duplicated region for block: B:77:0x017f  */
    /* JADX WARNING: Removed duplicated region for block: B:82:0x0195  */
    /* JADX WARNING: Removed duplicated region for block: B:85:0x01b2  */
    /* JADX WARNING: Removed duplicated region for block: B:87:0x01ba  */
    /* JADX WARNING: Removed duplicated region for block: B:94:0x01e8  */
    /* JADX WARNING: Removed duplicated region for block: B:95:0x01ec  */
    /* JADX WARNING: Removed duplicated region for block: B:96:0x01f2  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final /* synthetic */ void LIZ(X.DaP r13) {
        /*
            r12 = this;
            X.Ak5 r13 = (X.C1925Ak5) r13
            X.M12.LIZ(r13)
            com.ss.android.ugc.aweme.cell.PostedAndLikeVideoCell.super.LIZ(r13)
            com.ss.android.ugc.aweme.feed.model.Aweme r6 = r13.LIZ
            X.Qeg r0 = r12.LJIJJ
            java.lang.String r5 = ""
            if (r0 != 0) goto L_0x0013
            kotlin.h.b.n.LIZ(r5)
        L_0x0013:
            r4 = 8
            r0.setVisibility(r4)
            android.view.ViewGroup r0 = r12.LIZJ()
            r3 = 0
            r0.setVisibility(r3)
            android.view.View r0 = r12.LJIL
            if (r0 != 0) goto L_0x0027
            kotlin.h.b.n.LIZ(r5)
        L_0x0027:
            int r0 = r0.getVisibility()
            if (r0 != 0) goto L_0x0037
            android.view.View r0 = r12.LJIL
            if (r0 != 0) goto L_0x0034
            kotlin.h.b.n.LIZ(r5)
        L_0x0034:
            r0.setVisibility(r4)
        L_0x0037:
            boolean r0 = X.EUo.LIZ
            if (r0 == 0) goto L_0x0046
            com.bytedance.lighten.loader.SmartImageView r1 = r12.LIZ()
            java.lang.String r0 = r6.getAid()
            r1.setTransitionName(r0)
        L_0x0046:
            boolean r0 = r6.isProhibited()
            if (r0 == 0) goto L_0x0091
            boolean r0 = X.4wQ.LJII(r6)
            if (r0 == 0) goto L_0x0091
            X.Qeg r0 = r12.LJIJJ
            if (r0 != 0) goto L_0x0059
            kotlin.h.b.n.LIZ(r5)
        L_0x0059:
            r0.setVisibility(r3)
            android.view.ViewGroup r0 = r12.LIZJ()
            r0.setVisibility(r4)
            android.view.View r0 = r12.LJIL
            if (r0 != 0) goto L_0x006a
            kotlin.h.b.n.LIZ(r5)
        L_0x006a:
            r0.setVisibility(r3)
            X.Qeg r1 = r12.LJIJJ
            if (r1 != 0) goto L_0x0074
            kotlin.h.b.n.LIZ(r5)
        L_0x0074:
            r0 = 73
            r1.setTuxFont(r0)
            java.lang.String r0 = r6.getCoverNotice()
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 != 0) goto L_0x0263
            X.Qeg r1 = r12.LJIJJ
            if (r1 != 0) goto L_0x008a
            kotlin.h.b.n.LIZ(r5)
        L_0x008a:
            java.lang.String r0 = r6.getCoverNotice()
            r1.setText(r0)
        L_0x0091:
            int r0 = r6.getIsTop()
            r7 = 1
            if (r0 != r7) goto L_0x0257
            com.ss.android.ugc.aweme.viewmodel.MentionPostedAndLikeVideoVM r0 = r12.LJIL()
            int r1 = r0.LIZ
            r0 = 6
            if (r1 != r0) goto L_0x0257
            android.widget.TextView r0 = r12.LJJIFFI
            if (r0 != 0) goto L_0x00a8
            kotlin.h.b.n.LIZ(r5)
        L_0x00a8:
            r0.setVisibility(r3)
        L_0x00ab:
            com.ss.android.ugc.aweme.app.SharePrefCache r0 = com.ss.android.ugc.aweme.app.SharePrefCache.inst()
            kotlin.h.b.n.LIZIZ(r0, r5)
            X.2sK r0 = r0.getIsPrivateAvailable()
            kotlin.h.b.n.LIZIZ(r0, r5)
            java.lang.Object r2 = r0.LIZLLL()
            java.lang.Boolean r2 = (java.lang.Boolean) r2
            boolean r0 = r6.isScheduleVideo()
            if (r0 == 0) goto L_0x0252
            X.Qeg r0 = r12.LIZIZ()
            r0.setVisibility(r3)
            android.content.Context r1 = r12.LJIJI()
            if (r1 != 0) goto L_0x00d5
            kotlin.h.b.n.LIZIZ()
        L_0x00d5:
            r0 = 2131231853(0x7f08046d, float:1.8079799E38)
            android.graphics.drawable.Drawable r1 = r1.getDrawable(r0)
            X.Qeg r0 = r12.LIZIZ()
            r12.LIZ((android.widget.TextView) r0, (android.graphics.drawable.Drawable) r1)
            java.text.SimpleDateFormat r11 = new java.text.SimpleDateFormat
            java.util.Locale r1 = java.util.Locale.getDefault()
            java.lang.String r0 = "yyyy-MM-dd"
            r11.<init>(r0, r1)
            X.Qeg r10 = r12.LIZIZ()
            long r8 = r6.getScheduleTime()
            r0 = 1000(0x3e8, double:4.94E-321)
            long r8 = r8 * r0
            java.lang.Long r0 = java.lang.Long.valueOf(r8)
            java.lang.String r0 = r11.format(r0)
            r10.setText(r0)
            X.Qeg r1 = r12.LIZIZ()
            r0 = 72
            r1.setTuxFont(r0)
        L_0x010d:
            kotlin.h.b.n.LIZIZ(r2, r5)
            boolean r0 = r2.booleanValue()
            if (r0 == 0) goto L_0x0246
            boolean r0 = X.4lx.LIZ(r6)
            if (r0 == 0) goto L_0x0246
            com.ss.android.ugc.aweme.feed.model.AwemeStatus r0 = r6.getStatus()
            kotlin.h.b.n.LIZIZ(r0, r5)
            int r0 = r0.getPrivateStatus()
            if (r0 == 0) goto L_0x0246
            X.4ZZ r0 = r12.LJIJI
            if (r0 != 0) goto L_0x0130
            kotlin.h.b.n.LIZ(r5)
        L_0x0130:
            r0.setVisibility(r3)
            X.4ZZ r2 = r12.LJIJI
            if (r2 != 0) goto L_0x013a
            kotlin.h.b.n.LIZ(r5)
        L_0x013a:
            android.content.res.Resources r1 = X.AnonymousClass9rF.LIZ()
            r0 = 2131099685(0x7f060025, float:1.781173E38)
            int r0 = r1.getColor(r0)
            r2.setTintColor(r0)
            com.ss.android.ugc.aweme.feed.model.AwemeStatus r0 = r6.getStatus()
            kotlin.h.b.n.LIZIZ(r0, r5)
            int r0 = r0.getPrivateStatus()
            if (r0 != r7) goto L_0x0229
            X.4ZZ r1 = r12.LJIJI
            if (r1 != 0) goto L_0x015c
            kotlin.h.b.n.LIZ(r5)
        L_0x015c:
            r0 = 2131755526(0x7f100206, float:1.9141934E38)
            r1.setIconRes(r0)
        L_0x0162:
            android.view.View r0 = r12.LJIL
            if (r0 != 0) goto L_0x0169
            kotlin.h.b.n.LIZ(r5)
        L_0x0169:
            int r0 = r0.getVisibility()
            if (r0 != 0) goto L_0x01f2
            X.4ZZ r0 = r12.LJIJJLI
            if (r0 != 0) goto L_0x0176
            kotlin.h.b.n.LIZ(r5)
        L_0x0176:
            r0.setVisibility(r4)
        L_0x0179:
            com.ss.android.ugc.aweme.feed.model.Video r0 = r6.getVideo()
            if (r0 == 0) goto L_0x01c2
            com.ss.android.ugc.aweme.feed.model.Video r0 = r6.getVideo()
            kotlin.h.b.n.LIZIZ(r0, r5)
            boolean r0 = r0.isCallback()
            if (r0 == 0) goto L_0x01c2
            r12.LIZIZ(r6)
        L_0x018f:
            int r1 = android.os.Build.VERSION.SDK_INT
            r0 = 23
            if (r1 < r0) goto L_0x01ba
            com.bytedance.lighten.loader.SmartImageView r2 = r12.LIZ()
            android.view.View r0 = r12.itemView
            kotlin.h.b.n.LIZIZ(r0, r5)
            android.content.Context r1 = r0.getContext()
            r0 = 2131233543(0x7f080b07, float:1.8083226E38)
            android.graphics.drawable.Drawable r0 = r1.getDrawable(r0)
            r2.setForeground(r0)
        L_0x01ac:
            boolean r0 = X.4hQ.LJFF(r6)
            if (r0 == 0) goto L_0x028c
            android.view.View r0 = r12.LJ()
            r0.setVisibility(r3)
            return
        L_0x01ba:
            com.bytedance.lighten.loader.SmartImageView r0 = r12.LIZ()
            X.APL.LIZ(r0)
            goto L_0x01ac
        L_0x01c2:
            X.307 r1 = r12.LJIJ
            java.lang.String r0 = r6.getAid()
            com.ss.android.ugc.aweme.base.model.UrlModel r1 = r1.LIZ(r0)
            if (r1 == 0) goto L_0x01e8
            java.util.List r0 = r1.getUrlList()
            int r0 = r0.size()
            if (r0 == 0) goto L_0x01e8
            java.util.List r0 = r1.getUrlList()
            java.lang.Object r0 = r0.get(r3)
            java.lang.CharSequence r0 = (java.lang.CharSequence) r0
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 == 0) goto L_0x01ec
        L_0x01e8:
            r12.LIZIZ(r6)
            goto L_0x018f
        L_0x01ec:
            java.lang.String r0 = r12.LJIIZILJ
            r12.LIZ(r1, r0, r6)
            goto L_0x018f
        L_0x01f2:
            X.4ZZ r0 = r12.LJIJI
            if (r0 != 0) goto L_0x01f9
            kotlin.h.b.n.LIZ(r5)
        L_0x01f9:
            int r0 = r0.getVisibility()
            if (r0 != 0) goto L_0x020b
            X.4ZZ r0 = r12.LJIJJLI
            if (r0 != 0) goto L_0x0206
            kotlin.h.b.n.LIZ(r5)
        L_0x0206:
            r0.setVisibility(r4)
            goto L_0x0179
        L_0x020b:
            boolean r0 = X.4hQ.LIZ(r6)
            if (r0 == 0) goto L_0x021d
            X.4ZZ r0 = r12.LJIJJLI
            if (r0 != 0) goto L_0x0218
            kotlin.h.b.n.LIZ(r5)
        L_0x0218:
            r0.setVisibility(r3)
            goto L_0x0179
        L_0x021d:
            X.4ZZ r0 = r12.LJIJJLI
            if (r0 != 0) goto L_0x0224
            kotlin.h.b.n.LIZ(r5)
        L_0x0224:
            r0.setVisibility(r4)
            goto L_0x0179
        L_0x0229:
            com.ss.android.ugc.aweme.feed.model.AwemeStatus r0 = r6.getStatus()
            kotlin.h.b.n.LIZIZ(r0, r5)
            int r1 = r0.getPrivateStatus()
            r0 = 2
            if (r1 != r0) goto L_0x0162
            X.4ZZ r1 = r12.LJIJI
            if (r1 != 0) goto L_0x023e
            kotlin.h.b.n.LIZ(r5)
        L_0x023e:
            r0 = 2131755710(0x7f1002be, float:1.9142307E38)
            r1.setIconRes(r0)
            goto L_0x0162
        L_0x0246:
            X.4ZZ r0 = r12.LJIJI
            if (r0 != 0) goto L_0x024d
            kotlin.h.b.n.LIZ(r5)
        L_0x024d:
            r0.setVisibility(r4)
            goto L_0x0162
        L_0x0252:
            r12.LIZ((X.C1925Ak5) r13)
            goto L_0x010d
        L_0x0257:
            android.widget.TextView r0 = r12.LJJIFFI
            if (r0 != 0) goto L_0x025e
            kotlin.h.b.n.LIZ(r5)
        L_0x025e:
            r0.setVisibility(r4)
            goto L_0x00ab
        L_0x0263:
            X.2aZ r2 = new X.2aZ
            r2.<init>()
            java.lang.String r1 = "type"
            java.lang.String r0 = "cover_notice"
            r2.LIZ(r1, r0)
            java.lang.String r1 = r6.getRequestId()
            java.lang.String r0 = "log_id"
            r2.LIZ(r0, r1)
            java.lang.String r1 = r6.getAid()
            java.lang.String r0 = "item_id"
            r2.LIZ(r0, r1)
            org.json.JSONObject r1 = r2.LIZ()
            java.lang.String r0 = "notice_content_empty"
            X.9bx.LIZ(r0, r5, r1)
            goto L_0x0091
        L_0x028c:
            android.view.View r0 = r12.LJ()
            r0.setVisibility(r4)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.cell.PostedAndLikeVideoCell.LIZ(X.DaP):void");
    }
}
