ebar').addClass('nav-legacy');
            localStorage.setItem("sidebarModalSwitch", "true");
        } else {
            $('.nav-sidebar').removeClass('nav-legacy');
            localStorage.removeItem("sidebarModalSwitch");
        }
    }

    function toggleSidebarTheme() {
        if ($("#sidebarThemeSwitch").is(':checked')) {
            $('.main-sidebar').removeClass("sidebar-dark-primary").addClass('sidebar-light-primary');
            localStorage.setItem("sidebarThemeSwitch", "true");