package com.ss.android.ugc.aweme.social.widget.card.rec.cell;

import X.070;
import X.4ZZ;
import X.7xU;
import X.BT2;
import X.C1953Di1;
import X.E3O;
import X.E4R;
import X.E4W;
import X.E4X;
import X.E4Y;
import X.LnI;
import X.M12;
import X.Qeg;
import X.Qen;
import android.content.res.Resources;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.profile.model.FollowStatus;
import com.ss.android.ugc.aweme.profile.model.User;
import kotlin.h.b.n;

public final class RecUserRectangleCell extends RecommendUserCell<C1953Di1> {
    static {
        Covode.recordClassIndex(114801);
    }

    public final int LIZ() {
        return 2131560983;
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [X.E4R, android.view.View] */
    /* JADX WARNING: type inference failed for: r4v1, types: [X.E4R, android.view.View] */
    private final void LIZ(E4X e4x) {
        int i = E4Y.LIZ[e4x.ordinal()];
        if (i == 1) {
            ? LIZLLL = LIZLLL();
            Resources system = Resources.getSystem();
            n.LIZIZ(system, "");
            Qen.LIZIZ(LIZLLL, (Integer) null, (Integer) null, Integer.valueOf(LnI.LIZ(TypedValue.applyDimension(1, 12.0f, system.getDisplayMetrics()))), (Integer) null, false, 27);
            LJ().setVisibility(0);
        } else if (i == 2 || i == 3 || i == 4) {
            ? LIZLLL2 = LIZLLL();
            Resources system2 = Resources.getSystem();
            n.LIZIZ(system2, "");
            Qen.LIZIZ(LIZLLL2, (Integer) null, (Integer) null, Integer.valueOf(LnI.LIZ(TypedValue.applyDimension(1, 16.0f, system2.getDisplayMetrics()))), (Integer) null, false, 27);
            LJ().setVisibility(8);
        }
    }

    public final void LIZ(E4R e4r, E4X e4x) {
        M12.LIZ(e4r, e4x);
        super.LIZ(e4r, e4x);
        LIZ(e4x);
    }

    public final void LIZ(User user, E4R e4r) {
        M12.LIZ(user, e4r);
        LIZ(E4W.LIZ(user.getFollowStatus()));
        super.LIZ(user, e4r);
    }

    /* JADX WARNING: type inference failed for: r5v0, types: [X.E3O, android.view.View, java.lang.Object] */
    public final void LIZ(E3O e3o, FollowStatus followStatus) {
        ? r5 = e3o;
        M12.LIZ(r5, followStatus);
        super.LIZ((E3O) r5, followStatus);
        int i = followStatus.followStatus;
        if (i == 0) {
            ViewGroup.LayoutParams layoutParams = r5.getLayoutParams();
            if (layoutParams != null) {
                Resources system = Resources.getSystem();
                n.LIZIZ(system, "");
                layoutParams.width = LnI.LIZ(TypedValue.applyDimension(1, 88.0f, system.getDisplayMetrics()));
                r5.setLayoutParams(layoutParams);
                Resources system2 = Resources.getSystem();
                n.LIZIZ(system2, "");
                Qen.LIZIZ(r5, (Integer) null, (Integer) null, Integer.valueOf(LnI.LIZ(TypedValue.applyDimension(1, 12.0f, system2.getDisplayMetrics()))), (Integer) null, false, 27);
                LJ().setVisibility(0);
                return;
            }
            throw new 7xU("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
        } else if (i == 1 || i == 2 || i == 4) {
            ViewGroup.LayoutParams layoutParams2 = r5.getLayoutParams();
            if (layoutParams2 != null) {
                Resources system3 = Resources.getSystem();
                n.LIZIZ(system3, "");
                layoutParams2.width = LnI.LIZ(TypedValue.applyDimension(1, 120.0f, system3.getDisplayMetrics()));
                r5.setLayoutParams(layoutParams2);
                Resources system4 = Resources.getSystem();
                n.LIZIZ(system4, "");
                Qen.LIZIZ(r5, (Integer) null, (Integer) null, Integer.valueOf(LnI.LIZ(TypedValue.applyDimension(1, 16.0f, system4.getDisplayMetrics()))), (Integer) null, false, 27);
                LJ().setVisibility(8);
                return;
            }
            throw new 7xU("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
        }
    }

    public final void LIZ(User user, boolean z, 4ZZ r5) {
        M12.LIZ(user, r5);
        if (z) {
            View view = this.itemView;
            n.LIZIZ(view, "");
            r5.setTintColor(070.LIZJ(view.getContext(), 2131099681));
        }
    }

    public final void LIZ(User user, boolean z, Qeg qeg) {
        M12.LIZ(user, qeg);
        if (z) {
            View view = this.itemView;
            n.LIZIZ(view, "");
            qeg.setTextColor(070.LIZJ(view.getContext(), 2131099664));
        }
        super.LIZ(user, z, qeg);
    }

    public final void LIZ(C1953Di1 di1, boolean z, Qeg qeg, BT2 bt2) {
        M12.LIZ(di1, qeg, bt2);
        if (z) {
            View view = this.itemView;
            n.LIZIZ(view, "");
            qeg.setTextColor(070.LIZJ(view.getContext(), 2131099689));
            View view2 = this.itemView;
            n.LIZIZ(view2, "");
            bt2.setTextColor(070.LIZJ(view2.getContext(), 2131099689));
            bt2.setDarkMode(true);
        } else {
            View view3 = this.itemView;
            n.LIZIZ(view3, "");
            bt2.setTextColor(070.LIZJ(view3.getContext(), 2131099758));
        }
        super.LIZ(di1, z, qeg, bt2);
    }

    /* JADX WARNING: type inference failed for: r7v0, types: [X.EdN, android.view.View, java.lang.Object] */
    /* JADX WARNING: Unknown variable types count: 1 */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(com.ss.android.ugc.aweme.profile.model.User r6, X.C4213EdN r7, android.view.View r8, X.C1980DiS r9) {
        /*
            r5 = this;
            X.M12.LIZ(r6, r7, r8, r9)
            super.LIZ((com.ss.android.ugc.aweme.profile.model.User) r6, (X.C4213EdN) r7, (android.view.View) r8, (X.C1980DiS) r9)
            android.view.ViewGroup$LayoutParams r3 = r7.getLayoutParams()
            if (r3 == 0) goto L_0x0082
            int r0 = r9.getValue()
            float r1 = (float) r0
            android.content.res.Resources r0 = android.content.res.Resources.getSystem()
            java.lang.String r4 = ""
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
            r2 = 1
            float r0 = android.util.TypedValue.applyDimension(r2, r1, r0)
            int r0 = X.LnI.LIZ(r0)
            r3.height = r0
            int r0 = r9.getValue()
            float r1 = (float) r0
            android.content.res.Resources r0 = android.content.res.Resources.getSystem()
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
            float r0 = android.util.TypedValue.applyDimension(r2, r1, r0)
            int r0 = X.LnI.LIZ(r0)
            r3.width = r0
            r7.setLayoutParams(r3)
            int r0 = X.C1978DiQ.LIZ((X.C1980DiS) r9)
            float r1 = (float) r0
            android.content.res.Resources r0 = android.content.res.Resources.getSystem()
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
            float r0 = android.util.TypedValue.applyDimension(r2, r1, r0)
            int r3 = X.LnI.LIZ(r0)
            int r0 = X.C1978DiQ.LIZ((X.C1980DiS) r9)
            float r1 = (float) r0
            android.content.res.Resources r0 = android.content.res.Resources.getSystem()
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
            float r0 = android.util.TypedValue.applyDimension(r2, r1, r0)
            int r2 = X.LnI.LIZ(r0)
            int r1 = r8.getPaddingLeft()
            int r0 = r8.getPaddingRight()
            r8.setPadding(r1, r3, r0, r2)
            return
        L_0x0082:
            X.7xU r1 = new X.7xU
            java.lang.String r0 = "null cannot be cast to non-null type android.view.ViewGroup.LayoutParams"
            r1.<init>(r0)
            throw r1
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.social.widget.card.rec.cell.RecUserRectangleCell.LIZ(com.ss.android.ugc.aweme.profile.model.User, X.EdN, android.view.View, X.DiS):void");
    }
}
