import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/core/utils/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/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_doctor_page.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';

class SelectLivecareClinicPage extends StatelessWidget {
  const SelectLivecareClinicPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: AppColors.bgScaffoldColor,
      body: Column(
        children: [
          Expanded(
            child: CollapsingListView(
              title: LocaleKeys.livecare.tr(context: context),
              child: SingleChildScrollView(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    SizedBox(height: 24.h),
                    LocaleKeys.livecareModalTop.tr(context: context).toText18(isBold: true),
                    SizedBox(height: 40.h),
                    Row(
                      children: [
                        Utils.buildSvgWithAssets(icon: AppAssets.immediate_service_icon, width: 58.h, height: 58.h),
                        SizedBox(width: 18.h),
                        Expanded(
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              "Immediate service".needTranslation.toText18(color: AppColors.textColor, isBold: true),
                              "No need to wait, you will get medical consultation immediately via video call".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
                            ],
                          ),
                        ),
                      ],
                    ),
                    SizedBox(height: 24.h),
                    Row(
                      children: [
                        Utils.buildSvgWithAssets(icon: AppAssets.no_visit_icon, width: 58.h, height: 58.h),
                        SizedBox(width: 18.h),
                        Expanded(
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              "No visit required".needTranslation.toText18(color: AppColors.textColor, isBold: true),
                              LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
                            ],
                          ),
                        ),
                      ],
                    ),
                    SizedBox(height: 24.h),
                    Row(
                      children: [
                        Utils.buildSvgWithAssets(icon: AppAssets.doctor_contact_icon, width: 58.h, height: 58.h),
                        SizedBox(width: 18.h),
                        Expanded(
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              "Doctor will contact".needTranslation.toText18(color: AppColors.textColor, isBold: true),
                              "A specialised doctor will contact you and will be able to view your medical history".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
                            ],
                          ),
                        ),
                      ],
                    ),
                    SizedBox(height: 24.h),
                    Row(
                      children: [
                        Utils.buildSvgWithAssets(icon: AppAssets.free_med_delivery_icon, width: 58.h, height: 58.h),
                        SizedBox(width: 18.h),
                        Expanded(
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              "Free medicine delivery".needTranslation.toText18(color: AppColors.textColor, isBold: true),
                              "Offers free medicine delivery for the LiveCare appointment".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ],
                ).paddingSymmetrical(24.h, 0.h),
              ),
            ),
          ),
          Column(
            children: [
              CustomButton(
                text: "Yes please, I am in a hurry".needTranslation,
                onPressed: () {},
                backgroundColor: AppColors.primaryRedColor,
                borderColor: AppColors.primaryRedColor,
                textColor: AppColors.whiteColor,
                fontSize: 16,
                fontWeight: FontWeight.w500,
                borderRadius: 12,
                padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
                height: 50.h,
                icon: AppAssets.livecare_book_icon,
                iconColor: AppColors.whiteColor,
                iconSize: 18.h,
              ).paddingSymmetrical(24.h, 0.h),
              SizedBox(height: 16.h),
              CustomButton(
                text: "No, Thanks. I would like a physical visit".needTranslation,
                onPressed: () {
                  Navigator.of(context).pop();
                  Navigator.of(context).push(
                    FadePage(
                      page: SelectDoctorPage(),
                    ),
                  );
                },
                backgroundColor: AppColors.secondaryLightRedColor,
                borderColor: AppColors.secondaryLightRedColor,
                textColor: AppColors.primaryRedColor,
                fontSize: 16,
                fontWeight: FontWeight.w500,
                borderRadius: 12,
                padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
                height: 50.h,
              ).paddingSymmetrical(24.h, 0.h),
              SizedBox(height: 24.h),
            ],
          ),
        ],
      ),
    );
  }
}
