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

import X.0HH;
import X.3EX;
import X.4ZZ;
import X.B9B;
import X.BTA;
import X.C0734AEg;
import X.C0736AEi;
import X.C0737AEj;
import X.C0738AEk;
import X.C0739AEl;
import X.C2573AuX;
import X.C3053B5l;
import X.DXo;
import X.DaP;
import X.E4R;
import X.EdN;
import X.JIy;
import X.JIz;
import X.M12;
import X.QHW;
import X.QJt;
import X.Qeg;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.powerlist.PowerCell;
import com.bytedance.lighten.loader.SmartImageView;
import com.bytedance.router.SmartRoute;
import com.bytedance.router.SmartRouter;
import com.ss.android.ugc.aweme.profile.model.User;
import kotlin.h.b.n;

public final class StoryViewerAndLikerCell extends PowerCell<C0734AEg> {
    public SmartImageView LIZ;
    public 4ZZ LIZIZ;
    public Qeg LJIIIZ;
    public Qeg LJIIJ;
    public Qeg LJIIJJI;
    public ImageView LJIIL;
    public E4R LJIILIIL;

    static {
        Covode.recordClassIndex(117802);
    }

    public final View LIZ(ViewGroup viewGroup) {
        M12.LIZ(viewGroup);
        View LIZ2 = 0HH.LIZ(LayoutInflater.from(viewGroup.getContext()), 2131561441, viewGroup, false);
        n.LIZIZ(LIZ2, "");
        EdN findViewById = LIZ2.findViewById(2131362513);
        n.LIZIZ(findViewById, "");
        this.LIZ = findViewById;
        4ZZ findViewById2 = LIZ2.findViewById(2131362512);
        n.LIZIZ(findViewById2, "");
        this.LIZIZ = findViewById2;
        Qeg findViewById3 = LIZ2.findViewById(2131372611);
        n.LIZIZ(findViewById3, "");
        this.LJIIIZ = findViewById3;
        Qeg findViewById4 = LIZ2.findViewById(2131369424);
        n.LIZIZ(findViewById4, "");
        this.LJIIJ = findViewById4;
        Qeg findViewById5 = LIZ2.findViewById(2131364009);
        n.LIZIZ(findViewById5, "");
        this.LJIIJJI = findViewById5;
        4ZZ findViewById6 = LIZ2.findViewById(2131372988);
        n.LIZIZ(findViewById6, "");
        this.LJIIL = findViewById6;
        E4R findViewById7 = LIZ2.findViewById(2131369423);
        n.LIZIZ(findViewById7, "");
        this.LJIILIIL = findViewById7;
        return LIZ2;
    }

    public final void LIZ(User user) {
        C0736AEi aEi;
        C0734AEg aEg = this.LIZLLL;
        if (aEg != null) {
            aEi = aEg.LIZJ;
        } else {
            aEi = null;
        }
        if (aEi != null) {
            C3053B5l b5l = new C3053B5l();
            b5l.LJFF(aEi.LIZ);
            String str = aEi.LIZIZ;
            if (str == null) {
                str = "";
            }
            b5l.LJIILL(str);
            b5l.LIZ("click_head");
            b5l.LJJJLIIL = "story_detail";
            b5l.LJJJLL = aEi.LIZJ;
            b5l.LJ = aEi.LIZLLL;
            b5l.LJJJJZ = aEi.LJ;
            b5l.LJJJJZI = aEi.LJFF;
            b5l.f_(aEi.LJI);
            b5l.LJFF();
        }
        View view = this.itemView;
        n.LIZIZ(view, "");
        Context context = view.getContext();
        SmartRoute buildRoute = SmartRouter.buildRoute(context, "aweme://user/profile/" + user.getUid());
        buildRoute.withParam("sec_user_id", user.getSecUid());
        buildRoute.open();
    }

    public final /* synthetic */ void LIZ(DaP daP) {
        C0734AEg aEg = (C0734AEg) daP;
        M12.LIZ(aEg);
        User user = aEg.LIZ.getUser();
        QJt LIZ2 = QHW.LIZ(3EX.LIZ(user.getAvatarThumb()));
        LIZ2.LIZ("ReactionBubbleCommentCell");
        SmartImageView smartImageView = this.LIZ;
        if (smartImageView == null) {
            n.LIZ("");
        }
        LIZ2.LJJIIZ = smartImageView;
        JIy jIy = new JIy();
        jIy.LIZ = true;
        JIz LIZ3 = jIy.LIZ();
        n.LIZIZ(LIZ3, "");
        LIZ2.LJIL = LIZ3;
        LIZ2.LIZJ = true;
        LIZ2.LIZJ();
        SmartImageView smartImageView2 = this.LIZ;
        if (smartImageView2 == null) {
            n.LIZ("");
        }
        smartImageView2.setOnClickListener(new C0738AEk(this, user));
        this.itemView.setOnClickListener(new C0739AEl(this, user));
        if (aEg.LIZIZ == 3) {
            4ZZ r0 = this.LIZIZ;
            if (r0 == null) {
                n.LIZ("");
            }
            r0.setVisibility(0);
            4ZZ r1 = this.LIZIZ;
            if (r1 == null) {
                n.LIZ("");
            }
            r1.setIconRes(2131755303);
            Qeg qeg = this.LJIIJJI;
            if (qeg == null) {
                n.LIZ("");
            }
            qeg.setVisibility(0);
            Qeg qeg2 = this.LJIIJJI;
            if (qeg2 == null) {
                n.LIZ("");
            }
            C2573AuX auX = new C2573AuX();
            auX.LIZ(B9B.LIZ.LIZ(user, false, false));
            qeg2.setText(auX.LIZ);
        }
        Qeg qeg3 = this.LJIIIZ;
        if (qeg3 == null) {
            n.LIZ("");
        }
        qeg3.setText(B9B.LIZ.LIZ(user, false, true));
        View view = this.itemView;
        n.LIZIZ(view, "");
        Context context = view.getContext();
        String customVerify = user.getCustomVerify();
        String enterpriseVerifyReason = user.getEnterpriseVerifyReason();
        Qeg qeg4 = this.LJIIIZ;
        if (qeg4 == null) {
            n.LIZ("");
        }
        BTA.LIZ(context, customVerify, enterpriseVerifyReason, qeg4);
        if (user.getFollowStatus() == 2) {
            Qeg qeg5 = this.LJIIJ;
            if (qeg5 == null) {
                n.LIZ("");
            }
            qeg5.setVisibility(0);
        } else {
            Qeg qeg6 = this.LJIIJ;
            if (qeg6 == null) {
                n.LIZ("");
            }
            qeg6.setVisibility(8);
        }
        E4R e4r = this.LJIILIIL;
        if (e4r == null) {
            n.LIZ("");
        }
        DXo dXo = new DXo();
        dXo.LIZ = aEg.LIZ.getUser();
        e4r.LIZ(dXo.LIZ());
        E4R e4r2 = this.LJIILIIL;
        if (e4r2 == null) {
            n.LIZ("");
        }
        e4r2.setTracker(new C0737AEj(aEg));
    }
}
