package dev.kaizen.app.ui.theme.themes

import androidx.compose.ui.graphics.Color

/**
 * The accent portion of a Kaizen theme.
 *
 * Neutrals (background, surface, text) are theme-independent — same Obsidian /
 * Light off-white across all four themes. Only the accent + blob colors swap.
 * This matches the web architecture where `globals.css` ships neutrals and
 * `app/themes/<id>.css` ships only accent tokens.
 */
data class KaizenAccentScheme(
    val primary: Color,
    val primaryDeep: Color,
    val onPrimary: Color,
    val ring: Color,
    val blob1: Color,
    val blob2: Color,
    val blob3: Color,
    val blob4: Color,
)

/**
 * Theme identity — server-synced via `/api/v1/me`.
 */
enum class KaizenThemeId(val value: String) {
    AMBER("amber"),
    BLAU("blue"),
    MONO("mono"),
    AURORA("aurora");

    companion object {
        fun fromString(s: String): KaizenThemeId =
            entries.firstOrNull { it.value == s } ?: AMBER
    }
}

/**
 * A complete Kaizen theme — light + dark accent schemes.
 */
data class KaizenThemeSpec(
    val id: KaizenThemeId,
    val label: String,
    val light: KaizenAccentScheme,
    val dark: KaizenAccentScheme,
)
