export var scroll = function (element) { return element && element.scrollIntoView({ block: 'end', behavior: 'smooth' }); };
export var clearScrollTimer = function (scrollTimer) {
    if (scrollTimer) {
        clearTimeout(scrollTimer);
    }
};
export var isScrolledIntoView = function (element, scrollableParent) {
    if (element && scrollableParent) {
        var elemTop = element.offsetTop;
        var elemBottom = element.offsetTop + element.clientHeight;
        var clientHeight = scrollableParent.clientHeight, scrollTop = scrollableParent.scrollTop;
        return elemTop >= 0 && elemBottom > scrollTop && elemBottom < scrollTop + clientHeight;
    }
};
