• Toggles the application theme between dark and light modes.

    Returns Promise<boolean>

    A promise that resolves to true if dark mode is enabled, false otherwise.

    export async function toggleTheme() {
    const { local } = await getCurrentTheme();
    // If current theme is dark or not set, switch to light, otherwise switch to dark
    const newTheme = local === "dark" ? "light" : "dark";

    const isDarkMode = await setTheme(newTheme);
    return isDarkMode;
    }