package com.ss.android.ugc.aweme.discover.ui.search.jsbridge.bullet;

import X.0CB;
import X.0CH;
import X.6Is;
import X.KCc;
import X.KT7;
import X.M12;
import X.ST0;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.bullet.bridge.BaseBridgeMethod;

public final class OpenLiveMoreMethod extends BaseBridgeMethod implements 6Is {
    public static final ST0 LIZIZ = new ST0((byte) 0);
    public final String LIZJ = "open_live_more";
    public KCc LIZLLL = KCc.PRIVATE;
    public String LJ = "";

    static {
        Covode.recordClassIndex(65930);
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        OpenLiveMoreMethod.super.onStateChanged(r1, r2);
    }

    public final KCc LIZIZ() {
        return this.LIZLLL;
    }

    public final String LIZLLL() {
        return this.LIZJ;
    }

    public final void LIZ(KCc kCc) {
        M12.LIZ(kCc);
        this.LIZLLL = kCc;
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public OpenLiveMoreMethod(KT7 kt7) {
        super(kt7);
        M12.LIZ(kt7);
    }

    /* JADX WARNING: Removed duplicated region for block: B:20:0x0083 A[Catch:{ Exception -> 0x00ce }] */
    /* JADX WARNING: Removed duplicated region for block: B:21:0x00b3 A[Catch:{ Exception -> 0x00ce }] */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(org.json.JSONObject r17, X.4UQ r18) {
        /*
            r16 = this;
            java.lang.String r2 = "item_ids"
            r5 = r17
            r3 = r18
            X.M12.LIZ(r5, r3)
            java.lang.String r1 = "react_id"
            boolean r0 = r5.has(r1)
            if (r0 == 0) goto L_0x00d6
            java.lang.String r1 = r5.optString(r1)
            r0 = r16
            r0.LJ = r1
            r4 = 0
            java.lang.String r0 = "enter_from"
            java.lang.String r7 = r5.optString(r0)     // Catch:{ Exception -> 0x00ce }
            java.lang.String r0 = "search_keyword"
            java.lang.String r6 = r5.optString(r0)     // Catch:{ Exception -> 0x00ce }
            boolean r0 = r5.has(r2)     // Catch:{ Exception -> 0x00ce }
            java.lang.String r1 = ""
            if (r0 == 0) goto L_0x0060
            org.json.JSONArray r5 = r5.optJSONArray(r2)     // Catch:{ Exception -> 0x00ce }
            int r0 = r5.length()     // Catch:{ Exception -> 0x00ce }
            if (r0 <= 0) goto L_0x0060
            X.Qx2 r2 = X.Qx3.LIZIZ(r4, r0)     // Catch:{ Exception -> 0x00ce }
            java.util.ArrayList r8 = new java.util.ArrayList     // Catch:{ Exception -> 0x00ce }
            r0 = 10
            int r0 = X.9HM.LIZ(r2, r0)     // Catch:{ Exception -> 0x00ce }
            r8.<init>(r0)     // Catch:{ Exception -> 0x00ce }
            java.util.Iterator r2 = r2.iterator()     // Catch:{ Exception -> 0x00ce }
        L_0x004b:
            boolean r0 = r2.hasNext()     // Catch:{ Exception -> 0x00ce }
            if (r0 == 0) goto L_0x0062
            r0 = r2
            X.80p r0 = (X.80p) r0     // Catch:{ Exception -> 0x00ce }
            int r0 = r0.LIZ()     // Catch:{ Exception -> 0x00ce }
            java.lang.Object r0 = r5.get(r0)     // Catch:{ Exception -> 0x00ce }
            r8.add(r0)     // Catch:{ Exception -> 0x00ce }
            goto L_0x004b
        L_0x0060:
            r8 = r1
            goto L_0x0071
        L_0x0062:
            java.util.List r8 = (java.util.List) r8     // Catch:{ Exception -> 0x00ce }
            java.lang.String r9 = ","
            r10 = 0
            r11 = 0
            r12 = 0
            r13 = 0
            r14 = 0
            r15 = 62
            java.lang.String r8 = X.Lea.LIZ(r8, r9, r10, r11, r12, r13, r14, r15)     // Catch:{ Exception -> 0x00ce }
        L_0x0071:
            X.MFl r0 = X.MFl.LIZ     // Catch:{ Exception -> 0x00ce }
            boolean r0 = r0.LIZ()     // Catch:{ Exception -> 0x00ce }
            if (r0 != 0) goto L_0x00b3
            X.ST4 r0 = X.ST4.LIZIZ     // Catch:{ Exception -> 0x00ce }
            X.STu r0 = r0.LIZ()     // Catch:{ Exception -> 0x00ce }
            boolean r0 = r0.LJI     // Catch:{ Exception -> 0x00ce }
            if (r0 != 0) goto L_0x00b3
            X.ST3 r5 = com.ss.android.ugc.aweme.discover.activity.SearchLiveListActivity.LIZ     // Catch:{ Exception -> 0x00ce }
            android.content.Context r2 = com.ss.android.common.applog.GlobalContext.getContext()     // Catch:{ Exception -> 0x00ce }
            kotlin.h.b.n.LIZIZ(r2, r1)     // Catch:{ Exception -> 0x00ce }
            X.SSz r1 = new X.SSz     // Catch:{ Exception -> 0x00ce }
            r1.<init>()     // Catch:{ Exception -> 0x00ce }
            r1.setSearchKeyword(r6)     // Catch:{ Exception -> 0x00ce }
            r1.setEnterFrom(r7)     // Catch:{ Exception -> 0x00ce }
            java.lang.String r0 = "searchId"
            r1.setSearchId(r0)     // Catch:{ Exception -> 0x00ce }
            java.lang.String r0 = "general"
            r1.setSearchType(r0)     // Catch:{ Exception -> 0x00ce }
            r1.setRoomIdList(r8)     // Catch:{ Exception -> 0x00ce }
            java.lang.String r0 = "click_more_general_list"
            r1.setEnterMethod(r0)     // Catch:{ Exception -> 0x00ce }
            X.Spj r0 = X.C4459Spj.LIZ     // Catch:{ Exception -> 0x00ce }
            X.SV5 r0 = r0.LJFF()     // Catch:{ Exception -> 0x00ce }
            r5.LIZ(r2, r1, r0)     // Catch:{ Exception -> 0x00ce }
            goto L_0x00d6
        L_0x00b3:
            com.ss.android.ugc.aweme.discover.model.tab.SearchTabJumpCenter r0 = com.ss.android.ugc.aweme.discover.model.tab.SearchTabJumpCenter.INSTANCE     // Catch:{ Exception -> 0x00ce }
            com.ss.android.ugc.aweme.discover.model.tab.SearchTabViewModel r0 = r0.getSearchTabViewModel()     // Catch:{ Exception -> 0x00ce }
            if (r0 == 0) goto L_0x00d6
            com.bytedance.ies.sdk.widgets.NextLiveData r2 = r0.tabInfo     // Catch:{ Exception -> 0x00ce }
            if (r2 == 0) goto L_0x00d6
            X.2jx r1 = new X.2jx     // Catch:{ Exception -> 0x00ce }
            X.STt r0 = X.C3321STt.LIVE     // Catch:{ Exception -> 0x00ce }
            java.lang.String r0 = r0.getTabName()     // Catch:{ Exception -> 0x00ce }
            r1.<init>(r0)     // Catch:{ Exception -> 0x00ce }
            r2.setValue(r1)     // Catch:{ Exception -> 0x00ce }
            goto L_0x00d6
        L_0x00ce:
            r0 = move-exception
            java.lang.String r0 = r0.getMessage()
            r3.LIZ(r4, r0)
        L_0x00d6:
            org.json.JSONObject r2 = new org.json.JSONObject
            r2.<init>()
            r1 = 1
            java.lang.String r0 = "code"
            r2.put(r0, r1)
            r3.LIZ(r2)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.discover.ui.search.jsbridge.bullet.OpenLiveMoreMethod.LIZ(org.json.JSONObject, X.4UQ):void");
    }
}
