import { DecoratorNode } from "lexical";
export class DecoratorBlockNode extends DecoratorNode {
    __format;
    constructor(format, key) {
        super(key);
        //@ts-ignore
        this.__format = format;
    }
    exportJSON() {
        return {
            ...super.exportJSON(),
            format: this.__format || "",
        };
    }
    updateFromJSON(serializedNode) {
        return super
            .updateFromJSON(serializedNode)
            .setFormat(serializedNode.format || "");
    }
    canIndent() {
        return false;
    }
    createDOM() {
        return document.createElement("div");
    }
    updateDOM() {
        return false;
    }
    setFormat(format) {
        const self = this.getWritable();
        self.__format = format;
        return self;
    }
    isInline() {
        return false;
    }
}
export function $isDecoratorBlockNode(node) {
    return node instanceof DecoratorBlockNode;
}
