package com.bytedance.android.live.pin.widget;

import X.6Is;
import X.7vl;
import X.AnonymousClass0CB;
import X.AnonymousClass0CH;
import X.AnonymousClass10Z;
import X.AnonymousClass2CZ;
import X.C25050zH;
import X.C36201cA;
import X.C36251cF;
import X.C43291nb;
import X.C526826o;
import X.Crj;
import X.GuA;
import com.bytedance.android.live.pin.PinMessageViewModel;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.sdk.widgets.LiveRecyclableWidget;

public abstract class BaseCommentPinnedWidget extends LiveRecyclableWidget implements AnonymousClass10Z, 6Is {
    public C36251cF LIZ;
    public C36201cA LIZIZ;
    public PinMessageViewModel LIZJ;
    public C25050zH<? extends AnonymousClass2CZ<? extends GuA>> LIZLLL;
    public final Crj LJ = 7vl.LIZ(new C526826o(this));

    static {
        Covode.recordClassIndex(9734);
    }

    public final C43291nb LIZ() {
        return (C43291nb) this.LJ.getValue();
    }

    public abstract void LIZIZ();

    public abstract C36251cF LIZJ();

    public abstract C36201cA LIZLLL();

    public void onInit(Object[] objArr) {
    }

    public void onStateChanged(AnonymousClass0CH r1, AnonymousClass0CB r2) {
        BaseCommentPinnedWidget.super.onStateChanged(r1, r2);
    }

    public void onUnload() {
        C36201cA r0 = this.LIZIZ;
        if (r0 != null) {
            r0.LJIIIIZZ();
        }
        C36251cF r02 = this.LIZ;
        if (r02 != null) {
            r02.LJIIIIZZ();
        }
    }

    public final void LJ() {
        C25050zH<? extends AnonymousClass2CZ<? extends GuA>> r1 = this.LIZLLL;
        if (r1 != null && !r1.LIZJ().LIZJ) {
            r1.LIZJ().LIZ();
        }
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [X.0CH] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onLoad(java.lang.Object[] r6) {
        /*
            r5 = this;
            r5.LIZIZ()
            com.bytedance.android.live.pin.PinMessageViewModel r4 = r5.LIZJ
            if (r4 == 0) goto L_0x004f
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r5.dataChannel
            java.lang.String r0 = ""
            kotlin.h.b.n.LIZIZ(r1, r0)
            X.M12.LIZ(r1)
            r4.LJII = r1
            java.lang.Class<X.Fv7> r0 = X.Fv7.class
            java.lang.Object r0 = r1.LIZIZ(r0)
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = (com.bytedance.android.livesdkapi.depend.model.live.Room) r0
            if (r0 == 0) goto L_0x0061
            long r0 = r0.getId()
            java.lang.Long r0 = java.lang.Long.valueOf(r0)
        L_0x0025:
            r4.LJI = r0
            java.lang.Long r0 = r4.LJI
            if (r0 == 0) goto L_0x004f
            long r2 = r0.longValue()
            X.M12.LIZ(r4)
            android.util.LongSparseArray<java.util.List<X.0zU>> r0 = X.C25220zY.LIZLLL
            java.lang.Object r1 = r0.get(r2)
            java.util.List r1 = (java.util.List) r1
            if (r1 != 0) goto L_0x0046
            java.util.ArrayList r1 = new java.util.ArrayList
            r1.<init>()
            android.util.LongSparseArray<java.util.List<X.0zU>> r0 = X.C25220zY.LIZLLL
            r0.put(r2, r1)
        L_0x0046:
            boolean r0 = r1.contains(r4)
            if (r0 != 0) goto L_0x004f
            r1.add(r4)
        L_0x004f:
            com.bytedance.android.live.pin.PinMessageViewModel r0 = r5.LIZJ
            if (r0 == 0) goto L_0x0060
            androidx.lifecycle.LiveData<X.0zZ<X.2CZ<? extends X.GuA>>> r2 = r0.LJ
            if (r2 == 0) goto L_0x0060
            r1 = r5
            X.1cO r0 = new X.1cO
            r0.<init>(r5)
            r2.observe(r1, r0)
        L_0x0060:
            return
        L_0x0061:
            r0 = 0
            goto L_0x0025
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.live.pin.widget.BaseCommentPinnedWidget.onLoad(java.lang.Object[]):void");
    }
}
