"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSerializationBrand = void 0;
const cachedEnumValues_1 = require("./arrays/cachedEnumValues");
const types_1 = require("./functions/types");
const ReadonlySet_1 = require("./types/ReadonlySet");
const SERIALIZATION_BRAND_SET = new ReadonlySet_1.ReadonlySet(cachedEnumValues_1.SERIALIZATION_BRAND_VALUES);
/**
 * Helper function to check if a key of a table in the "save#.dat" file is a serialization brand
 * inserted by the save data manager (i.e. the `deepCopy` function).
 *
 * This is separated from the other serialization functions because end-users would not normally be
 * iterating through a serialized object directly.
 */
function isSerializationBrand(key) {
    if (!(0, types_1.isString)(key)) {
        return false;
    }
    return SERIALIZATION_BRAND_SET.has(key);
}
exports.isSerializationBrand = isSerializationBrand;
