import 'package:flutter/cupertino.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_file_card.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';

class SelectLiveCareCallType extends StatelessWidget {
  SelectLiveCareCallType({super.key, required this.immediateLiveCareViewModel});

  ImmediateLiveCareViewModel immediateLiveCareViewModel;

  @override
  Widget build(BuildContext context) {
    //TODO: Replace with actual icons
    return GridView(
      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: 3,
        crossAxisSpacing: 16,
        mainAxisSpacing: 16,
        mainAxisExtent: 130,
      ),
      physics: NeverScrollableScrollPhysics(),
      padding: EdgeInsets.zero,
      shrinkWrap: true,
      children: [
        MedicalFileCard(
          label: "Video     Call".needTranslation,
          textColor: AppColors.blackColor,
          backgroundColor: AppColors.whiteColor,
          svgIcon: AppAssets.eye_result_icon,
          isLargeText: true,
          iconSize: 36.h,
        ).onPress(() {
          Navigator.of(context).pop();
          immediateLiveCareViewModel.setLiveCareSelectedCallType(1);
        }),
        MedicalFileCard(
          label: "Audio        Call".needTranslation,
          textColor: AppColors.blackColor,
          backgroundColor: AppColors.whiteColor,
          svgIcon: AppAssets.allergy_info_icon,
          isLargeText: true,
          iconSize: 36.h,
        ).onPress(() {
          Navigator.of(context).pop();
          immediateLiveCareViewModel.setLiveCareSelectedCallType(2);
        }),
        MedicalFileCard(
          label: "Phone       Call".needTranslation,
          textColor: AppColors.blackColor,
          backgroundColor: AppColors.whiteColor,
          svgIcon: AppAssets.vaccine_info_icon,
          isLargeText: true,
          iconSize: 36.h,
        ).onPress(() {
          Navigator.of(context).pop();
          immediateLiveCareViewModel.setLiveCareSelectedCallType(3);
        }),
      ],
    );
  }
}
