local ____lualib = require("lualib_bundle")
local __TS__Class = ____lualib.__TS__Class
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
local __TS__DecorateLegacy = ____lualib.__TS__DecorateLegacy
local ____exports = {}
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
local ____decorators = require("decorators")
local Exported = ____decorators.Exported
local ____Feature = require("classes.private.Feature")
local Feature = ____Feature.Feature
local v = {run = {familiarBlacklist = {}}}
____exports.NoSirenSteal = __TS__Class()
local NoSirenSteal = ____exports.NoSirenSteal
NoSirenSteal.name = "NoSirenSteal"
__TS__ClassExtends(NoSirenSteal, Feature)
function NoSirenSteal.prototype.____constructor(self)
    Feature.prototype.____constructor(self)
    self.v = v
    self.postNPCInitSirenHelper = function(____, npc)
        self:checkReturnFamiliarToPlayer(npc)
    end
    self.callbacksUsed = {{ModCallback.POST_NPC_INIT, self.postNPCInitSirenHelper, {EntityType.SIREN_HELPER}}}
end
function NoSirenSteal.prototype.checkReturnFamiliarToPlayer(self, npc)
    if npc.Target == nil then
        return
    end
    local familiar = npc.Target:ToFamiliar()
    if familiar == nil then
        return
    end
    if self:blacklistEntryExists(familiar.Variant, familiar.SubType) then
        npc:Remove()
        familiar:AddToFollowers()
    end
end
function NoSirenSteal.prototype.blacklistEntryExists(self, incomingFamiliarVariant, incomingFamiliarSubType)
    for ____, familiarTuple in ipairs(v.run.familiarBlacklist) do
        local familiarVariant, familiarSubType = table.unpack(familiarTuple)
        if familiarVariant == incomingFamiliarVariant and familiarSubType == incomingFamiliarSubType then
            return true
        end
        if familiarVariant == incomingFamiliarVariant and familiarSubType == nil then
            return true
        end
    end
    return false
end
function NoSirenSteal.prototype.setFamiliarNoSirenSteal(self, familiarVariant, familiarSubType)
    if self:blacklistEntryExists(familiarVariant, familiarSubType) then
        return
    end
    local ____v_run_familiarBlacklist_0 = v.run.familiarBlacklist
    ____v_run_familiarBlacklist_0[#____v_run_familiarBlacklist_0 + 1] = {familiarVariant, familiarSubType}
end
__TS__DecorateLegacy({Exported}, NoSirenSteal.prototype, "setFamiliarNoSirenSteal", true)
return ____exports
