"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.emptyRowAutocomplete = exports.emptyRowSnippet = exports.emptyRowSnippetTemplate = void 0;
const autocomplete_1 = require("@codemirror/autocomplete");
const empty_row_1 = require("../../../i18n/empty-row/index.js");
exports.emptyRowSnippetTemplate = '&nbsp;\n\n';
exports.emptyRowSnippet = (0, autocomplete_1.snippet)(exports.emptyRowSnippetTemplate);
exports.emptyRowAutocomplete = {
    autocomplete: (context) => {
        const word = context.matchBefore(/^.*/);
        if (word?.text.startsWith('&')) {
            return {
                from: word.from,
                options: [
                    {
                        label: '&nbsp;',
                        displayLabel: (0, empty_row_1.i18n)('snippet.text'),
                        type: 'text',
                        apply: exports.emptyRowSnippet,
                    },
                ],
            };
        }
        return null;
    },
};
//# sourceMappingURL=emptyRow.js.map
