package moe.lava.neon.api.gateway

@Suppress("unused")
object Capability {
    const val LAZY_USER_NOTES                       = 1 shl 0
    const val NO_AFFINE_USER_IDS                    = 1 shl 1
    const val VERSIONED_READ_STATES                 = 1 shl 2
    const val VERSIONED_USER_GUILD_SETTINGS         = 1 shl 3
    const val DEDUPE_USER_OBJECTS                   = 1 shl 4
    const val PRIORITIZED_READY_PAYLOAD             = 1 shl 5
    const val MULTIPLE_GUILD_EXPERIMENT_POPULATIONS = 1 shl 6
    const val NON_CHANNEL_READ_STATES               = 1 shl 7
    const val AUTH_TOKEN_REFRESH                    = 1 shl 8
    const val USER_SETTINGS_PROTO                   = 1 shl 9
    const val CLIENT_STATE_V2                       = 1 shl 10
    const val PASSIVE_GUILD_UPDATE                  = 1 shl 11 // off in rn 311.20
    const val AUTO_CALL_CONNECT                     = 1 shl 12
    const val DEBOUNCE_MESSAGE_REACTIONS            = 1 shl 13
    const val PASSIVE_GUILD_UPDATE_V2               = 1 shl 14
    const val UNKNOWN_15                            = 1 shl 15 // off in rn 311.20
    const val AUTO_LOBBY_CONNECT                    = 1 shl 16 // off in rn 311.20
    const val UNKNOWN_17                            = 1 shl 17
    const val UNKNOWN_18                            = 1 shl 18 // off in rn 311.20
    const val UNKNOWN_19                            = 1 shl 19
    const val UNKNOWN_20                            = 1 shl 20

    inline fun from(builder: Capability.() -> List<Int>): Int =
        builder().reduce { a, b -> a + b }
}
