"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.templateMoveUnitIntoGraph = templateMoveUnitIntoGraph;
const spec_1 = require("../../spec/util/spec");
function templateMoveUnitIntoGraph(unit_id, graph_id, { getUnitSpec, getUnitMerges, removeUnit, injectUnit, removePinFromMerge }) {
    const unit_spec = getUnitSpec();
    const unit_merges = getUnitMerges();
    removeUnit(unit_id);
    injectUnit(graph_id, unit_id, unit_spec);
    (0, spec_1.forEachPinOnMerges)(unit_merges, (merge_id, unit_id, type, pin_id) => {
        removePinFromMerge(merge_id, unit_id, type, pin_id);
    });
}
//# sourceMappingURL=index.js.map