"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isEmptyDocument = isEmptyDocument;
var _isEmptyParagraph = require("./isEmptyParagraph");
/**
 * Checks if a node looks like an empty document
 */
function isEmptyDocument(node) {
  var nodeChild = node.content.firstChild;
  if (node.childCount !== 1 || !nodeChild) {
    return false;
  }
  return (0, _isEmptyParagraph.isEmptyParagraph)(nodeChild);
}