import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:yumi/app/config/app_config.dart';
import 'package:yumi/ui_kit/theme/socialchat_theme.dart';

/// 主题颜色配置（兼容层）

///主题色 - 从AppConfig获取主色
@deprecated
Color get themeColor => SocialChatTheme.primaryColor;

/// 次要主题色 - 基于主色的浅色版本
@deprecated
Color get themeColor2 => SocialChatTheme.primaryLight;

/// 欢迎页面颜色
@deprecated
const int welcomeColorValue = 0xFFD0D3B5;
@deprecated
const Color color999 = Color(0xFF999999);

/// 主题色值（兼容旧代码）
@deprecated
int get THEME_COLOR_VALUE => SocialChatTheme.primaryColor.value;
@deprecated
const int WELCOME_COLOR_VALUE = 0xFFD0D3B5;

/// 分隔线颜色 - 使用SocialChat主题系统的颜色
@deprecated
Color get dividerColor => SocialChatTheme.dividerColor;

@deprecated
LinearGradient getLinearGradient(List<int> colorValues, {bool vertical = false, double opacity = 1}){
  if(vertical){
    return LinearGradient(colors: colorValues.map((e) => Color(e).withOpacity(opacity)).toList(), begin: Alignment.topCenter, end: Alignment.bottomCenter);
  } else{
    return LinearGradient(colors: colorValues.map((e) => Color(e).withOpacity(opacity)).toList(), begin: Alignment.centerLeft, end: Alignment.centerRight);
  }
}