package com.bytedance.android.live.broadcast.education;

import X.2sR;
import X.6Is;
import X.AnonymousClass0CB;
import X.AnonymousClass0CH;
import X.AnonymousClass0Y1;
import X.AnonymousClass0Y4;
import X.C08820Xw;
import X.C08830Xx;
import X.C08990Yn;
import X.C09080Yw;
import X.C09630aP;
import X.Fva;
import X.G10;
import X.GFy;
import X.GIv;
import X.Gbi;
import android.view.View;
import com.bytedance.android.livesdk.livesetting.broadcast.LiveNewGameBroadcastEducationMockEntrySetting;
import com.bytedance.android.livesdk.livesetting.broadcast.LiveNewGameBroadcastTeachEntrySetting;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.sdk.datachannel.DataChannel;
import com.bytedance.ies.sdk.widgets.LiveWidget;
import kotlin.h.b.n;

public final class GameLiveNewBroadcastEducationBannerWidget extends LiveWidget implements 6Is {
    public static final C08820Xw LIZ = new C08820Xw((byte) 0);
    public boolean LIZIZ;

    static {
        Covode.recordClassIndex(5138);
    }

    public final int getLayoutId() {
        return 2131562185;
    }

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

    public final void show() {
        GameLiveNewBroadcastEducationBannerWidget.super.show();
        if (!this.LIZIZ) {
            this.LIZIZ = true;
            AnonymousClass0Y4.LIZ(AnonymousClass0Y1.Banner);
        }
    }

    public final void onStart() {
        GameLiveNewBroadcastEducationBannerWidget.super.onStart();
        View view = getView();
        if (view != null) {
            view.setOnClickListener(new C08830Xx(this));
        }
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [X.0CH] */
    /* JADX WARNING: type inference failed for: r2v1, types: [X.0CH] */
    /* JADX WARNING: type inference failed for: r2v2, types: [X.0CH] */
    /* JADX WARNING: type inference failed for: r2v3, types: [X.0CH] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onCreate() {
        /*
            r4 = this;
            com.bytedance.android.live.broadcast.education.GameLiveNewBroadcastEducationBannerWidget.super.onCreate()
            r4.hide()
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r4.dataChannel
            if (r3 == 0) goto L_0x0015
            r2 = r4
            java.lang.Class<X.G0P> r1 = X.G0P.class
            X.1rT r0 = new X.1rT
            r0.<init>(r4)
            r3.LIZIZ(r2, r1, r0)
        L_0x0015:
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r4.dataChannel
            if (r3 == 0) goto L_0x0024
            r2 = r4
            java.lang.Class<X.G0k> r1 = X.G0k.class
            X.1rU r0 = new X.1rU
            r0.<init>(r4)
            r3.LIZIZ(r2, r1, r0)
        L_0x0024:
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r4.dataChannel
            if (r3 == 0) goto L_0x0033
            r2 = r4
            java.lang.Class<X.G10> r1 = X.G10.class
            X.1rV r0 = new X.1rV
            r0.<init>(r4)
            r3.LIZ(r2, r1, r0)
        L_0x0033:
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r4.dataChannel
            if (r3 == 0) goto L_0x0042
            r2 = r4
            java.lang.Class<X.Fva> r1 = X.Fva.class
            X.1rW r0 = new X.1rW
            r0.<init>(r4)
            r3.LIZ(r2, r1, r0)
        L_0x0042:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.live.broadcast.education.GameLiveNewBroadcastEducationBannerWidget.onCreate():void");
    }

    public final void LIZ(GIv gIv, C09080Yw r10) {
        boolean z;
        boolean z2;
        boolean z3;
        boolean z4;
        Boolean bool;
        Boolean bool2;
        Boolean bool3;
        if (gIv == GIv.SCREEN_RECORD) {
            if (!Gbi.LJFF || !LiveNewGameBroadcastEducationMockEntrySetting.INSTANCE.enableBannerStyle()) {
                boolean enableBannerStyle = LiveNewGameBroadcastTeachEntrySetting.INSTANCE.enableBannerStyle();
                DataChannel dataChannel = this.dataChannel;
                if (dataChannel == null || (bool3 = (Boolean) dataChannel.LIZIZ(Fva.class)) == null) {
                    z = false;
                } else {
                    z = bool3.booleanValue();
                }
                boolean z5 = r10.LJIIJ.LIZIZ;
                if (z || z5) {
                    z2 = true;
                } else {
                    z2 = false;
                }
                DataChannel dataChannel2 = this.dataChannel;
                if (dataChannel2 == null || (bool2 = (Boolean) dataChannel2.LIZIZ(G10.class)) == null) {
                    z3 = false;
                } else {
                    z3 = bool2.booleanValue();
                }
                C08990Yn r0 = r10.LJJIJIL;
                if (r0 == null || (bool = r0.LIZ) == null) {
                    z4 = false;
                } else {
                    z4 = bool.booleanValue();
                }
                2sR r1 = GFy.LLLIIIL;
                n.LIZIZ(r1, "");
                Boolean bool4 = (Boolean) r1.LIZ();
                if (Gbi.LJFF) {
                    C09630aP.LIZ(4, "GameLiveNewBroadcastEducationBannerWidget", "shouldShowEducationBanner. enable=" + enableBannerStyle + ", realBlock=" + z2 + ", isAccessRecall=" + z3 + ", hadStaredGameLive=" + z4 + ", hadShowH5=" + bool4);
                }
                if (!enableBannerStyle || z2 || z3 || z4 || bool4.booleanValue()) {
                    hide();
                    return;
                }
            }
            show();
        }
    }
}
