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 ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
local ____cachedClasses = require("core.cachedClasses")
local game = ____cachedClasses.game
local ____ambush = require("functions.ambush")
local getAmbushType = ____ambush.getAmbushType
local ____shouldFire = require("shouldFire")
local shouldFireAmbush = ____shouldFire.shouldFireAmbush
local ____CustomCallback = require("classes.private.CustomCallback")
local CustomCallback = ____CustomCallback.CustomCallback
local v = {room = {ambushDone = false}}
____exports.PostAmbushFinished = __TS__Class()
local PostAmbushFinished = ____exports.PostAmbushFinished
PostAmbushFinished.name = "PostAmbushFinished"
__TS__ClassExtends(PostAmbushFinished, CustomCallback)
function PostAmbushFinished.prototype.____constructor(self)
    CustomCallback.prototype.____constructor(self)
    self.v = v
    self.shouldFire = shouldFireAmbush
    self.postUpdate = function()
        if v.room.ambushDone then
            return
        end
        local room = game:GetRoom()
        local ambushDone = room:IsAmbushDone()
        if not ambushDone then
            return
        end
        v.room.ambushDone = true
        local ambushType = getAmbushType(nil)
        if ambushType ~= nil then
            self:fire(ambushType)
        end
    end
    self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
end
return ____exports
