import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';

import '../../generated/locale_keys.g.dart';

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: AppColors.bgScaffoldColor,
      body: Column(
        children: [
          Expanded(
            child: CollapsingListView(
              title: LocaleKeys.generalConsent.tr(context: context),
              child: Padding(
                padding: const EdgeInsets.all(24.0),
                child: Container(
                  decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
                    color: AppColors.whiteColor,
                    borderRadius: 24.r,
                    hasShadow: false,
                  ),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      LocaleKeys.generalConsent1.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.hospitalRules.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent2.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.communicationConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent3.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.releaseConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent4.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 8.h),
                      LocaleKeys.generalConsent5.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.valuables.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent6.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.financialConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent7.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.dataSharingConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent8.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.permissionLeaveConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent9.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.observeConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent10.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.noGuaranteeConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent11.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.disputeConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent12.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.patientsRightsConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent13.tr(context: context).toText14(weight: FontWeight.w500),
                      SizedBox(height: 16.h),
                      LocaleKeys.acknowledgementConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent14.tr(context: context).toText14(weight: FontWeight.w500),

                      SizedBox(height: 16.h),
                      LocaleKeys.acknowledgementConsent.tr(context: context).toText16(isBold: true),
                      SizedBox(height: 16.h),
                      LocaleKeys.generalConsent14.tr(context: context).toText14(weight: FontWeight.w500),
                    ],
                  ).paddingSymmetrical(16.h, 16.h),
                ),
              ),
            ),
          ),
          Container(
            decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
              color: AppColors.whiteColor,
              borderRadius: 24.r,
              hasShadow: false,
            ),
            child: Padding(
              padding: EdgeInsets.all(24.h),
              child: Row(
                children: [
                  Expanded(
                    child: CustomButton(
                      text: LocaleKeys.rejectView.tr(),
                      onPressed: () {},
                      backgroundColor: AppColors.secondaryLightRedColor,
                      borderColor: AppColors.secondaryLightRedColor,
                      textColor: AppColors.primaryRedColor,
                      fontSize: 14.f,
                      isBold: true,
                      borderRadius: 12.r,
                      height: 46.h,
                      iconColor: AppColors.primaryRedColor,
                      iconSize: 16.h,
                    ),
                  ),
                  SizedBox(width: 16.h),
                  Expanded(
                    child: CustomButton(
                      text: LocaleKeys.acceptLbl.tr(),
                      onPressed: () {},
                      backgroundColor: AppColors.successColor,
                      borderColor: AppColors.successColor,
                      textColor: AppColors.textColor,
                      fontSize: 14.f,
                      isBold: true,
                      borderRadius: 12.r,
                      height: 46.h,
                      iconColor: AppColors.whiteColor,
                      iconSize: 16.h,
                    ),
                  ),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
