lector("span").textContent.trim(), // Use folder name as identifier
        isOpen: folder.classList.contains("open") // Check if folder is open
    }));

    // Save the navbar and folder states to localStorage
    localStorage.setItem("navbarState", JSON.stringify({ isOpen, folderStates }));
}

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