"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.remapSpecs = exports.remapBundle = void 0;
const remapSpec_1 = require("./remapSpec");
const remapBundle = (bundle, specIdMap) => {
    (0, remapSpec_1.remapSpec)(bundle.spec, specIdMap);
    (0, exports.remapSpecs)(bundle, specIdMap);
};
exports.remapBundle = remapBundle;
const remapSpecs = (bundle, specIdMap) => {
    for (const specId in { ...bundle.specs }) {
        const spec = bundle.specs[specId];
        const nextSpecId = specIdMap[specId];
        if (nextSpecId) {
            delete bundle.specs[specId];
            bundle.specs[nextSpecId] = spec;
        }
    }
};
exports.remapSpecs = remapSpecs;
//# sourceMappingURL=remapBundle.js.map