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/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/widgets/buttons/custom_button.dart';

import '../../../core/utils/utils.dart';
import '../../../theme/colors.dart';

class LargeServiceCard extends StatelessWidget {
  final String image;
  final String icon;
  final String title;
  final String subtitle;

  LargeServiceCard({
    super.key,
    this.image = "",
    this.icon = "",
    this.title = "",
    this.subtitle = "",
  });

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(horizontal: 3.h),
      child: Container(
        decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
          color: Colors.transparent,
          borderRadius: 16,
        ),
        child: Padding(
          padding: EdgeInsets.symmetric(horizontal: 8.h),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Image.asset(AppAssets.livecare_service, width: 220.h, height: 220.h, fit: BoxFit.contain),
              SizedBox(height: 3.h),
              Row(
                children: [
                  Utils.buildSvgWithAssets(icon: icon, width: 24.h, height: 24.h),
                  title.toText14(color: AppColors.blackColor, isBold: true),
                ],
              ),
              SizedBox(width: 220.h, child: subtitle.toText11(color: AppColors.blackColor)),
              SizedBox(height: 6.h),
              SizedBox(
                width: 220.h,
                child: CustomButton(
                  text: LocaleKeys.bookNow.tr(context: context),
                  onPressed: () {
                    // Navigator.of(context).pushReplacement(
                    //   MaterialPageRoute(builder: (BuildContext context) => LandingPage()),
                    // );
                  },
                  backgroundColor: AppColors.borderOnlyColor,
                  borderColor: AppColors.borderOnlyColor,
                  textColor: AppColors.whiteColor,
                  fontSize: 14,
                  fontWeight: FontWeight.bold,
                  borderRadius: 12,
                  padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
                  height: 40.h,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
