const scrollToView = (id, block = 'nearest', retries = 5) => {
    if (!id)
        return;
    const element = document.getElementById(id);
    if (element) {
        element.scrollIntoView({ behavior: 'smooth', block });
    }
    else if (retries > 0) {
        setTimeout(() => {
            scrollToView(id, block, retries - 1);
        }, 300);
    }
    else {
        console.warn(`Element with id - "${id}" not found after multiple retries.`);
    }
};

export { scrollToView };
//# sourceMappingURL=ScrollToView.js.map
