import { Arr } from '@ephox/katamari';
import { Compare, SelectorFilter, Visibility } from '@ephox/sugar';
import * as ArrPinpoint from './ArrPinpoint';
const locateVisible = (container, current, selector) => {
    const predicate = (x) => Compare.eq(x, current);
    const candidates = SelectorFilter.descendants(container, selector);
    const visible = Arr.filter(candidates, Visibility.isVisible);
    return ArrPinpoint.locate(visible, predicate);
};
const findIndex = (elements, target) => Arr.findIndex(elements, (elem) => Compare.eq(target, elem));
export { locateVisible, findIndex };
//# sourceMappingURL=DomPinpoint.js.map