"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isQuestCollectible = exports.collectibleHasTag = void 0;
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
const cachedClasses_1 = require("../core/cachedClasses");
const types_1 = require("./types");
function collectibleHasTag(collectibleOrCollectibleType, tag) {
    const collectibleType = (0, types_1.isInteger)(collectibleOrCollectibleType)
        ? collectibleOrCollectibleType
        : collectibleOrCollectibleType.SubType;
    const itemConfigItem = cachedClasses_1.itemConfig.GetCollectible(collectibleType);
    if (itemConfigItem === undefined) {
        return false;
    }
    return itemConfigItem.HasTags(tag);
}
exports.collectibleHasTag = collectibleHasTag;
function isQuestCollectible(collectibleOrCollectibleType) {
    const collectibleType = (0, types_1.isInteger)(collectibleOrCollectibleType)
        ? collectibleOrCollectibleType
        : collectibleOrCollectibleType.SubType;
    return collectibleHasTag(collectibleType, isaac_typescript_definitions_1.ItemConfigTag.QUEST);
}
exports.isQuestCollectible = isQuestCollectible;
