import { jsx as _jsx } from "react/jsx-runtime";
import { BaseTooltipPluginView } from "../../../../../plugins/BaseTooltip/index.js";
import { codeBlockType } from "../../CodeBlockSpecs/index.js";
import { getCodeBlockLangsState } from "../plugins/codeBlockLangsPlugin.js";
import { CodeBlockToolbar } from "./CodeBlockToolbar.js";
import "./TooltipView.css";
export const codeLangSelectTooltipViewCreator = (view, { showCodeWrapping, showLineNumbers }) => {
    return new BaseTooltipPluginView(view, {
        idPrefix: 'code-block-tooltip',
        nodeType: codeBlockType(view.state.schema),
        popupPlacement: ['bottom', 'top'],
        content: (view, { node, pos }, _onChange, _forceEdit, _onOutsideClick, rerender) => {
            const { langItems, aliasMapping } = getCodeBlockLangsState(view.state);
            return (_jsx(CodeBlockToolbar, { pos: pos, node: node, editorView: view, mapping: aliasMapping, langItems: langItems, rerenderTooltip: rerender, showLineNumbers: showLineNumbers, showCodeWrapping: showCodeWrapping }));
        },
    });
};
//# sourceMappingURL=index.js.map
