package com.bytedance.android.live.liveinteract.cohost.ui.fragment;

import X.86a;
import X.AnonymousClass0HH;
import X.AnonymousClass1MY;
import X.C07930Ul;
import X.C09630aP;
import X.C10000b0;
import X.C10190bJ;
import X.C10570bv;
import X.C14750if;
import X.C14770ih;
import X.C15040j8;
import X.C15910kX;
import X.C15920kY;
import X.C15930kZ;
import X.C15940ka;
import X.C16870m5;
import X.C18710p3;
import X.C24120xm;
import X.C24290y3;
import X.C24500yO;
import X.C31851Ol;
import X.C32141Po;
import X.C40901jk;
import X.C41521kk;
import X.C41661ky;
import X.C42491mJ;
import X.C46321sU;
import X.C46331sV;
import X.C48181vU;
import X.C48191vV;
import X.C48201vW;
import X.C48211vX;
import X.C53602Ac;
import X.Fv7;
import X.G2l;
import X.GSF;
import X.GwT;
import X.Gzu;
import X.HAH;
import X.HEP;
import X.HI6;
import X.HL0;
import X.M12;
import X.TLk;
import android.content.Context;
import android.os.Bundle;
import android.text.Spannable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
import com.bytedance.android.live.base.model.user.User;
import com.bytedance.android.live.liveinteract.cohost.business.contract.CoHostBeInvitedContract;
import com.bytedance.android.live.liveinteract.cohost.widget.LinkCoHostBeInviteVideoPreloadWidget;
import com.bytedance.android.livesdk.livesetting.broadcast.CoHostPerceptionEnableSetting;
import com.bytedance.android.livesdk.livesetting.broadcast.LiveCoHostPreviewAnchorAndroidSwitchSetting;
import com.bytedance.android.livesdk.livesetting.linkmic.MtCoHostReplyTimeOutSetting;
import com.bytedance.android.livesdk.model.message.PerceptionDialogInfo;
import com.bytedance.android.livesdk.model.message.PunishEventInfo;
import com.bytedance.android.livesdk.model.message.common.Text;
import com.bytedance.android.livesdkapi.depend.model.live.Room;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.bytedance.ies.sdk.datachannel.DataChannel;
import com.bytedance.ies.sdk.datachannel.DataChannelGlobal;
import java.util.HashMap;
import java.util.Map;
import kotlin.h.b.n;
import org.json.JSONObject;

public final class CoHostBeInvitedFragment extends CoHostBeInvitedContract.AbsView implements View.OnClickListener {
    public static final C15920kY LJIILJJIL = new C15920kY((byte) 0);
    public View LIZ;
    public FrameLayout LJ;
    public AnonymousClass1MY LJFF;
    public long LJI;
    public long LJII;
    public C14770ih LJIIIIZZ;
    public C15930kZ LJIIIZ;
    public C15910kX LJIIJ;
    public LinkCoHostBeInviteVideoPreloadWidget LJIIJJI;
    public boolean LJIIL;
    public DataChannel LJIILIIL;
    public C24500yO LJIILL;
    public C46321sU LJIILLIIL;
    public C46321sU LJIIZILJ;
    public ViewGroup LJIJ;
    public ViewGroup LJIJI;
    public long LJIJJ;
    public boolean LJIJJLI;
    public HashMap LJIL;

    static {
        Covode.recordClassIndex(6939);
    }

