local ____lualib = require("lualib_bundle")
local WeakMap = ____lualib.WeakMap
local __TS__New = ____lualib.__TS__New
local ____exports = {}
____exports.hookContext = {}
____exports.hookMap = __TS__New(WeakMap)
____exports.getOrInitHook = function(____type, fn)
    local ____exports_hookContext_0, ____currentIndex_1 = ____exports.hookContext, "currentIndex"
    local ____exports_hookContext_currentIndex_2 = ____exports_hookContext_0[____currentIndex_1]
    ____exports_hookContext_0[____currentIndex_1] = ____exports_hookContext_currentIndex_2 + 1
    local index = ____exports_hookContext_currentIndex_2
    local hooks = ____exports.hookMap:get(____exports.hookContext.currentComponent)
    if not hooks then
        error("Could not located hook map. Are you using hooks outside of the render path?", 0)
    end
    local ____hooks_index_4 = hooks[index + 1]
    if ____hooks_index_4 == nil then
        local ____fn_result_3 = fn()
        hooks[index + 1] = ____fn_result_3
        ____hooks_index_4 = ____fn_result_3
    end
    local state = ____hooks_index_4
    if state.type ~= ____type then
        error(
            (((("Expected a " .. ____type) .. " hook at index ") .. tostring(index)) .. ", got ") .. state.type,
            0
        )
    end
    return state
end
____exports.hooks = {
    beforeRender = function(component)
    end,
    beforeUnmount = function(component)
    end
}
return ____exports
