import 'package:t_basic_intl/intl.dart';
import 'package:flutter/material.dart';

class AppTheme {

  static String _getLocaleAwareFontFamily() {
    final isChinese = Intl.getCurrentLocale().startsWith('zh');
    return isChinese ? 'HYQiHei_Regular' : 'VWHead_Regular';
  }

  static final ThemeData lightTheme = ThemeData(
    primaryColor: const Color(0xFF6C63FF),
    scaffoldBackgroundColor: Colors.white,
    fontFamily: _getLocaleAwareFontFamily(),
    colorScheme: ColorScheme.fromSeed(
      seedColor: const Color(0xFF6C63FF),
      brightness: Brightness.light,
    ),
  );

  static final ThemeData darkTheme = ThemeData(
    primaryColor: const Color(0xFF6C63FF),
    scaffoldBackgroundColor: const Color(0xFF121212),
    fontFamily: _getLocaleAwareFontFamily(),
    colorScheme: ColorScheme.fromSeed(
      seedColor: const Color(0xFF6C63FF),
      brightness: Brightness.dark,
    ),
  );
}