import 'package:betting/commom/utils/textstyle.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class TournamentsWidget extends StatelessWidget {
  const TournamentsWidget(
      {Key? key,
      required this.logo,
      required this.nameTournaments,
      required this.typeTournaments,
      this.isFavourite})
      : super(key: key);
  final String logo;
  final String nameTournaments;
  final String typeTournaments;
  final bool? isFavourite;

  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            const SizedBox(
              width: 8,
            ),
            Image.network(
              logo,
              height: 25,
              width: 25,
            ),
            const SizedBox(
              width: 15,
            ),
            Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Row(
                  children: [
                    Text(
                      nameTournaments,
                      style: TextStyleUtils.sizeText14Weight400()!
                          .copyWith(color: Colors.white),
                    ),
                    const SizedBox(width: 5,),
                    Visibility(
                      visible: isFavourite != null && isFavourite == true,
                      child: Icon(
                        Icons.star_rounded,
                        color: Colors.white,
                        size: 14.sp,
                      ),
                    ),
                  ],
                ),
                const SizedBox(
                  height: 5,
                ),
                Text(
                  typeTournaments,
                  style: TextStyleUtils.sizeText12Weight400()!
                      .copyWith(color: Colors.white54),
                ),
              ],
            ),
          ],
        ),
        Container(
          margin: EdgeInsets.only(right: 6.w),
          child: Icon(
            Icons.navigate_next,
            size: 20.sp,
            color: Colors.white,
          ),
        ),
      ],
    );
  }
}
