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 CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
local ____frames = require("functions.frames")
local isAfterRoomFrame = ____frames.isAfterRoomFrame
local ____playerDataStructures = require("functions.playerDataStructures")
local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
local ____shouldFire = require("shouldFire")
local shouldFirePlayer = ____shouldFire.shouldFirePlayer
local ____DefaultMap = require("classes.DefaultMap")
local DefaultMap = ____DefaultMap.DefaultMap
local ____CustomCallback = require("classes.private.CustomCallback")
local CustomCallback = ____CustomCallback.CustomCallback
local v = {run = {playersHolyMantleMap = __TS__New(DefaultMap, 0)}}
____exports.PostHolyMantleRemoved = __TS__Class()
local PostHolyMantleRemoved = ____exports.PostHolyMantleRemoved
PostHolyMantleRemoved.name = "PostHolyMantleRemoved"
__TS__ClassExtends(PostHolyMantleRemoved, CustomCallback)
function PostHolyMantleRemoved.prototype.____constructor(self)
    CustomCallback.prototype.____constructor(self)
    self.v = v
    self.shouldFire = shouldFirePlayer
    self.postPEffectUpdateReordered = function(____, player)
        local effects = player:GetEffects()
        local newNumHolyMantles = effects:GetCollectibleEffectNum(CollectibleType.HOLY_MANTLE)
        local oldNumHolyMantles = defaultMapGetPlayer(nil, v.run.playersHolyMantleMap, player)
        mapSetPlayer(nil, v.run.playersHolyMantleMap, player, newNumHolyMantles)
        if newNumHolyMantles < oldNumHolyMantles and isAfterRoomFrame(nil, 0) then
            self:fire(player, oldNumHolyMantles, newNumHolyMantles)
        end
    end
    self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
end
return ____exports
