import SwiftUI
import Bedrock

// MARK: - Rituals Surface Colors

/// Surface colors using Asset Catalog with light/dark variants.
public enum RitualsSurfaceColors: SurfaceColorProvider {
    public static let primary = Color("Background")
    public static let secondary = Color("BackgroundAlt")
    public static let tertiary = Color("BackgroundTertiary")
    public static let overlay = Color("Background")
    public static let card = Color("Card")
    public static let groupedFill = Color("BackgroundAlt")
    public static let sectionFill = Color("BackgroundTertiary")
}

// MARK: - Rituals Text Colors

/// Text colors using Asset Catalog with light/dark variants.
public enum RitualsTextColors: TextColorProvider {
    public static let primary = Color("TextPrimary")
    public static let secondary = Color("TextSecondary")
    public static let tertiary = Color("TextTertiary")
    public static let disabled = Color("TextDisabled")
    public static let placeholder = Color("TextTertiary")
    public static let inverse = Color("Background")
}

// MARK: - Rituals Accent Colors

/// Accent colors using Asset Catalog with light/dark variants.
public enum RitualsAccentColors: AccentColorProvider {
    public static let primary = Color("Accent")
    public static let light = Color("AccentLight")
    public static let dark = Color("AccentDark")
    public static let secondary = Color("AccentSecondary")
}

// MARK: - Rituals Button Colors

/// Button colors using Asset Catalog with light/dark variants.
public enum RitualsButtonColors: ButtonColorProvider {
    public static let primaryLight = Color("AccentLight")
    public static let primaryDark = Color("AccentDark")
    public static let secondary = Color("Divider")
    public static let destructive = Color("Error")
    public static let cancelText = Color("TextSecondary")
}

// MARK: - Rituals Status Colors

/// Status colors using Asset Catalog with light/dark variants.
public enum RitualsStatusColors: StatusColorProvider {
    public static let success = Color("Success")
    public static let warning = Color("Warning")
    public static let error = Color("Error")
    public static let info = Color("Info")
}

// MARK: - Rituals Border Colors

/// Border colors using Asset Catalog with light/dark variants.
public enum RitualsBorderColors: BorderColorProvider {
    public static let subtle = Color("Divider")
    public static let standard = Color("Divider")
    public static let emphasized = Color("TextTertiary")
    public static let selected = Color("Accent").opacity(Design.Opacity.medium)
}

// MARK: - Rituals Interactive Colors

/// Interactive colors using Asset Catalog with light/dark variants.
public enum RitualsInteractiveColors: InteractiveColorProvider {
    public static let selected = Color("Accent").opacity(Design.Opacity.selection)
    public static let hover = Color("Divider")
    public static let pressed = Color("TextTertiary").opacity(Design.Opacity.hint)
    public static let focus = Color("AccentLight")
}

// MARK: - Rituals Theme

public enum RitualsTheme: AppColorTheme {
    public typealias Surface = RitualsSurfaceColors
    public typealias Text = RitualsTextColors
    public typealias Accent = RitualsAccentColors
    public typealias Button = RitualsButtonColors
    public typealias Status = RitualsStatusColors
    public typealias Border = RitualsBorderColors
    public typealias Interactive = RitualsInteractiveColors
}

// MARK: - Convenience Typealiases

typealias AppSurface = RitualsSurfaceColors
typealias AppTextColors = RitualsTextColors
typealias AppAccent = RitualsAccentColors
typealias AppButtonColors = RitualsButtonColors
typealias AppStatus = RitualsStatusColors
typealias AppBorder = RitualsBorderColors
typealias AppInteractive = RitualsInteractiveColors
