//! Design system tokens and variants
//!
//! Provides glassmorphism design system tokens for consistent styling across
//! components.

/// Button and component visual variants
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum Variant {
    /// Cyan-purple gradient (primary actions)
    #[default]
    Primary,
    /// Transparent with border (secondary actions)
    Secondary,
    /// Red gradient (destructive actions)
    Danger,
    /// Subtle hover (minimal emphasis)
    Ghost,
}

impl Variant {
    /// Get Tailwind/UnoCSS classes for this variant
    pub fn classes(&self) -> &'static str {
        match self {
            Self::Primary => {
                "bg-gradient-to-r from-cyan-500/90 via-purple-600/90 to-pink-500/90 \
                 hover:from-cyan-400/90 hover:via-purple-500/90 hover:to-pink-400/90 shadow-lg \
                 shadow-cyan-500/50"
            }
            Self::Secondary => {
                "bg-white/5 border border-white/20 hover:bg-white/8 hover:border-cyan-400/70"
            }
            Self::Danger => {
                "bg-gradient-to-r from-red-500/90 to-pink-600/90 hover:from-red-400/90 \
                 hover:to-pink-500/90"
            }
            Self::Ghost => "bg-transparent hover:bg-white/5",
        }
    }
}

/// Component size variants
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum Size {
    /// Small (px-3 py-1.5 text-sm)
    Small,
    /// Medium (px-4 py-2 text-base) - default
    #[default]
    Medium,
    /// Large (px-6 py-3 text-lg)
    Large,
}

impl Size {
    /// Get Tailwind/UnoCSS classes for this size
    pub fn classes(&self) -> &'static str {
        match self {
            Self::Small => "px-3 py-1.5 text-sm",
            Self::Medium => "px-4 py-2 text-base",
            Self::Large => "px-6 py-3 text-lg",
        }
    }
}

/// Backdrop blur intensity levels
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum BlurLevel {
    /// No blur
    #[default]
    None,
    /// Small blur (backdrop-blur-sm)
    Sm,
    /// Medium blur (backdrop-blur-md)
    Md,
    /// Large blur (backdrop-blur-lg)
    Lg,
    /// Extra large blur (backdrop-blur-xl)
    Xl,
}

impl BlurLevel {
    /// Get Tailwind/UnoCSS classes for this blur level
    pub fn classes(&self) -> &'static str {
        match self {
            Self::None => "",
            Self::Sm => "backdrop-blur-sm",
            Self::Md => "backdrop-blur-md",
            Self::Lg => "backdrop-blur-lg",
            Self::Xl => "backdrop-blur-xl",
        }
    }
}

/// Glow shadow colors for glassmorphism effects
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum GlowColor {
    /// No glow
    #[default]
    None,
    /// Cyan glow (shadow-lg shadow-cyan-500/40)
    Cyan,
    /// Purple glow (shadow-lg shadow-purple-500/40)
    Purple,
    /// Pink glow (shadow-lg shadow-pink-500/40)
    Pink,
    /// Blue glow (shadow-lg shadow-blue-500/40)
    Blue,
}

impl GlowColor {
    /// Get Tailwind/UnoCSS classes for this glow color
    pub fn classes(&self) -> &'static str {
        match self {
            Self::None => "",
            Self::Cyan => "shadow-lg shadow-cyan-500/40",
            Self::Purple => "shadow-lg shadow-purple-500/40",
            Self::Pink => "shadow-lg shadow-pink-500/40",
            Self::Blue => "shadow-lg shadow-blue-500/40",
        }
    }
}
