local ____lualib = require("lualib_bundle")
local __TS__New = ____lualib.__TS__New
local __TS__Class = ____lualib.__TS__Class
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
local ____exports = {}
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
local ____shouldFire = require("shouldFire")
local shouldFirePickup = ____shouldFire.shouldFirePickup
local ____DefaultMap = require("classes.DefaultMap")
local DefaultMap = ____DefaultMap.DefaultMap
local ____CustomCallback = require("classes.private.CustomCallback")
local CustomCallback = ____CustomCallback.CustomCallback
local v = {run = {stateMap = __TS__New(
    DefaultMap,
    function(____, state) return state end
)}}
____exports.PostPickupStateChanged = __TS__Class()
local PostPickupStateChanged = ____exports.PostPickupStateChanged
PostPickupStateChanged.name = "PostPickupStateChanged"
__TS__ClassExtends(PostPickupStateChanged, CustomCallback)
function PostPickupStateChanged.prototype.____constructor(self)
    CustomCallback.prototype.____constructor(self)
    self.v = v
    self.shouldFire = shouldFirePickup
    self.postPickupUpdate = function(____, pickup)
        local ptrHash = GetPtrHash(pickup)
        local previousState = v.run.stateMap:getAndSetDefault(ptrHash, pickup.State)
        local currentState = pickup.State
        v.run.stateMap:set(ptrHash, currentState)
        if previousState ~= currentState then
            self:fire(pickup, previousState, currentState)
        end
    end
    self.callbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, self.postPickupUpdate}}
end
return ____exports
