"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const createProjectionNode = require("./dist-es-projection-node-create-projection-node.cjs");
const DocumentProjectionNode = require("./dist-es-projection-node-DocumentProjectionNode.cjs");
const rootProjectionNode = {
  current: void 0
};
const HTMLProjectionNode = createProjectionNode.createProjectionNode({
  measureScroll: (instance) => ({
    x: instance.scrollLeft,
    y: instance.scrollTop
  }),
  defaultParent: () => {
    if (!rootProjectionNode.current) {
      const documentNode = new DocumentProjectionNode.DocumentProjectionNode({});
      documentNode.mount(window);
      documentNode.setOptions({ layoutScroll: true });
      rootProjectionNode.current = documentNode;
    }
    return rootProjectionNode.current;
  },
  resetTransform: (instance, value) => {
    instance.style.transform = value !== void 0 ? value : "none";
  },
  checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed")
});
exports.HTMLProjectionNode = HTMLProjectionNode;
exports.rootProjectionNode = rootProjectionNode;
//# sourceMappingURL=dist-es-projection-node-HTMLProjectionNode.cjs.map
