tents.style.display = "none";
    } else {
        folder.classList.add("open");
        folderContents.style.display = "block";
    }

    // Save the updated state
    saveSideNavState();
}

function saveSideNavState() {
    const navbar = document.getElementById("theSideNav");
    const isOpen = navbar.style.width !== "0px"; // Check if navbar is open

    // Save the state of each folder
    const folderStates = Array.from(document.querySelectorAll(".folder")).map(folder => ({
        id: folder.querySe