package com.fabledsword.minstrel.theme

import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.graphics.Color

/**
 * Semantic action colors. The FabledSword design system reserves Moss/Bronze/
 * Oxblood for action buttons; the forest-teal accent (`FabledSwordFlatTokens.accent`)
 * is for surfaces / highlights / non-action emphasis only and must NEVER be
 * used as a button color.
 *
 * Composables that render action buttons should read from `LocalActionColors.current`
 * rather than `MaterialTheme.colorScheme.primary`.
 */
data class ActionColors(
    val primary: Color,      // Moss — confirm, save, play
    val secondary: Color,    // Bronze — neutral, browse, accent action
    val destructive: Color,  // Oxblood — delete, unflag-as-destructive
    val onAction: Color,     // foreground / text on any of the above
)

val LocalActionColors = staticCompositionLocalOf {
    ActionColors(
        primary = FabledSwordFlatTokens.moss,
        secondary = FabledSwordFlatTokens.bronze,
        destructive = FabledSwordFlatTokens.oxblood,
        onAction = FabledSwordFlatTokens.onAction,
    )
}
