"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.gptExtension = exports.gptActionName = void 0;
const actions_1 = require("../actions.js");
const commands_1 = require("../commands.js");
const constants_1 = require("../constants.js");
const plugin_1 = require("../plugin.js");
exports.gptActionName = 'addGptWidget';
const gptExtension = (builder, options) => {
    builder.addAction(exports.gptActionName, actions_1.showGptWidget);
    builder.addPlugin(({ serializer, markupParser }) => {
        return (0, plugin_1.gptWidgetPlugin)({
            ...options,
            serializer,
            parser: markupParser,
        });
    });
    builder.addKeymap(() => ({
        [constants_1.gptHotKeys.openGptKey]: commands_1.runGpt,
    }), builder.Priority.VeryLow);
};
exports.gptExtension = gptExtension;
//# sourceMappingURL=gptExtension.js.map
