{
    saveSideNavState();
    saveSidenavScrollPosition();
});

window.addEventListener("load", restoreSidenavScrollPosition);
document.addEventListener("DOMContentLoaded", restorenavbarState);

function initializeSearchBar(searchContainerId, outputSelector) {
    const searchContainer = document.getElementById(searchContainerId);
    if (!searchContainer) return; // Exit if container is not found

    const searchBar = searchContainer.querySelector('#search-bar');
    const autocompleteList = searchContain