import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'app_colors.dart';
import 'app_text_styles.dart';

/// App theme configuration
class AppTheme {
  static ThemeData get lightTheme {
    return ThemeData(
      useMaterial3: true,

      // Color scheme
      colorScheme: ColorScheme.light(
        primary: AppColors.primary,
        surface: AppColors.background,
        onPrimary: AppColors.white,
        onSurface: AppColors.textPrimary,
      ),

      // Scaffold
      scaffoldBackgroundColor: AppColors.background,

      // AppBar
      appBarTheme: AppBarTheme(
        backgroundColor: AppColors.background,
        elevation: 0,
        centerTitle: true,
        titleTextStyle: AppTextStyles.appTitle,
        iconTheme: const IconThemeData(color: AppColors.textPrimary),
      ),

      // Elevated Button
      elevatedButtonTheme: ElevatedButtonThemeData(
        style: ElevatedButton.styleFrom(
          backgroundColor: AppColors.primary,
          foregroundColor: AppColors.white,
          minimumSize: const Size(double.infinity, 56),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(16),
          ),
          elevation: 4,
          textStyle: AppTextStyles.buttonText,
        ),
      ),

      // Text Button
      textButtonTheme: TextButtonThemeData(
        style: TextButton.styleFrom(
          foregroundColor: AppColors.textSecondary,
          textStyle: AppTextStyles.bodyText,
        ),
      ),

      // Default text theme - Use Google Fonts
      textTheme: GoogleFonts.nunitoTextTheme(
        TextTheme(
          displayLarge: AppTextStyles.timerDisplay,
          headlineMedium: AppTextStyles.headline,
          bodyLarge: AppTextStyles.bodyText,
          bodyMedium: AppTextStyles.helperText,
          labelLarge: AppTextStyles.buttonText,
        ),
      ),

      // Font family - Use Google Fonts
      fontFamily: GoogleFonts.nunito().fontFamily,
    );
  }
}
