"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MvalApi = void 0;
const nodes_1 = require("../../json-crdt/model/api/nodes");
class MvalApi extends nodes_1.NodeApi {
    set(json) {
        const { api, node } = this;
        const builder = api.builder;
        const rgaApi = new nodes_1.ArrApi(node.data, api);
        const length = rgaApi.length();
        rgaApi.del(0, length);
        rgaApi.ins(0, [builder.json(json)]);
        rgaApi.node.rmTombstones();
        return this;
    }
}
exports.MvalApi = MvalApi;
//# sourceMappingURL=MvalApi.js.map