// JDS tokens: primary neutral, base neutral, radius 0.625rem, font geist.
// Generated from https://www.usejds.dev/tokens/{format}. Don't edit by hand; download again to update.

package jds

import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.spring
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

@Immutable
data class JdsColors(
    val background: Color,
    val foreground: Color,
    val card: Color,
    val cardForeground: Color,
    val popover: Color,
    val popoverForeground: Color,
    val primary: Color,
    val primaryForeground: Color,
    val secondary: Color,
    val secondaryForeground: Color,
    val muted: Color,
    val mutedForeground: Color,
    val accent: Color,
    val accentForeground: Color,
    val destructive: Color,
    val destructiveForeground: Color,
    val border: Color,
    val input: Color,
    val ring: Color,
    val success: Color,
    val successForeground: Color,
    val warning: Color,
    val warningForeground: Color,
    val info: Color,
    val infoForeground: Color,
    val chart1: Color,
    val chart2: Color,
    val chart3: Color,
    val chart4: Color,
    val chart5: Color,
    val sidebar: Color,
    val sidebarForeground: Color,
    val sidebarPrimary: Color,
    val sidebarPrimaryForeground: Color,
    val sidebarAccent: Color,
    val sidebarAccentForeground: Color,
    val sidebarBorder: Color,
    val sidebarRing: Color,
    val glass: Color,
)

val JdsLightColors = JdsColors(
    background = Color(0xFFFAFAFA),
    foreground = Color(0xFF0A0A0A),
    card = Color(0xFFFFFFFF),
    cardForeground = Color(0xFF0A0A0A),
    popover = Color(0xFFFFFFFF),
    popoverForeground = Color(0xFF0A0A0A),
    primary = Color(0xFF171717),
    primaryForeground = Color(0xFFFAFAFA),
    secondary = Color(0xFFF0F0F0),
    secondaryForeground = Color(0xFF171717),
    muted = Color(0xFFF2F2F2),
    mutedForeground = Color(0xFF696969),
    accent = Color(0xFFEEEEEE),
    accentForeground = Color(0xFF171717),
    destructive = Color(0xFFE7000B),
    destructiveForeground = Color(0xFFBB0916),
    border = Color(0xFFE1E1E1),
    input = Color(0xFFDBDBDB),
    ring = Color(0xFF808080),
    success = Color(0xFF3B9555),
    successForeground = Color(0xFF236436),
    warning = Color(0xFFDFA11A),
    warningForeground = Color(0xFF8A5600),
    info = Color(0xFF2B88C0),
    infoForeground = Color(0xFF176490),
    chart1 = Color(0xFFD4D4D4),
    chart2 = Color(0xFF737373),
    chart3 = Color(0xFF525252),
    chart4 = Color(0xFF404040),
    chart5 = Color(0xFF262626),
    sidebar = Color(0xFFF7F7F7),
    sidebarForeground = Color(0xFF0A0A0A),
    sidebarPrimary = Color(0xFF171717),
    sidebarPrimaryForeground = Color(0xFFFAFAFA),
    sidebarAccent = Color(0xFFEEEEEE),
    sidebarAccentForeground = Color(0xFF171717),
    sidebarBorder = Color(0xFFE1E1E1),
    sidebarRing = Color(0xFF808080),
    glass = Color(0x73FFFFFF),
)

val JdsDarkColors = JdsColors(
    background = Color(0xFF131313),
    foreground = Color(0xFFEBEBEB),
    card = Color(0xFF181818),
    cardForeground = Color(0xFFEBEBEB),
    popover = Color(0xFF1C1C1C),
    popoverForeground = Color(0xFFEBEBEB),
    primary = Color(0xFFEBEBEB),
    primaryForeground = Color(0xFF161616),
    secondary = Color(0xFF242424),
    secondaryForeground = Color(0xFFEBEBEB),
    muted = Color(0xFF202020),
    mutedForeground = Color(0xFF989898),
    accent = Color(0xFF262626),
    accentForeground = Color(0xFFEBEBEB),
    destructive = Color(0xFFEF6661),
    destructiveForeground = Color(0xFFFA8880),
    border = Color(0x17FFFFFF),
    input = Color(0x21FFFFFF),
    ring = Color(0xFF717171),
    success = Color(0xFF62BB78),
    successForeground = Color(0xFF89D298),
    warning = Color(0xFFE4B750),
    warningForeground = Color(0xFFEFC876),
    info = Color(0xFF60A7D6),
    infoForeground = Color(0xFF8EC5EC),
    chart1 = Color(0xFFD4D4D4),
    chart2 = Color(0xFF737373),
    chart3 = Color(0xFF525252),
    chart4 = Color(0xFF404040),
    chart5 = Color(0xFF262626),
    sidebar = Color(0xFF161616),
    sidebarForeground = Color(0xFFEBEBEB),
    sidebarPrimary = Color(0xFFEBEBEB),
    sidebarPrimaryForeground = Color(0xFF161616),
    sidebarAccent = Color(0xFF242424),
    sidebarAccentForeground = Color(0xFFEBEBEB),
    sidebarBorder = Color(0x17FFFFFF),
    sidebarRing = Color(0xFF717171),
    glass = Color(0x47333333),
)

/** The scheme for the current system appearance. */
@Composable
fun jdsColors(darkTheme: Boolean = isSystemInDarkTheme()) = if (darkTheme) JdsDarkColors else JdsLightColors

object JdsRadius {
    val sm = 6.dp
    val md = 8.dp
    val lg = 10.dp
    val xl = 14.dp
    val xl2 = 18.dp
    val xl3 = 22.dp
    val xl4 = 26.dp
}

object JdsSize {
    /** Base spacing unit; use multiples of it. */
    val spacing = 4.dp
    /** Minimum size for anything tappable. Material recommends 48dp; raise it if you follow Material. */
    val touchTarget = 44.dp
}

/** Add the font to res/font; falls back to the system font if missing. */
const val JdsFontFamily = "Geist"

/** Durations in milliseconds. Keep UI feedback under 250. */
object JdsDuration {
    const val instant = 100
    const val fast = 160
    const val base = 240
    const val slow = 400
}

/** snappy: buttons and toggles. gentle: panels and messages. soft: voice orbs. */
object JdsSpring {
    fun <T> snappy() = spring<T>(dampingRatio = 0.9624f, stiffness = 866.6667f)
    fun <T> gentle() = spring<T>(dampingRatio = 0.9303f, stiffness = 260f)
    fun <T> soft() = spring<T>(dampingRatio = 0.8216f, stiffness = 120f)
}

object JdsEasing {
    val out = CubicBezierEasing(0.22f, 1f, 0.36f, 1f)
    val inOut = CubicBezierEasing(0.76f, 0f, 0.24f, 1f)
}
