local ____lualib = require("lualib_bundle")
local Set = ____lualib.Set
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("src.shouldFire")
local shouldFireTear = ____shouldFire.shouldFireTear
local ____CustomCallback = require("src.classes.private.CustomCallback")
local CustomCallback = ____CustomCallback.CustomCallback
local v = {room = {firedSet = __TS__New(Set)}}
____exports.PostTearInitVeryLate = __TS__Class()
local PostTearInitVeryLate = ____exports.PostTearInitVeryLate
PostTearInitVeryLate.name = "PostTearInitVeryLate"
__TS__ClassExtends(PostTearInitVeryLate, CustomCallback)
function PostTearInitVeryLate.prototype.____constructor(self)
    CustomCallback.prototype.____constructor(self)
    self.v = v
    self.shouldFire = shouldFireTear
    self.postTearUpdate = function(____, tear)
        if tear.FrameCount == 0 then
            return
        end
        local index = GetPtrHash(tear)
        if not v.room.firedSet:has(index) then
            v.room.firedSet:add(index)
            self:fire(tear)
        end
    end
    self.callbacksUsed = {{ModCallback.POST_TEAR_UPDATE, self.postTearUpdate}}
end
return ____exports
