import 'package:chat/configs/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class Themes {
  static final ThemeData light = ThemeData(
    /// 头部导航栏
    appBarTheme: const AppBarTheme(
      shadowColor: AppColors.transparent,
      color: AppColors.page,
      titleTextStyle: TextStyle(
        fontSize: 16,
        color: AppColors.active,
      ),
      foregroundColor: AppColors.active,
      systemOverlayStyle: SystemUiOverlayStyle.dark,
    ),

    /// 主色调
    primaryColor: AppColors.primary,
    primaryColorLight: AppColors.primary,

    /// 按钮主题
    // elevatedButtonTheme: ElevatedButtonThemeData(
    //   style: ButtonStyle(
    //     backgroundColor: MaterialStateProperty.all(
    //       AppColors.primary,
    //     ),
    //   ),
    // ),

    /// 输入框光标颜色
    // textSelectionTheme: const TextSelectionThemeData(
    //   cursorColor: AppColors.primary,
    // ),

    toggleableActiveColor: AppColors.primary,

    /// 脚手架的背景色，页面背景色
    scaffoldBackgroundColor: AppColors.page,
    indicatorColor: AppColors.active,
    splashColor: AppColors.transparent,
    highlightColor: AppColors.transparent,

    /// 底部导航
    bottomNavigationBarTheme: const BottomNavigationBarThemeData(
      type: BottomNavigationBarType.fixed,
      backgroundColor: AppColors.nav,
      selectedItemColor: AppColors.primary,
      unselectedItemColor: AppColors.unactive,
      selectedIconTheme: IconThemeData(color: AppColors.primary),
      unselectedIconTheme: IconThemeData(color: AppColors.unactive),
      selectedLabelStyle: TextStyle(
        fontSize: 11,
      ),
      unselectedLabelStyle: TextStyle(
        fontSize: 11,
      ),
    ),
  );

  static final ThemeData dark = ThemeData(
    // appBarTheme: const AppBarTheme(
    //   color: AppColors.active,
    // ),
    primaryColor: AppColors.danger,
    scaffoldBackgroundColor: AppColors.active,
    indicatorColor: AppColors.active,
    splashColor: AppColors.transparent,
    highlightColor: AppColors.transparent,
    hoverColor: AppColors.white.withOpacity(
      0.5,
    ),
    bottomNavigationBarTheme: const BottomNavigationBarThemeData(
      type: BottomNavigationBarType.fixed,
      backgroundColor: AppColors.active,
      selectedItemColor: AppColors.page,
      unselectedItemColor: AppColors.page,
      selectedLabelStyle: TextStyle(
        fontSize: 12,
      ),
      unselectedLabelStyle: TextStyle(
        fontSize: 10,
      ),
    ),
    drawerTheme: const DrawerThemeData(
      backgroundColor: AppColors.active,
    ),
  );
}
