package com.swoosh.microblog.ui.theme

/**
 * Represents the user's theme preference.
 */
enum class ThemeMode {
    SYSTEM,
    LIGHT,
    DARK;

    /**
     * Returns the next mode in the cycle: SYSTEM -> LIGHT -> DARK -> SYSTEM.
     */
    fun next(): ThemeMode = when (this) {
        SYSTEM -> LIGHT
        LIGHT -> DARK
        DARK -> SYSTEM
    }
}
