"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModelWithExt = exports.ext = void 0;
const tslib_1 = require("tslib");
const ext = tslib_1.__importStar(require("./ext"));
exports.ext = ext;
const Extensions_1 = require("../json-crdt/extensions/Extensions");
const model_1 = require("../json-crdt/model");
const extensions = new Extensions_1.Extensions();
extensions.register(ext.cnt);
extensions.register(ext.mval);
extensions.register(ext.peritext);
extensions.register(ext.quill);
class ModelWithExt {
}
exports.ModelWithExt = ModelWithExt;
ModelWithExt.ext = ext;
ModelWithExt.create = (schema, sidOrClock = model_1.Model.sid()) => {
    const model = model_1.Model.create(schema, sidOrClock);
    model.ext = extensions;
    return model;
};
ModelWithExt.load = (data, sid, schema) => {
    const model = model_1.Model.load(data, sid, schema);
    model.ext = extensions;
    return model;
};
//# sourceMappingURL=ModelWithExt.js.map