package com.bytedance.android.livesdk.livesetting.performance.degrade;

import X.C1059Fv2;
import X.C3990H2x;
import com.bytedance.android.live.annotation.Group;
import com.bytedance.android.live.annotation.SettingsKey;
import com.bytedance.android.live_settings.SettingsManager;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.sdk.datachannel.DataChannel;

@SettingsKey("live_like_degrade")
public final class LiveLikeDegradeSettings {
    @Group(isDefault = true, value = "default group")
    public static final C3990H2x DEFAULT = new C3990H2x();
    public static final LiveLikeDegradeSettings INSTANCE = new LiveLikeDegradeSettings();

    public final C3990H2x getDEFAULT() {
        return DEFAULT;
    }

    public final C3990H2x getValue() {
        C3990H2x h2x = (C3990H2x) SettingsManager.INSTANCE.getValueSafely(LiveLikeDegradeSettings.class);
        if (h2x == null) {
            return DEFAULT;
        }
        return h2x;
    }

    static {
        Covode.recordClassIndex(18208);
    }

    public final boolean disableLikeFunc(DataChannel dataChannel) {
        if (!disableOtherLike(dataChannel) || !disableSelfLike(dataChannel)) {
            return false;
        }
        return true;
    }

    private final boolean userIsAudience(DataChannel dataChannel) {
        Boolean bool;
        if (dataChannel == null || (bool = (Boolean) dataChannel.LIZIZ(C1059Fv2.class)) == null || !bool.booleanValue()) {
            return true;
        }
        return false;
    }

    public final boolean disableAvatarAnim(DataChannel dataChannel) {
        if (!userIsAudience(dataChannel) || getValue().LIZLLL) {
            return false;
        }
        return true;
    }

    public final boolean disableEasterEggs(DataChannel dataChannel) {
        if (!userIsAudience(dataChannel) || getValue().LJ) {
            return false;
        }
        return true;
    }

    public final boolean disableLottieAnim(DataChannel dataChannel) {
        if (!userIsAudience(dataChannel) || getValue().LIZJ) {
            return false;
        }
        return true;
    }

    public final boolean disableOtherLike(DataChannel dataChannel) {
        if (!userIsAudience(dataChannel) || getValue().LIZIZ) {
            return false;
        }
        return true;
    }

    public final boolean disableSelfLike(DataChannel dataChannel) {
        if (!userIsAudience(dataChannel) || getValue().LIZ) {
            return false;
        }
        return true;
    }
}
