import { __exports as toBeEmptyDomElement } from "../../../../_virtual/to-be-empty-dom-element.js";
import "./utils.js";
import { __exports as utils } from "../../../../_virtual/utils.js";
Object.defineProperty(toBeEmptyDomElement, "__esModule", {
  value: true
});
toBeEmptyDomElement.toBeEmptyDOMElement = toBeEmptyDOMElement;
var _utils = utils;
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;
}
export {
  toBeEmptyDomElement as default
};
//# sourceMappingURL=to-be-empty-dom-element.js.map
