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 ____gridEntities = require("functions.gridEntities")
local getGridEntities = ____gridEntities.getGridEntities
local ____Feature = require("classes.private.Feature")
local Feature = ____Feature.Feature
____exports.GridEntityRenderDetection = __TS__Class()
local GridEntityRenderDetection = ____exports.GridEntityRenderDetection
GridEntityRenderDetection.name = "GridEntityRenderDetection"
__TS__ClassExtends(GridEntityRenderDetection, Feature)
function GridEntityRenderDetection.prototype.____constructor(self, postGridEntityRender, postGridEntityCustomRender, customGridEntities)
    Feature.prototype.____constructor(self)
    self.postRender = function()
        for ____, gridEntity in ipairs(getGridEntities(nil)) do
            local gridIndex = gridEntity:GetGridIndex()
            local gridEntityTypeCustom = self.customGridEntities:getCustomGridEntityType(gridIndex)
            if gridEntityTypeCustom == nil then
                self.postGridEntityRender:fire(gridEntity)
            else
                self.postGridEntityCustomRender:fire(gridEntity, gridEntityTypeCustom)
            end
        end
    end
    self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
    self.postGridEntityRender = postGridEntityRender
    self.postGridEntityCustomRender = postGridEntityCustomRender
    self.customGridEntities = customGridEntities
end
return ____exports
