"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.yfmNoteTooltipPlugin = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const prosemirror_state_1 = require("prosemirror-state");
const BaseTooltip_1 = require("../../../../../plugins/BaseTooltip/index.js");
const utils_1 = require("../../utils.js");
const YfmNoteToolbar_1 = require("./YfmNoteToolbar.js");
const yfmNoteTooltipPlugin = (_deps) => new prosemirror_state_1.Plugin({
    view(view) {
        return new BaseTooltip_1.BaseTooltipPluginView(view, {
            idPrefix: 'yfm-note-tooltip',
            nodeType: (0, utils_1.noteType)(view.state.schema),
            popupPlacement: ['bottom', 'top'],
            content: (view, { node, pos }) => ((0, jsx_runtime_1.jsx)(YfmNoteToolbar_1.YfmNoteToolbar, { node: node, pos: pos, editorView: view })),
        });
    },
});
exports.yfmNoteTooltipPlugin = yfmNoteTooltipPlugin;
//# sourceMappingURL=index.js.map
