import 'package:flutter/material.dart';

import 'package:taafee_mobile/common/const/const.dart';

class BoldTextWidget extends StatelessWidget {
  final String title;
  final Color? color;
  final double? fontSize;
  final TextAlign? textAlign;
  final TextDecoration? decoration;
  final TextOverflow? overflow;
  const BoldTextWidget(this.title,
      {super.key,
      this.color,
      this.fontSize,
      this.overflow,
      this.decoration,
      this.textAlign});

  @override
  Widget build(BuildContext context) {
    return Text(
      title,
      textAlign: textAlign,
      style: TextStyle(
          color: color ?? Colors.black,
          fontSize: fontSize ?? (Responsive.isTablet() ? 17 : 14),
          fontFamily: AppFont.bold,
          decoration: decoration,
          overflow: overflow),
    );
  }
}

class MediumTextWidget extends StatelessWidget {
  final String title;
  final Color? color;
  final TextOverflow? overflow;
  final double? fontSize;
  final TextAlign? textAlign;
  const MediumTextWidget(this.title,
      {super.key, this.textAlign, this.color, this.overflow, this.fontSize});

  @override
  Widget build(BuildContext context) {
    return Text(
      title,
      textAlign: textAlign,
      style: TextStyle(
        color: color ?? AppColors.textColor,
        fontSize: fontSize ?? (Responsive.isTablet() ? 15 : 12),
        fontFamily: AppFont.medium,
        overflow: overflow,
      ),
    );
  }
}

class RegularTextWidget extends StatelessWidget {
  final String title;
  final Color? color;
  final double? fontSize;
  final TextOverflow? overflow;
  final TextAlign? textAlign;
  final int? maxLines;
  const RegularTextWidget(this.title,
      {super.key,
      this.color,
      this.fontSize,
      this.maxLines,
      this.overflow,
      this.textAlign});

  @override
  Widget build(BuildContext context) {
    return Text(
      title,
      maxLines: maxLines,
      textAlign: textAlign,
      overflow: overflow,
      style: TextStyle(
        color: color ?? AppColors.textColor,
        fontSize: fontSize ?? (Responsive.isTablet() ? 15 : 12),
        fontFamily: AppFont.regular,
      ),
    );
  }
}
