import { Option } from './components/Option';
export var customComponents = {
    Option: Option
};
export var findNearestScrollableElement = function (element) {
    var currentElement = element === null || element === void 0 ? void 0 : element.parentElement;
    while (currentElement) {
        if (currentElement.scrollHeight > currentElement.clientHeight) {
            return currentElement;
        }
        currentElement = currentElement.parentElement;
    }
    return null;
};
export var needToScroll = function (valueLength, prevValuesLength, parentElementWithScroll, currentElement) {
    return valueLength &&
        prevValuesLength < valueLength &&
        currentElement.getBoundingClientRect().bottom > parentElementWithScroll.getBoundingClientRect().bottom;
};
