"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.remapSpec = void 0;
const object_1 = require("../util/object");
const remapSpec = (spec, specIdMap) => {
    const { id, units } = spec;
    (0, object_1.forEachObjVK)(units, (unit) => {
        if (specIdMap[unit.id]) {
            unit.id = specIdMap[unit.id];
        }
    });
    spec.id = specIdMap[id] ?? id;
    return spec.id;
};
exports.remapSpec = remapSpec;
//# sourceMappingURL=remapSpec.js.map