local ____lualib = require("lualib_bundle")
local __TS__Class = ____lualib.__TS__Class
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
local __TS__DecorateLegacy = ____lualib.__TS__DecorateLegacy
local ____exports = {}
local ____cachedClasses = require("src.core.cachedClasses")
local game = ____cachedClasses.game
local ____decorators = require("src.decorators")
local Exported = ____decorators.Exported
local ____ISCFeature = require("src.enums.ISCFeature")
local ISCFeature = ____ISCFeature.ISCFeature
local ____collectibleTag = require("src.functions.collectibleTag")
local isQuestCollectible = ____collectibleTag.isQuestCollectible
local ____rng = require("src.functions.rng")
local getRandomSeed = ____rng.getRandomSeed
local ____spawnCollectible = require("src.functions.spawnCollectible")
local spawnCollectibleUnsafe = ____spawnCollectible.spawnCollectibleUnsafe
local ____Feature = require("src.classes.private.Feature")
local Feature = ____Feature.Feature
____exports.SpawnCollectible = __TS__Class()
local SpawnCollectible = ____exports.SpawnCollectible
SpawnCollectible.name = "SpawnCollectible"
__TS__ClassExtends(SpawnCollectible, Feature)
function SpawnCollectible.prototype.____constructor(self, preventCollectibleRotation)
    Feature.prototype.____constructor(self)
    self.featuresUsed = {ISCFeature.PREVENT_COLLECTIBLE_ROTATION}
    self.preventCollectibleRotation = preventCollectibleRotation
end
function SpawnCollectible.prototype.spawnCollectible(self, collectibleType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
    if seedOrRNG == nil then
        seedOrRNG = getRandomSeed(nil)
    end
    if options == nil then
        options = false
    end
    if forceFreeItem == nil then
        forceFreeItem = false
    end
    local collectible = spawnCollectibleUnsafe(
        nil,
        collectibleType,
        positionOrGridIndex,
        seedOrRNG,
        options,
        forceFreeItem,
        spawner
    )
    if isQuestCollectible(nil, collectibleType) then
        self.preventCollectibleRotation:preventCollectibleRotation(collectible, collectibleType)
    end
    return collectible
end
__TS__DecorateLegacy({Exported}, SpawnCollectible.prototype, "spawnCollectible", true)
function SpawnCollectible.prototype.spawnCollectibleFromPool(self, itemPoolType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
    if seedOrRNG == nil then
        seedOrRNG = getRandomSeed(nil)
    end
    if options == nil then
        options = false
    end
    if forceFreeItem == nil then
        forceFreeItem = false
    end
    local itemPool = game:GetItemPool()
    local collectibleType = itemPool:GetCollectible(itemPoolType)
    return self:spawnCollectible(
        collectibleType,
        positionOrGridIndex,
        seedOrRNG,
        options,
        forceFreeItem,
        spawner
    )
end
__TS__DecorateLegacy({Exported}, SpawnCollectible.prototype, "spawnCollectibleFromPool", true)
return ____exports
