"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolbarPlugin = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const RenderInline_1 = require("./inline/RenderInline");
const RenderPeritext_1 = require("./RenderPeritext");
const text_1 = require("../minimal/text");
const RenderBlock_1 = require("./block/RenderBlock");
const RenderCaret_1 = require("./cursor/caret/RenderCaret");
const RenderFocus_1 = require("./cursor/focus/RenderFocus");
const h = React.createElement;
class ToolbarPlugin {
    constructor(opts = {}) {
        this.opts = opts;
        this.text = text_1.text;
        this.inline = (props, children) => h(RenderInline_1.RenderInline, props, children);
        this.block = (props, children) => h(RenderBlock_1.RenderBlock, props, children);
        this.peritext = (children, surface) => h(RenderPeritext_1.RenderPeritext, { children, surface, opts: this.opts });
        this.caret = (props, children) => h(RenderCaret_1.RenderCaret, props, children);
        this.focus = (props, children) => h(RenderFocus_1.RenderFocus, props, children);
    }
}
exports.ToolbarPlugin = ToolbarPlugin;
//# sourceMappingURL=ToolbarPlugin.js.map