library unionflow_design_system;

import 'package:flutter/material.dart';
import 'tokens/app_colors.dart';
import 'tokens/app_typography.dart';
import 'tokens/spacing_tokens.dart';

// ═══════════════════════════════════════════════════════════════════════════
// EXPORTS — Point d'entrée unique du design system
// ═══════════════════════════════════════════════════════════════════════════

export 'tokens/app_colors.dart';
export 'tokens/app_typography.dart';
export 'tokens/spacing_tokens.dart';
export 'tokens/color_tokens.dart';       // ← Facade de compat → AppColors
export 'tokens/unionflow_colors.dart';   // ← Facade de compat → AppColors
export 'tokens/module_colors.dart';      // ← Identité chromatique par module
export 'theme/app_theme.dart';
export 'components/components.dart';

// ═══════════════════════════════════════════════════════════════════════════
// SHADOW TOKENS
// ═══════════════════════════════════════════════════════════════════════════

class ShadowTokens {
  static const List<BoxShadow> sm = [
    BoxShadow(
      color: AppColors.shadowMedium,
      blurRadius: 4,
      offset: Offset(0, 2),
    ),
  ];
  static const List<BoxShadow> md = [
    BoxShadow(
      color: AppColors.shadowStrong,
      blurRadius: 8,
      offset: Offset(0, 4),
    ),
  ];
  static const List<BoxShadow> primary = md;
}

// ═══════════════════════════════════════════════════════════════════════════
// RADIUS TOKENS
// ═══════════════════════════════════════════════════════════════════════════

class RadiusTokens {
  static const double sm = SpacingTokens.radiusSm;
  static const double md = SpacingTokens.radiusMd;
  static const double lg = SpacingTokens.radiusLg;
  static const double xl = SpacingTokens.radiusXl;
  static const double circular = SpacingTokens.radiusCircular;
  static const double round = SpacingTokens.radiusCircular;
}

// ═══════════════════════════════════════════════════════════════════════════
// TYPOGRAPHY TOKENS (shim — renvoie vers AppTypography)
// ═══════════════════════════════════════════════════════════════════════════

class TypographyTokens {
  static TextStyle get displayLarge => AppTypography.displayLarge;
  static TextStyle get displayMedium => AppTypography.displayMedium;
  static TextStyle get displaySmall => AppTypography.displaySmall;

  static const TextStyle headlineLarge = AppTypography.headerLarge;
  static const TextStyle headlineMedium = AppTypography.headerSmall;
  static const TextStyle headlineSmall = AppTypography.titleMedium;

  static const TextStyle titleLarge = AppTypography.headerSmall;
  static const TextStyle titleMedium = AppTypography.titleMedium;
  static const TextStyle titleSmall = AppTypography.titleSmall;

  static const TextStyle bodyLarge = AppTypography.bodyLarge;
  static const TextStyle bodyMedium = AppTypography.bodyMedium;
  static const TextStyle bodySmall = AppTypography.bodyTextSmall;

  static const TextStyle labelLarge = AppTypography.actionText;
  static const TextStyle labelMedium = AppTypography.labelMedium;
  static const TextStyle labelSmall = AppTypography.badgeText;

  static const TextStyle buttonLarge = AppTypography.buttonLabel;
  static const TextStyle buttonMedium = AppTypography.actionText;

  static const TextStyle cardTitle = AppTypography.headerSmall;
  static const TextStyle cardSubtitle = AppTypography.bodyTextSmall;
  static const TextStyle cardValue = AppTypography.headerLarge;

  static const TextStyle inputLabel = AppTypography.labelMedium;
  static const TextStyle inputText = AppTypography.bodyLarge;
  static const TextStyle inputHint = AppTypography.bodyTextSmall;

  static const TextStyle navigationLabel = AppTypography.navLabel;
  static const TextStyle navigationLabelSelected = AppTypography.navLabelSelected;
}
