import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/color_manager.dart';

final myTheme = ThemeData(
  fontFamily: 'Aftika',
  useMaterial3: true,
  textTheme: const TextTheme(
    bodySmall: TextStyle(
      fontSize: 13,
      color: ColorsManager.whiteColors,
      fontWeight: FontWeight.normal,
    ),
    bodyMedium: TextStyle(color: Colors.black87, fontSize: 14),
    bodyLarge: TextStyle(fontSize: 16, color: Colors.white),
    headlineSmall: TextStyle(color: Colors.black87, fontSize: 18),
    headlineMedium: TextStyle(color: Colors.black87, fontSize: 20),
    headlineLarge: TextStyle(
      color: Colors.white,
      fontSize: 24,
      fontWeight: FontWeight.bold,
    ),
  ),
  colorScheme: ColorScheme.fromSeed(
    seedColor: ColorsManager.blueColor,
    primary: ColorsManager.blueColor,
    onSurface: Colors.grey.shade400,
  ),
  switchTheme: SwitchThemeData(
    thumbColor: WidgetStateProperty.resolveWith((states) {
      if (states.contains(WidgetState.selected)) {
        return ColorsManager.blueColor;
      }
      return ColorsManager.whiteColors;
    }),
    trackColor: WidgetStateProperty.resolveWith((states) {
      if (states.contains(WidgetState.selected)) {
        return ColorsManager.blueColor.withOpacity(0.5);
      }
      return ColorsManager.whiteColors;
    }),
  ),
  checkboxTheme: CheckboxThemeData(
    fillColor: WidgetStateProperty.resolveWith((states) {
      if (states.contains(WidgetState.selected)) {
        return ColorsManager.blueColor;
      }
      return Colors.grey.shade200;
    }),
    checkColor: WidgetStateProperty.all(Colors.white),
    side: const BorderSide(color: ColorsManager.whiteColors),
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(4),
    ),
  ),
);
