local ____lualib = require("lualib_bundle")
local __TS__New = ____lualib.__TS__New
local ____exports = {}
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
local SlotVariant = ____isaac_2Dtypescript_2Ddefinitions.SlotVariant
local ____slotNames = require("objects.slotNames")
local DEFAULT_SLOT_NAME = ____slotNames.DEFAULT_SLOT_NAME
local SLOT_NAMES = ____slotNames.SLOT_NAMES
local ____ReadonlySet = require("types.ReadonlySet")
local ReadonlySet = ____ReadonlySet.ReadonlySet
local ____entityTypes = require("functions.entityTypes")
local isSlot = ____entityTypes.isSlot
local SLOT_MACHINE_VARIANTS = __TS__New(ReadonlySet, {
    SlotVariant.SLOT_MACHINE,
    SlotVariant.BLOOD_DONATION_MACHINE,
    SlotVariant.FORTUNE_TELLING_MACHINE,
    SlotVariant.DONATION_MACHINE,
    SlotVariant.SHOP_RESTOCK_MACHINE,
    SlotVariant.GREED_DONATION_MACHINE,
    SlotVariant.MOMS_DRESSING_TABLE,
    SlotVariant.CRANE_GAME,
    SlotVariant.CONFESSIONAL
})
--- Helper function to get the name of a slot, as listed in the "entities2.xml" file. Returns
-- "Unknown" if the provided slot variant is not valid.
-- 
-- This function only works for vanilla slot variants.
-- 
-- For example, `getSlotName(SlotVariant.BLOOD_DONATION_MACHINE)` would return "Blood Donation
-- Machine".
function ____exports.getSlotName(self, slotVariant)
    return SLOT_NAMES[slotVariant] or DEFAULT_SLOT_NAME
end
--- Returns true for the specific variants of `EntityType.SLOT` that are machines.
function ____exports.isSlotMachine(self, entity)
    if not isSlot(nil, entity) then
        return false
    end
    return SLOT_MACHINE_VARIANTS:has(entity.Variant)
end
return ____exports
