"use strict";
const toBeEmptyDomElement = require("../../../../_virtual/to-be-empty-dom-element.cjs");
require("./utils.cjs");
const utils = require("../../../../_virtual/utils.cjs");
Object.defineProperty(toBeEmptyDomElement.__exports, "__esModule", {
  value: true
});
toBeEmptyDomElement.__exports.toBeEmptyDOMElement = toBeEmptyDOMElement;
var _utils = utils.__exports;
function toBeEmptyDOMElement(element) {
  (0, _utils.checkHtmlElement)(element, toBeEmptyDOMElement, this);
  return {
    pass: isEmptyElement(element),
    message: () => {
      return [this.utils.matcherHint(`${this.isNot ? ".not" : ""}.toBeEmptyDOMElement`, "element", ""), "", "Received:", `  ${this.utils.printReceived(element.innerHTML)}`].join("\n");
    }
  };
}
function isEmptyElement(element) {
  const nonCommentChildNodes = [...element.childNodes].filter((node) => node.nodeType !== 8);
  return nonCommentChildNodes.length === 0;
}
module.exports = toBeEmptyDomElement.__exports;
//# sourceMappingURL=to-be-empty-dom-element.cjs.map
