import { Fun } from '@ephox/katamari';
import { Compare, PredicateExists } from '@ephox/sugar';
import * as AriaControls from '../aria/AriaControls';
const isAriaPartOf = (component, queryElem) => AriaControls.find(queryElem).exists((owner) => isPartOf(component, owner));
const isPartOf = (component, queryElem) => PredicateExists.closest(queryElem, (el) => Compare.eq(el, component.element), Fun.never) || isAriaPartOf(component, queryElem);
const isPartOfAnchor = (anchor, queryElem) => anchor.type === 'hotspot' && isPartOf(anchor.hotspot, queryElem);
export { isPartOf, isPartOfAnchor };
//# sourceMappingURL=ComponentStructure.js.map