
import 'package:flutter/material.dart';
import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';

class AppointmentSliderWidget extends StatelessWidget {
  const AppointmentSliderWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Row(
          children: [
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisAlignment: MainAxisAlignment.start,
                children: [
                  "Olaya Brach".toText(
                    color: MyColors.lightTextColor,
                    isBold: true,
                  ),
                  "Abdullah Alhbas".toText(
                    isBold: true,
                    fontSize: 14,
                  ),
                  Row(
                    children: [
                      "Appt. On:".toText(
                        color: MyColors.lightTextColor,
                      ),
                      2.width,
                      "19-Mar-2023 11:48 AM".toText(),
                    ],
                  ),
                ],
              ),
            ),
            "1+ Requests".toText(fontSize: 10).toContainer(
                  borderRadius: 15,
                  backgroundColor: MyColors.lightGreyEAColor,
                  padding: const EdgeInsets.symmetric(
                    vertical: 6,
                    horizontal: 12,
                  ),
                ),
          ],
        ),
        8.height,
        Row(
          crossAxisAlignment: CrossAxisAlignment.end,
          children: [
            Expanded(
              child: Column(
                children: [
                  showServices("Maintenance"),
                  2.height,
                  showServices("Accessories and Modification"),
                ],
              ),
            ),
            const Icon(
              Icons.arrow_forward,
            ),
          ],
        ),
      ],
    ).toWhiteContainer(width: double.infinity, allPading: 0);
  }

  Widget showServices(String title) {
    return Row(
      children: [
        const Icon(
          Icons.ac_unit,
          color: MyColors.primaryColor,
          size: 18,
        ),
        8.width,
        title.toText(
          fontSize: 14,
          isBold: true,
        ),
      ],
    );
  }
}
