"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.YfmCutTitleNodeView = void 0;
require("./yfm-cut-title.css");
class YfmCutTitleNodeView {
    dom;
    contentDOM;
    node;
    constructor(node) {
        this.node = node;
        this.dom = document.createElement('div');
        this.dom.classList.add('yfm-cut-title');
        this.dom.replaceChildren((this.contentDOM = document.createElement('div')));
        this.contentDOM.classList.add('g-md-yfm-cut-title-inner');
        this.contentDOM.addEventListener('click', (e) => {
            // ignore clicking on the title content
            // you can open/close yfm-cut by clicking on the arrow icon
            e.stopPropagation();
            e.preventDefault();
        });
    }
    update(node) {
        if (this.node.type !== node.type)
            return false;
        this.node = node;
        return true;
    }
}
exports.YfmCutTitleNodeView = YfmCutTitleNodeView;
//# sourceMappingURL=yfm-cut-title.js.map
