import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:keyboard/resource/string.gen.dart';

import '../../resource/colors.gen.dart';

/// Ai生成提示组件
class AiGenerateTipWidget extends StatelessWidget {
  /// 提示文字
  final String? tip;

  /// 背景颜色
  final Color? bgColor;

  final Color? textColor;
  const AiGenerateTipWidget({super.key, this.tip, this.bgColor,this.textColor});

  /// 普通提示
  static AiGenerateTipWidget normalTip({ Color? bgColor, required Color textColor}) {
    return AiGenerateTipWidget(tip: StringName.aiGenerateTip, bgColor: bgColor, textColor: textColor);
  }


  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: 7.w, vertical: 3.h),
      decoration: BoxDecoration(
        color:bgColor ?? Color(0xFFF9F9F9),
        borderRadius: BorderRadius.circular(10.r),
      ),
      child: Text(
        tip ?? "",
        style: TextStyle(
          color: textColor ?? Color(0x5C000000),
          fontSize: 10.sp,
          fontWeight: FontWeight.w400,
        ),
      ),
    );
  }
}
