import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:taafee_mobile/common/const/const.dart';
import 'package:taafee_mobile/common/extensions/widget_extension.dart';
import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart';

import '../../../../common/widgets/text.dart';

class CardInformation extends StatelessWidget {
  final CardModel cardModel;
  const CardInformation({super.key, required this.cardModel});

  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        SvgPicture.asset(
          "assets/icons/love-svgrepo-com 2.svg",
        ).expanded(1),
        MediumTextWidget(
          "  ${cardModel.user.firstName}" " ${cardModel.user.lastName}",
        ).expanded(Responsive.isTablet() ? 10 : 7),
        if (Responsive.isTablet()) Container().expanded(1),
        SvgPicture.asset("assets/icons/phone.svg").expanded(1),
        RegularTextWidget(
          cardModel.phoneNumber,
          overflow: TextOverflow.ellipsis,
          maxLines: 1,
        ).expanded(Responsive.isTablet() ? 10 : 4),
      ],
    ).paddingSymmetric(vertical: 6);
  }
}
