local ____lualib = require("lualib_bundle")
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
local __TS__New = ____lualib.__TS__New
local ____exports = {}
local ____types = require("functions.types")
local asCardType = ____types.asCardType
local asCollectibleType = ____types.asCollectibleType
local asPillEffect = ____types.asPillEffect
local asTrinketType = ____types.asTrinketType
local ____utils = require("functions.utils")
local iRange = ____utils.iRange
local ____ReadonlySet = require("types.ReadonlySet")
local ReadonlySet = ____ReadonlySet.ReadonlySet
local ____cachedClasses = require("core.cachedClasses")
local itemConfig = ____cachedClasses.itemConfig
local ____constantsFirstLast = require("core.constantsFirstLast")
local FIRST_CARD_TYPE = ____constantsFirstLast.FIRST_CARD_TYPE
local FIRST_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_COLLECTIBLE_TYPE
local FIRST_PILL_EFFECT = ____constantsFirstLast.FIRST_PILL_EFFECT
local FIRST_TRINKET_TYPE = ____constantsFirstLast.FIRST_TRINKET_TYPE
local LAST_VANILLA_CARD_TYPE = ____constantsFirstLast.LAST_VANILLA_CARD_TYPE
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
local LAST_VANILLA_PILL_EFFECT = ____constantsFirstLast.LAST_VANILLA_PILL_EFFECT
local LAST_VANILLA_TRINKET_TYPE = ____constantsFirstLast.LAST_VANILLA_TRINKET_TYPE
--- An array that represents the range from the first vanilla collectible type to the last vanilla
-- collectible type. This will include integers that do not represent any valid collectible types.
-- 
-- This function is only useful when building collectible type objects. For most purposes, you
-- should use the `VANILLA_COLLECTIBLE_TYPES` or `VANILLA_COLLECTIBLE_TYPES_SET` constants instead.
____exports.VANILLA_COLLECTIBLE_TYPE_RANGE = iRange(nil, FIRST_COLLECTIBLE_TYPE, LAST_VANILLA_COLLECTIBLE_TYPE)
--- An array that contains every valid vanilla collectible type, as verified by the
-- `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
-- must be verified. (There are several gaps, e.g. 666.)
-- 
-- If you need to do O(1) lookups, use the `VANILLA_COLLECTIBLE_TYPES_SET` constant instead.
____exports.VANILLA_COLLECTIBLE_TYPES = __TS__ArrayFilter(
    ____exports.VANILLA_COLLECTIBLE_TYPE_RANGE,
    function(____, potentialCollectibleType)
        local collectibleType = asCollectibleType(nil, potentialCollectibleType)
        local itemConfigItem = itemConfig:GetCollectible(collectibleType)
        return itemConfigItem ~= nil
    end
)
--- A set that contains every valid vanilla collectible type, as verified by the
-- `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
-- must be verified. (There are several gaps, e.g. 666.)
____exports.VANILLA_COLLECTIBLE_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_COLLECTIBLE_TYPES)
--- An array that represents the range from the first vanilla trinket type to the last vanilla
-- trinket type. This will include integers that do not represent any valid trinket types.
-- 
-- This function is only useful when building trinket type objects. For most purposes, you should
-- use the `VANILLA_TRINKET_TYPES` or `VANILLA_TRINKET_TYPES_SET` constants instead.
____exports.VANILLA_TRINKET_TYPE_RANGE = iRange(nil, FIRST_TRINKET_TYPE, LAST_VANILLA_TRINKET_TYPE)
--- An array that contains every valid vanilla trinket type, as verified by the
-- `ItemConfig.GetTrinket` method. Vanilla trinket types are not contiguous, so every valid must be
-- verified. (The only gap is 47 for `POLAROID_OBSOLETE`.)
-- 
-- If you need to do O(1) lookups, use the `VANILLA_TRINKET_TYPES_SET` constant instead.
____exports.VANILLA_TRINKET_TYPES = __TS__ArrayFilter(
    ____exports.VANILLA_TRINKET_TYPE_RANGE,
    function(____, potentialTrinketType)
        local trinketType = asTrinketType(nil, potentialTrinketType)
        local itemConfigTrinket = itemConfig:GetTrinket(trinketType)
        return itemConfigTrinket ~= nil
    end
)
--- A set that contains every valid vanilla trinket type, as verified by the `ItemConfig.GetTrinket`
-- method. Vanilla trinket types are not contiguous, so every valid must be verified. (The only gap
-- is 47 for `POLAROID_OBSOLETE`.)
____exports.VANILLA_TRINKET_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_TRINKET_TYPES)
--- An array that represents the range from the first vanilla card type to the last vanilla card
-- type.
-- 
-- This function is only useful when building card type objects. For most purposes, you should use
-- the `VANILLA_CARD_TYPES` or `VANILLA_CARD_TYPES_SET` constants instead.
____exports.VANILLA_CARD_TYPE_RANGE = iRange(nil, FIRST_CARD_TYPE, LAST_VANILLA_CARD_TYPE)
--- An array that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
-- method. Vanilla card types are contiguous, but we validate every entry to double check.
-- 
-- If you need to do O(1) lookups, use the `VANILLA_CARD_TYPES_SET` constant instead.
____exports.VANILLA_CARD_TYPES = __TS__ArrayFilter(
    ____exports.VANILLA_CARD_TYPE_RANGE,
    function(____, potentialCardType)
        local cardType = asCardType(nil, potentialCardType)
        local itemConfigCard = itemConfig:GetCard(cardType)
        return itemConfigCard ~= nil
    end
)
--- A set that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
-- method. Vanilla card types are contiguous, but we validate every entry to double check.
____exports.VANILLA_CARD_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_CARD_TYPES)
--- An array that represents the range from the first vanilla pill effect to the last vanilla pill
-- effect.
-- 
-- This function is only useful when building pill effect objects. For most purposes, you should use
-- the `VANILLA_PILL_EFFECTS` or `VANILLA_PILL_EFFECTS_SET` constants instead.
____exports.VANILLA_PILL_EFFECT_RANGE = iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
--- An array that contains every valid vanilla pill effect, as verified by the
-- `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
-- entry to double check.
-- 
-- If you need to do O(1) lookups, use the `VANILLA_PILL_EFFECT_SET` constant instead.
____exports.VANILLA_PILL_EFFECTS = __TS__ArrayFilter(
    ____exports.VANILLA_PILL_EFFECT_RANGE,
    function(____, potentialPillEffect)
        local pillEffect = asPillEffect(nil, potentialPillEffect)
        local itemConfigPillEffect = itemConfig:GetPillEffect(pillEffect)
        return itemConfigPillEffect ~= nil
    end
)
--- A set that contains every valid vanilla pill effect, as verified by the
-- `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
-- entry to double check.
____exports.VANILLA_PILL_EFFECTS_SET = __TS__New(ReadonlySet, ____exports.VANILLA_PILL_EFFECTS)
return ____exports