    public final void LIZIZ() {
        HashMap hashMap = this.LJIL;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public CoHostBeInvitedFragment() {
        this.LJIIIIZZ = C14770ih.NONE;
    }

    public final void LIZ() {
        this.LIZIZ.dismiss();
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [com.bytedance.android.live.liveinteract.cohost.ui.fragment.CoHostBeInvitedFragment, com.bytedance.android.livesdk.ui.BaseFragment, androidx.fragment.app.Fragment] */
    public final void onDestroy() {
        CoHostBeInvitedFragment.super.onDestroy();
        DataChannel LIZ2 = GSF.LIZ(this);
        if (LIZ2 != null) {
            LIZ2.LIZJ(C53602Ac.class);
        }
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [com.bytedance.android.live.liveinteract.cohost.ui.fragment.CoHostBeInvitedFragment, androidx.fragment.app.Fragment] */
    public final C15040j8 LJ() {
        C15040j8 r2 = new C15040j8();
        String string = getString(2131828099);
        n.LIZIZ(string, "");
        r2.LIZ(string);
        r2.LJI = false;
        return r2;
    }

    public final void onDestroyView() {
        super.onDestroyView();
        C24500yO r0 = this.LJIILL;
        if (r0 != null) {
            r0.LIZIZ();
        }
        C32141Po r02 = (C32141Po) this.LIZJ;
        if (r02 != null) {
            r02.LIZ();
        }
        LIZIZ();
    }

    public /* synthetic */ CoHostBeInvitedFragment(byte b) {
        this();
    }

    public static final /* synthetic */ FrameLayout LIZ(CoHostBeInvitedFragment coHostBeInvitedFragment) {
        FrameLayout frameLayout = coHostBeInvitedFragment.LJ;
        if (frameLayout == null) {
            n.LIZ("");
        }
        return frameLayout;
    }

    private final void LIZ(int i) {
        String str;
        boolean z;
        long j;
        if (this.LJIIIZ != null && this.LJIIJ != null) {
            if (i == 1) {
                str = "accept";
            } else {
                str = "reject";
            }
            AnonymousClass1MY r0 = this.LJFF;
            if (r0 == null || !r0.isChecked()) {
                z = false;
            } else {
                z = true;
            }
            System.currentTimeMillis();
            C14770ih r1 = this.LJIIIIZZ;
            C15930kZ r02 = this.LJIIIZ;
            long j2 = 0;
            if (r02 != null) {
                j = r02.LIZ;
            } else {
                j = 0;
            }
            C15910kX r03 = this.LJIIJ;
            if (r03 != null) {
                j2 = r03.LIZ;
            }
            C24290y3.LIZ(r1, j, j2, str, this.LJII, z, this.LJIJJLI);
        }
    }

    /* JADX WARNING: type inference failed for: r8v0, types: [com.bytedance.android.live.liveinteract.cohost.business.contract.InteractDialogFragmentBaseContract$AbsView, com.bytedance.android.live.liveinteract.cohost.ui.fragment.CoHostBeInvitedFragment, androidx.fragment.app.Fragment] */
    public final void onClick(View view) {
        int i;
        boolean z;
        boolean z2;
        String str;
        String str2;
        String str3;
        Room room;
        User owner;
        M12.LIZ(view);
        if (!this.LIZLLL.LIZ(C14750if.CONNECTION_FINISH)) {
            int id = view.getId();
            HashMap hashMap = new HashMap();
            hashMap.put("event_page", "live_detail");
            hashMap.put("room_id", String.valueOf(LJIILJJIL.LIZ().getId()));
            C15930kZ r0 = this.LJIIIZ;
            if (r0 != null) {
                hashMap.put("inviter_id", String.valueOf(r0.LIZ));
            }
            C15910kX r02 = this.LJIIJ;
            if (r02 != null) {
                hashMap.put("invitee_id", String.valueOf(r02.LIZ));
            }
            if (id == 2131372048) {
                i = 2;
            } else {
                i = 1;
                this.LIZLLL.LJJJJI = System.currentTimeMillis();
            }
            JSONObject jSONObject = new JSONObject();
            C10570bv.LIZ(jSONObject, "reply_status", String.valueOf(i));
            int i2 = 0;
            C41521kk.LIZLLL.LIZ("reply_click", jSONObject, 0);
            LIZ(i);
            if (i == 1) {
                z = true;
            } else {
                z = false;
            }
            C14770ih r7 = this.LJIIIIZZ;
            AnonymousClass1MY r03 = this.LJFF;
            if (r03 == null || !r03.isChecked()) {
                z2 = false;
            } else {
                z2 = true;
            }
            HashMap hashMap2 = new HashMap();
            if (z) {
                str = "accept";
            } else {
                str = "refuse";
            }
            hashMap2.put("choose_type", str);
            if (z2) {
                str2 = "1";
            } else {
                str2 = "0";
            }
            hashMap2.put("is_turn_off_invitation", str2);
            if (r7 == C14770ih.FOLLOW_INVITE) {
                str3 = "mutual_follow";
            } else if (r7 == C14770ih.RECOMMEND_INVITE) {
                str3 = "recommend";
            } else {
                str3 = "weekly_rising_rank";
            }
            hashMap2.put("invitee_list", str3);
            C24290y3.LIZ((Map<String, String>) hashMap2);
            C24290y3.LIZIZ((Map<String, String>) hashMap2);
            C24290y3.LIZ("connected_popup_click", (Map<String, String>) hashMap2);
            C48201vW r4 = new C48201vW(this, i);
            Context context = getContext();
            DataChannel dataChannel = this.LJIILIIL;
            if (!(dataChannel == null || (room = (Room) dataChannel.LIZIZ(Fv7.class)) == null || (owner = room.getOwner()) == null)) {
                i2 = owner.getSecret();
            }
            if (i == 1 && i2 == 1 && context != null) {
                C42491mJ.LIZLLL.LIZ(context, C18710p3.ACCEPT, new C48211vX(r4));
            } else {
                r4.LIZ();
            }
        }
    }

    public final void LIZ(boolean z) {
        if (this.mStatusViewValid) {
            if (z) {
                C46321sU r0 = this.LJIIZILJ;
                if (r0 == null) {
                    n.LIZ("");
                }
                r0.setVisibility(8);
                View view = this.LIZ;
                if (view == null) {
                    n.LIZ("");
                }
                View findViewById = view.findViewById(2131372725);
                n.LIZIZ(findViewById, "");
                findViewById.setVisibility(8);
                return;
            }
            C46321sU r02 = this.LJIIZILJ;
            if (r02 == null) {
                n.LIZ("");
            }
            r02.setVisibility(0);
            View view2 = this.LIZ;
            if (view2 == null) {
                n.LIZ("");
            }
            View findViewById2 = view2.findViewById(2131372725);
            n.LIZIZ(findViewById2, "");
            findViewById2.setVisibility(0);
        }
    }

    /* JADX WARNING: type inference failed for: r9v0, types: [com.bytedance.android.live.liveinteract.cohost.business.contract.InteractDialogFragmentBaseContract$AbsView, com.bytedance.android.live.liveinteract.cohost.ui.fragment.CoHostBeInvitedFragment, com.bytedance.android.livesdk.ui.BaseFragment, androidx.fragment.app.Fragment] */
    public final void LIZ(int i, int i2) {
        C32141Po r0;
        if (this.mStatusViewValid) {
            int i3 = this.LIZLLL.LJJLJ;
            long j = 0;
            if (1 <= i3 && i2 >= i3) {
                C32141Po r1 = (C32141Po) this.LIZJ;
                if (r1 != null) {
                    long j2 = this.LJI;
                    long j3 = this.LJII;
                    C15930kZ r02 = this.LJIIIZ;
                    if (r02 != null) {
                        j = r02.LIZ;
                    }
                    r1.LIZ(5, j2, j3, j);
                    return;
                }
                return;
            }
            int i4 = i - i2;
            int i5 = i4 - 1;
            if (i5 >= 0) {
                C46321sU r4 = this.LJIILLIIL;
                if (r4 == null) {
                    n.LIZ("");
                }
                r4.setText((CharSequence) Gzu.LIZ(getString(2131828355), new Object[]{Integer.valueOf(i5)}));
            }
            if (i4 == 0) {
                if (this.LJIIIZ != null) {
                    C32141Po r12 = (C32141Po) this.LIZJ;
                    if (r12 != null) {
                        long j4 = this.LJI;
                        long j5 = this.LJII;
                        C15930kZ r03 = this.LJIIIZ;
                        if (r03 != null) {
                            j = r03.LIZ;
                        }
                        r12.LIZ(5, j4, j5, j);
                    }
                    AnonymousClass1MY r04 = this.LJFF;
                    if (!(r04 == null || !r04.isChecked() || (r0 = (C32141Po) this.LIZJ) == null)) {
                        r0.LIZIZ();
                    }
                }
                LIZ(5);
            }
        }
    }

    private final void LIZ(C15930kZ r7, C40901jk r8, C40901jk r9) {
        C40901jk r1 = r9;
        if (r7.LJ.LIZIZ > 0) {
            r8.setVisibility(8);
            LIZ(r1, r7.LJ.LIZIZ, 2131828098, false);
            return;
        }
        r1.setVisibility(8);
        LIZ(r8, (long) r7.LIZLLL, 2131834126, true);
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        long j;
        PerceptionDialogInfo perceptionDialogInfo;
        Text text;
        PunishEventInfo punishEventInfo;
        MethodCollector.i(8642);
        LayoutInflater layoutInflater2 = layoutInflater;
        M12.LIZ(layoutInflater2);
        View LIZ2 = AnonymousClass0HH.LIZ(layoutInflater2, 2131561745, viewGroup, false);
        n.LIZIZ(LIZ2, "");
        this.LIZ = LIZ2;
        if (LIZ2 == null) {
            n.LIZ("");
        }
        View findViewById = LIZ2.findViewById(2131372048);
        n.LIZIZ(findViewById, "");
        this.LJIILLIIL = (C46321sU) findViewById;
        View view = this.LIZ;
        if (view == null) {
            n.LIZ("");
        }
        View findViewById2 = view.findViewById(2131372047);
        n.LIZIZ(findViewById2, "");
        this.LJIIZILJ = (C46321sU) findViewById2;
        View view2 = this.LIZ;
        if (view2 == null) {
            n.LIZ("");
        }
        View findViewById3 = view2.findViewById(2131371587);
        n.LIZIZ(findViewById3, "");
        this.LJIJ = (ViewGroup) findViewById3;
        View view3 = this.LIZ;
        if (view3 == null) {
            n.LIZ("");
        }
        View findViewById4 = view3.findViewById(2131371588);
        n.LIZIZ(findViewById4, "");
        this.LJIJI = (ViewGroup) findViewById4;
        View view4 = this.LIZ;
        if (view4 == null) {
            n.LIZ("");
        }
        View findViewById5 = view4.findViewById(2131371652);
        n.LIZIZ(findViewById5, "");
        this.LJ = (FrameLayout) findViewById5;
        View view5 = this.LIZ;
        if (view5 == null) {
            n.LIZ("");
        }
        AnonymousClass1MY r1 = (AnonymousClass1MY) view5.findViewById(2131363182);
        this.LJFF = r1;
        if (r1 != null) {
            r1.setOnCheckedChangeListener(new C15940ka(this));
        }
        C46321sU r0 = this.LJIILLIIL;
        if (r0 == null) {
            n.LIZ("");
        }
        r0.setOnClickListener(this);
        C46321sU r02 = this.LJIIZILJ;
        if (r02 == null) {
            n.LIZ("");
        }
        r02.setOnClickListener(this);
        C15930kZ r7 = this.LJIIIZ;
        if (r7 == null) {
            View view6 = this.LIZ;
            if (view6 == null) {
                n.LIZ("");
            }
            MethodCollector.o(8642);
            return view6;
        }
        if (CoHostPerceptionEnableSetting.INSTANCE.getValue()) {
            View view7 = this.LIZ;
            if (view7 == null) {
                n.LIZ("");
            }
            ViewGroup viewGroup2 = (ViewGroup) view7.findViewById(2131371582);
            View view8 = this.LIZ;
            if (view8 == null) {
                n.LIZ("");
            }
            C46331sV r2 = (C46331sV) view8.findViewById(2131371583);
            C15930kZ r03 = this.LJIIIZ;
            if (!(r03 == null || (perceptionDialogInfo = r03.LJIIIIZZ) == null || (text = perceptionDialogInfo.LIZJ) == null)) {
                Spannable LIZ3 = HL0.LIZ(text, text.LIZIZ);
                G2l.LIZIZ(viewGroup2);
                n.LIZIZ(r2, "");
                r2.setText(LIZ3);
                C15930kZ r04 = this.LJIIIZ;
                if (r04 != null) {
                    punishEventInfo = r04.LJIIIZ;
                } else {
                    punishEventInfo = null;
                }
                C24290y3.LIZ(punishEventInfo);
            }
        }
        LinkCoHostBeInviteVideoPreloadWidget linkCoHostBeInviteVideoPreloadWidget = this.LJIIJJI;
        if (linkCoHostBeInviteVideoPreloadWidget == null || linkCoHostBeInviteVideoPreloadWidget.LJI == null || !LiveCoHostPreviewAnchorAndroidSwitchSetting.INSTANCE.getValue()) {
            this.LJIJJLI = false;
            ViewGroup viewGroup3 = this.LJIJI;
            if (viewGroup3 == null) {
                n.LIZ("");
            }
            G2l.LIZ(viewGroup3);
            ViewGroup viewGroup4 = this.LJIJ;
            if (viewGroup4 == null) {
                n.LIZ("");
            }
            G2l.LIZIZ(viewGroup4);
            C09630aP.LIZ(3, "CoHostBeInvitedFragment", "initTextPreviewView");
            View view9 = this.LIZ;
            if (view9 == null) {
                n.LIZ("");
            }
            this.LJIILL = (C24500yO) view9.findViewById(2131371585);
            View view10 = this.LIZ;
            if (view10 == null) {
                n.LIZ("");
            }
            View findViewById6 = view10.findViewById(2131372056);
            n.LIZIZ(findViewById6, "");
            C40901jk r10 = (C40901jk) findViewById6;
            View view11 = this.LIZ;
            if (view11 == null) {
                n.LIZ("");
            }
            View findViewById7 = view11.findViewById(2131372050);
            n.LIZIZ(findViewById7, "");
            C40901jk r11 = (C40901jk) findViewById7;
            View view12 = this.LIZ;
            if (view12 == null) {
                n.LIZ("");
            }
            View findViewById8 = view12.findViewById(2131372052);
            n.LIZIZ(findViewById8, "");
            C40901jk r6 = (C40901jk) findViewById8;
            View view13 = this.LIZ;
            if (view13 == null) {
                n.LIZ("");
            }
            View findViewById9 = view13.findViewById(2131372055);
            n.LIZIZ(findViewById9, "");
            C40901jk r5 = (C40901jk) findViewById9;
            View view14 = this.LIZ;
            if (view14 == null) {
                n.LIZ("");
            }
            View findViewById10 = view14.findViewById(2131372054);
            n.LIZIZ(findViewById10, "");
            C40901jk r4 = (C40901jk) findViewById10;
            View view15 = this.LIZ;
            if (view15 == null) {
                n.LIZ("");
            }
            View findViewById11 = view15.findViewById(2131372051);
            n.LIZIZ(findViewById11, "");
            C40901jk r3 = (C40901jk) findViewById11;
            View view16 = this.LIZ;
            if (view16 == null) {
                n.LIZ("");
            }
            View findViewById12 = view16.findViewById(2131366843);
            View view17 = this.LIZ;
            if (view17 == null) {
                n.LIZ("");
            }
            HAH findViewById13 = view17.findViewById(2131371584);
            n.LIZIZ(findViewById13, "");
            HAH hah = findViewById13;
            View view18 = this.LIZ;
            if (view18 == null) {
                n.LIZ("");
            }
            View findViewById14 = view18.findViewById(2131366161);
            C24500yO r05 = this.LJIILL;
            if (r05 != null) {
                r05.LIZ();
            }
            HI6.LIZ(hah, r7.LIZIZ, hah.getWidth(), hah.getHeight(), 2131234641);
            r10.setText(C07930Ul.LIZ(r7.LIZJ, r7.LJFF));
            int i = 8;
            if (86a.LIZ(C16870m5.LIZ(r7.LJII))) {
                if (r7.LJ.LIZIZ > 0 || r7.LIZLLL > 0) {
                    r3.setVisibility(8);
                    r11.setVisibility(8);
                    LIZ(r7, r6, r5);
                } else {
                    n.LIZIZ(findViewById12, "");
                    findViewById12.setVisibility(8);
                }
            } else if (r7.LJ.LIZIZ > 0 || r7.LIZLLL > 0) {
                r3.setVisibility(0);
                r3.setText(C16870m5.LIZ(r7.LJII));
                LIZ(r7, r6, r5);
            } else {
                r3.setVisibility(0);
                r3.setText(C16870m5.LIZ(r7.LJII));
                r11.setVisibility(8);
                r5.setVisibility(8);
                r6.setVisibility(8);
            }
            if (86a.LIZ(r7.LJI)) {
                r4.setVisibility(8);
            } else {
                r4.setVisibility(0);
                r4.setText(r7.LJI);
            }
            n.LIZIZ(findViewById14, "");
            if (this.LJIIL) {
                i = 0;
            }
            findViewById14.setVisibility(i);
        } else {
            this.LJIJJLI = true;
            ViewGroup viewGroup5 = this.LJIJI;
            if (viewGroup5 == null) {
                n.LIZ("");
            }
            G2l.LIZIZ(viewGroup5);
            ViewGroup viewGroup6 = this.LJIJ;
            if (viewGroup6 == null) {
                n.LIZ("");
            }
            G2l.LIZ(viewGroup6);
            C09630aP.LIZ(3, "CoHostBeInvitedFragment", "initVideoPreviewView");
            View view19 = this.LIZ;
            if (view19 == null) {
                n.LIZ("");
            }
            C40901jk r62 = (C40901jk) view19.findViewById(2131366163);
            View view20 = this.LIZ;
            if (view20 == null) {
                n.LIZ("");
            }
            C40901jk r102 = (C40901jk) view20.findViewById(2131366165);
            View view21 = this.LIZ;
            if (view21 == null) {
                n.LIZ("");
            }
            C40901jk r32 = (C40901jk) view21.findViewById(2131366164);
            n.LIZIZ(r62, "");
            r62.setText(C10190bJ.LIZ((long) r7.LIZLLL));
            n.LIZIZ(r102, "");
            r102.setText(C10000b0.LIZ(2131833852, C07930Ul.LIZ(r7.LIZJ, r7.LJFF)));
            String LIZ4 = C16870m5.LIZ(r7.LJII);
            if (LIZ4.length() == 0) {
                G2l.LIZ(r32);
            } else {
                G2l.LIZIZ(r32);
                n.LIZIZ(r32, "");
                r32.setText(LIZ4);
            }
            LinkCoHostBeInviteVideoPreloadWidget linkCoHostBeInviteVideoPreloadWidget2 = this.LJIIJJI;
            if (linkCoHostBeInviteVideoPreloadWidget2 != null) {
                C09630aP.LIZ(3, "CoHostBeInvitedFragment", "addVideoView");
                GwT gwT = linkCoHostBeInviteVideoPreloadWidget2.LJFF;
                if (gwT == null) {
                    n.LIZ("");
                }
                if (gwT.getParent() instanceof ViewGroup) {
                    GwT gwT2 = linkCoHostBeInviteVideoPreloadWidget2.LJFF;
                    if (gwT2 == null) {
                        n.LIZ("");
                    }
                    ViewParent parent = gwT2.getParent();
                    if (parent != null) {
                        ViewGroup viewGroup7 = (ViewGroup) parent;
                        GwT gwT3 = linkCoHostBeInviteVideoPreloadWidget2.LJFF;
                        if (gwT3 == null) {
                            n.LIZ("");
                        }
                        viewGroup7.removeView(gwT3);
                    } else {
                        NullPointerException nullPointerException = new NullPointerException("null cannot be cast to non-null type android.view.ViewGroup");
                        MethodCollector.o(8642);
                        throw nullPointerException;
                    }
                }
                GwT gwT4 = linkCoHostBeInviteVideoPreloadWidget2.LJFF;
                if (gwT4 == null) {
                    n.LIZ("");
                }
                C48181vU r22 = new C48181vU(gwT4, this);
                linkCoHostBeInviteVideoPreloadWidget2.LIZ((C41661ky) new C48191vV(r22, this));
                r22.LIZ(linkCoHostBeInviteVideoPreloadWidget2.LJIIJ, linkCoHostBeInviteVideoPreloadWidget2.LJIIJJI);
            }
        }
        int value = MtCoHostReplyTimeOutSetting.INSTANCE.getValue();
        this.LJIJJ = System.currentTimeMillis();
        C32141Po r06 = (C32141Po) this.LIZJ;
        if (r06 != null) {
            r06.LIZ(value);
        }
        JSONObject jSONObject = new JSONObject();
        C10570bv.LIZ(jSONObject, "count_down_time", String.valueOf(value));
        C41521kk.LIZLLL.LIZ("reply_view_show", jSONObject, 0);
        C14770ih r12 = this.LJIIIIZZ;
        boolean z = this.LJIJJLI;
        HashMap hashMap = new HashMap();
        C24120xm.LIZ(hashMap, r12, true);
        C24290y3.LJI = System.currentTimeMillis();
        hashMap.put("time_stamp", String.valueOf(C24290y3.LJI));
        hashMap.put("connection_type", "anchor");
        if (z) {
            hashMap.put("is_opposite_anchor_live_show", "1");
        } else {
            hashMap.put("is_opposite_anchor_live_show", "0");
        }
        if (DataChannelGlobal.LIZLLL.LIZIZ(HEP.class) != null) {
            j = ((Room) DataChannelGlobal.LIZLLL.LIZIZ(HEP.class)).getOwnerUserId();
        } else {
            j = 0;
        }
        long j2 = C31851Ol.LLFII.LIZ().LJFF;
        if (C31851Ol.LLFII.LIZ().LJIILLIIL) {
            hashMap.put("connection_inviter_id", String.valueOf(j));
            hashMap.put("connection_invitee_id", String.valueOf(j2));
        } else {
            hashMap.put("connection_invitee_id", String.valueOf(j));
            hashMap.put("connection_inviter_id", String.valueOf(j2));
        }
        if (C31851Ol.LLFII.LIZ().LJJJI.LIZIZ()) {
            hashMap.put("rank_type", C31851Ol.LLFII.LIZ().LJJJI.LIZ);
        }
        hashMap.put("is_ranking_opposite_anchor", C31851Ol.LLFII.LIZ().LJJJI.LIZJ());
        C24290y3.LIZIZ((Map<String, String>) hashMap);
        C24290y3.LIZ("connected_popup_show", (Map<String, String>) hashMap);
        TLk.LIZIZ.LIZIZ("popup_show", (JSONObject) null);
        View view22 = this.LIZ;
        if (view22 == null) {
            n.LIZ("");
        }
        MethodCollector.o(8642);
        return view22;
    }

    /* access modifiers changed from: private */
    public final void LIZ(C40901jk r4, long j, int i, boolean z) {
        Object valueOf;
        if (j > 0) {
            r4.setVisibility(0);
            Object[] objArr = new Object[1];
            if (z) {
                valueOf = C10190bJ.LIZ(j);
            } else {
                valueOf = Long.valueOf(j);
            }
            objArr[0] = valueOf;
            r4.setText(C10000b0.LIZ(i, objArr));
            return;
        }
        r4.setVisibility(8);
    }
}
