local ____lualib = require("lualib_bundle")
local __TS__Class = ____lualib.__TS__Class
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
local ____exports = {}
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
local ____shouldFire = require("shouldFire")
local shouldFirePlayer = ____shouldFire.shouldFirePlayer
local ____CustomCallback = require("classes.private.CustomCallback")
local CustomCallback = ____CustomCallback.CustomCallback
____exports.PreGetPedestal = __TS__Class()
local PreGetPedestal = ____exports.PreGetPedestal
PreGetPedestal.name = "PreGetPedestal"
__TS__ClassExtends(PreGetPedestal, CustomCallback)
function PreGetPedestal.prototype.____constructor(self)
    CustomCallback.prototype.____constructor(self)
    self.shouldFire = shouldFirePlayer
    self.prePickupCollision = function(____, pickup, collider, _low)
        local collectible = pickup
        if collectible.SubType == CollectibleType.NULL then
            return nil
        end
        local player = collider:ToPlayer()
        if player == nil then
            return nil
        end
        local numCoins = player:GetNumCoins()
        if collectible.Price > numCoins then
            return nil
        end
        if collectible.Wait > 0 or player.ItemHoldCooldown > 0 then
            return nil
        end
        if player:IsHoldingItem() then
            return nil
        end
        return self:fire(player, collectible)
    end
    self.callbacksUsed = {{ModCallback.PRE_PICKUP_COLLISION, self.prePickupCollision, {PickupVariant.COLLECTIBLE}}}
end
return ____exports
