/* @oracle/oraclejet-preact: undefined */
import { a as LOGICAL_PARENT } from './Layer-446bf21e.js';

const getLogicalParent = (node) => {
    if (node && Object.prototype.hasOwnProperty.call(node, LOGICAL_PARENT)) {
        const layerElement = node;
        return layerElement[LOGICAL_PARENT];
    }
    return undefined;
};
const isLogicalAncestor = (ancestorNode, node) => {
    let parentNode = node;
    while (parentNode) {
        if (parentNode === ancestorNode) {
            return true;
        }
        const logicalParent = getLogicalParent(parentNode);
        if (logicalParent) {
            parentNode = logicalParent;
        }
        else {
            parentNode = parentNode.parentNode;
        }
    }
    return false;
};

export { isLogicalAncestor as i };
//# sourceMappingURL=popupUtils-58411a98.js.map
