package com.ss.android.ugc.aweme.inbox.adapter;

import X.2UX;
import X.2nK;
import X.B9B;
import X.C3976EYy;
import X.C4207EdH;
import X.C4297Eej;
import X.C4307Eet;
import X.C4345EfV;
import X.C4363Efn;
import X.M12;
import X.OCa;
import X.OD2;
import android.view.View;
import android.widget.TextView;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.inbox.response.InboxLiveNotice;
import com.ss.android.ugc.aweme.profile.model.User;
import kotlin.h.b.n;

public final class InboxLiveRVCell extends InboxLiveBaseCell<C4297Eej> {
    public OD2 LIZIZ;
    public TextView LJIIIZ;
    public TextView LJIIJ;
    public C4363Efn LJIIJJI;
    public C4345EfV LJIIL;

    static {
        Covode.recordClassIndex(87863);
    }

    public final void LIZ() {
        C4345EfV efV = this.LJIIL;
        if (efV == null) {
            n.LIZ("");
        }
        efV.LIZJ();
    }

    public final void LIZIZ() {
        C4345EfV efV = this.LJIIL;
        if (efV == null) {
            n.LIZ("");
        }
        efV.LIZLLL();
    }

    public final int bB_() {
        return ((Number) C4307Eet.LIZIZ.getValue()).intValue();
    }

    public final void bD_() {
        super.bD_();
        OD2 findViewById = this.itemView.findViewById(2131365955);
        n.LIZIZ(findViewById, "");
        this.LIZIZ = findViewById;
        View findViewById2 = this.itemView.findViewById(2131365959);
        n.LIZIZ(findViewById2, "");
        this.LJIIIZ = (TextView) findViewById2;
        View findViewById3 = this.itemView.findViewById(2131365954);
        n.LIZIZ(findViewById3, "");
        this.LJIIJ = (TextView) findViewById3;
        View findViewById4 = this.itemView.findViewById(2131365956);
        n.LIZIZ(findViewById4, "");
        this.LJIIJJI = (C4363Efn) findViewById4;
        C4207EdH edH = C4207EdH.INBOX;
        OD2 od2 = this.LIZIZ;
        if (od2 == null) {
            n.LIZ("");
        }
        OD2 od22 = this.LIZIZ;
        if (od22 == null) {
            n.LIZ("");
        }
        C4363Efn efn = this.LJIIJJI;
        if (efn == null) {
            n.LIZ("");
        }
        this.LJIIL = new C4345EfV(edH, od2, od22, efn);
    }

    public final void LIZJ() {
        InboxLiveNotice inboxLiveNotice;
        Long l;
        String str;
        User user;
        String str2;
        User user2;
        User user3;
        User user4;
        C4297Eej eej = (C4297Eej) this.LIZLLL;
        User user5 = null;
        if (eej != null) {
            inboxLiveNotice = eej.LIZ;
        } else {
            inboxLiveNotice = null;
        }
        2UX r2 = new 2UX();
        r2.LIZ("action_type", "click");
        r2.LIZ("enter_from_merge", "message");
        r2.LIZ("enter_method", "live_cover");
        if (inboxLiveNotice == null || (user4 = inboxLiveNotice.getUser()) == null) {
            l = null;
        } else {
            l = Long.valueOf(user4.roomId);
        }
        r2.LIZ("room_id", l);
        if (inboxLiveNotice == null || (user3 = inboxLiveNotice.getUser()) == null) {
            str = null;
        } else {
            str = user3.getUid();
        }
        r2.LIZ("anchor_id", str);
        if (inboxLiveNotice != null) {
            user = inboxLiveNotice.getUser();
        } else {
            user = null;
        }
        r2.LIZ("follow_status", C3976EYy.LIZ.LIZ(user));
        r2.LIZ("room_position", getBindingAdapterPosition());
        if (inboxLiveNotice == null || (user2 = inboxLiveNotice.getUser()) == null || (str2 = user2.getRequestId()) == null) {
            str2 = "";
        }
        r2.LIZ("request_id", str2);
        if (inboxLiveNotice != null) {
            user5 = inboxLiveNotice.getUser();
        }
        r2.LIZ("initial_follow_status", C3976EYy.LIZ.LIZ(user5));
        2nK.LIZ("livesdk_live_show", r2.LIZ);
    }

    /* access modifiers changed from: private */
    public void LIZ(C4297Eej eej) {
        M12.LIZ(eej);
        super.LIZ(eej);
        C4345EfV efV = this.LJIIL;
        if (efV == null) {
            n.LIZ("");
        }
        efV.LIZ(!eej.LIZIZ);
        User user = eej.LIZ.getUser();
        if (user != null) {
            OD2 od2 = this.LIZIZ;
            if (od2 == null) {
                n.LIZ("");
            }
            OCa.LIZ(od2, user.getAvatarThumb());
            TextView textView = this.LJIIIZ;
            if (textView == null) {
                n.LIZ("");
            }
            textView.setText(B9B.LIZ.LIZ(user, false, true));
        }
        TextView textView2 = this.LJIIJ;
        if (textView2 == null) {
            n.LIZ("");
        }
        LIZ(textView2);
        if (eej.LIZIZ) {
            C4363Efn efn = this.LJIIJJI;
            if (efn == null) {
                n.LIZ("");
            }
            efn.setVisibility(0);
            C4345EfV efV2 = this.LJIIL;
            if (efV2 == null) {
                n.LIZ("");
            }
            efV2.LIZ((User) null, getClass());
        }
    }
}
