n, folderStates }));
}

function restorenavbarState() {
    const savedState = localStorage.getItem("navbarState");
    if (savedState) {
        const { isOpen, folderStates } = JSON.parse(savedState);
        const navbar = document.getElementById("theSideNav");
        const main = document.getElementById("main");

        // Temporarily disable animations on page load so elements don't move
        navbar.style.transition = "none";
        main.style.transition = "none";
        const chevrons = documen