"""
Default DSS Light & Dark Themes
Perfect implementation showcasing the design system
"""

from dss.models.theme import Theme, DesignToken, TokenCategory


def get_default_light_theme() -> Theme:
    """
    DSS Default Light Theme
    Clean, modern light theme optimized for readability
    """
    return Theme(
        name="DSS Light",
        version="1.0.0",
        tokens={
            # Colors
            "background": DesignToken(
                name="background",
                value="oklch(0.99 0.005 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Main background color"
            ),
            "foreground": DesignToken(
                name="foreground",
                value="oklch(0.15 0.015 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Main text color"
            ),
            "primary": DesignToken(
                name="primary",
                value="oklch(0.65 0.18 250)",
                type="color",
                category=TokenCategory.COLOR,
                description="Primary brand color - vibrant blue"
            ),
            "secondary": DesignToken(
                name="secondary",
                value="oklch(0.55 0.05 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Secondary color - subtle purple-gray"
            ),
            "accent": DesignToken(
                name="accent",
                value="oklch(0.70 0.15 180)",
                type="color",
                category=TokenCategory.COLOR,
                description="Accent color - cyan"
            ),
            "destructive": DesignToken(
                name="destructive",
                value="oklch(0.55 0.22 25)",
                type="color",
                category=TokenCategory.COLOR,
                description="Destructive actions - red"
            ),
            "success": DesignToken(
                name="success",
                value="oklch(0.60 0.18 145)",
                type="color",
                category=TokenCategory.COLOR,
                description="Success states - green"
            ),
            "warning": DesignToken(
                name="warning",
                value="oklch(0.75 0.15 85)",
                type="color",
                category=TokenCategory.COLOR,
                description="Warning states - yellow"
            ),
            "muted": DesignToken(
                name="muted",
                value="oklch(0.95 0.01 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Muted background"
            ),
            "border": DesignToken(
                name="border",
                value="oklch(0.90 0.01 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Border color"
            ),

            # Spacing
            "space-xs": DesignToken(
                name="space-xs",
                value="4px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Extra small spacing"
            ),
            "space-sm": DesignToken(
                name="space-sm",
                value="8px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Small spacing"
            ),
            "space-md": DesignToken(
                name="space-md",
                value="16px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Medium spacing"
            ),
            "space-lg": DesignToken(
                name="space-lg",
                value="24px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Large spacing"
            ),
            "space-xl": DesignToken(
                name="space-xl",
                value="32px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Extra large spacing"
            ),

            # Border Radius
            "radius-sm": DesignToken(
                name="radius-sm",
                value="4px",
                type="dimension",
                category=TokenCategory.RADIUS,
                description="Small border radius"
            ),
            "radius-md": DesignToken(
                name="radius-md",
                value="8px",
                type="dimension",
                category=TokenCategory.RADIUS,
                description="Medium border radius"
            ),
            "radius-lg": DesignToken(
                name="radius-lg",
                value="12px",
                type="dimension",
                category=TokenCategory.RADIUS,
                description="Large border radius"
            ),

            # Typography
            "text-xs": DesignToken(
                name="text-xs",
                value="0.75rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Extra small text"
            ),
            "text-sm": DesignToken(
                name="text-sm",
                value="0.875rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Small text"
            ),
            "text-base": DesignToken(
                name="text-base",
                value="1rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Base text size"
            ),
            "text-lg": DesignToken(
                name="text-lg",
                value="1.125rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Large text"
            ),
            "text-xl": DesignToken(
                name="text-xl",
                value="1.25rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Extra large text"
            ),
        }
    )


def get_default_dark_theme() -> Theme:
    """
    DSS Default Dark Theme
    Sleek dark theme optimized for low-light environments
    """
    return Theme(
        name="DSS Dark",
        version="1.0.0",
        tokens={
            # Colors - Inverted for dark mode
            "background": DesignToken(
                name="background",
                value="oklch(0.15 0.015 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Main background color"
            ),
            "foreground": DesignToken(
                name="foreground",
                value="oklch(0.95 0.01 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Main text color"
            ),
            "primary": DesignToken(
                name="primary",
                value="oklch(0.70 0.20 250)",
                type="color",
                category=TokenCategory.COLOR,
                description="Primary brand color - brighter blue for dark mode"
            ),
            "secondary": DesignToken(
                name="secondary",
                value="oklch(0.60 0.08 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Secondary color - subtle purple-gray"
            ),
            "accent": DesignToken(
                name="accent",
                value="oklch(0.75 0.18 180)",
                type="color",
                category=TokenCategory.COLOR,
                description="Accent color - brighter cyan"
            ),
            "destructive": DesignToken(
                name="destructive",
                value="oklch(0.60 0.24 25)",
                type="color",
                category=TokenCategory.COLOR,
                description="Destructive actions - brighter red"
            ),
            "success": DesignToken(
                name="success",
                value="oklch(0.65 0.20 145)",
                type="color",
                category=TokenCategory.COLOR,
                description="Success states - brighter green"
            ),
            "warning": DesignToken(
                name="warning",
                value="oklch(0.80 0.17 85)",
                type="color",
                category=TokenCategory.COLOR,
                description="Warning states - brighter yellow"
            ),
            "muted": DesignToken(
                name="muted",
                value="oklch(0.22 0.02 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Muted background"
            ),
            "border": DesignToken(
                name="border",
                value="oklch(0.30 0.02 285)",
                type="color",
                category=TokenCategory.COLOR,
                description="Border color"
            ),

            # Spacing - Same as light theme
            "space-xs": DesignToken(
                name="space-xs",
                value="4px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Extra small spacing"
            ),
            "space-sm": DesignToken(
                name="space-sm",
                value="8px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Small spacing"
            ),
            "space-md": DesignToken(
                name="space-md",
                value="16px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Medium spacing"
            ),
            "space-lg": DesignToken(
                name="space-lg",
                value="24px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Large spacing"
            ),
            "space-xl": DesignToken(
                name="space-xl",
                value="32px",
                type="dimension",
                category=TokenCategory.SPACING,
                description="Extra large spacing"
            ),

            # Border Radius - Same as light theme
            "radius-sm": DesignToken(
                name="radius-sm",
                value="4px",
                type="dimension",
                category=TokenCategory.RADIUS,
                description="Small border radius"
            ),
            "radius-md": DesignToken(
                name="radius-md",
                value="8px",
                type="dimension",
                category=TokenCategory.RADIUS,
                description="Medium border radius"
            ),
            "radius-lg": DesignToken(
                name="radius-lg",
                value="12px",
                type="dimension",
                category=TokenCategory.RADIUS,
                description="Large border radius"
            ),

            # Typography - Same as light theme
            "text-xs": DesignToken(
                name="text-xs",
                value="0.75rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Extra small text"
            ),
            "text-sm": DesignToken(
                name="text-sm",
                value="0.875rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Small text"
            ),
            "text-base": DesignToken(
                name="text-base",
                value="1rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Base text size"
            ),
            "text-lg": DesignToken(
                name="text-lg",
                value="1.125rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Large text"
            ),
            "text-xl": DesignToken(
                name="text-xl",
                value="1.25rem",
                type="dimension",
                category=TokenCategory.TYPOGRAPHY,
                description="Extra large text"
            ),
        }
    )
