import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:krow/core/presentation/styles/kw_text_styles.dart';
import 'package:krow/core/presentation/styles/theme.dart';

class WaitingEmailLinkForm extends StatelessWidget {
  final String email;

  const WaitingEmailLinkForm({super.key, required this.email});

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        const Gap(36),
        const Text(
          'Check Your Email',
          style: AppTextStyles.headingH1,
        ),
        const Gap(8),
        RichText(
          text: TextSpan(
            text: 'We\'ve sent a password reset link to ',
            style: AppTextStyles.bodyMediumReg
                .copyWith(color: AppColors.blackGray),
            children: [
              TextSpan(
                text: email,
                style: AppTextStyles.bodyMediumMed,
              ),
              TextSpan(
                text:
                    '. Please check your inbox and follow the instructions to reset your password',
                style: AppTextStyles.bodyMediumReg
                    .copyWith(color: AppColors.blackGray),
              ),
            ],
          ),
        ),
        Center(
          child: Padding(
            padding: EdgeInsets.only(
                //на око
                top: (MediaQuery.of(context).size.height - 520) / 2), //на око
            child: RichText(
              textAlign: TextAlign.center,
              text: TextSpan(
                text: 'Didn\'t receive the email?\n',
                style: AppTextStyles.bodyMediumReg
                    .copyWith(color: AppColors.blackGray),
                children: [
                  TextSpan(
                    text: 'Resend',
                    style: AppTextStyles.bodyMediumSmb
                        .copyWith(color: AppColors.primaryBlue),
                    recognizer: TapGestureRecognizer()..onTap = () {},
                  ),
                  TextSpan(
                    text: ' or ',
                    style: AppTextStyles.bodyMediumReg
                        .copyWith(color: AppColors.blackGray),
                  ),
                  TextSpan(
                    text: 'Contact Support',
                    style: AppTextStyles.bodyMediumSmb
                        .copyWith(color: AppColors.primaryBlue),
                    recognizer: TapGestureRecognizer()..onTap = () {},
                  ),
                ],
              ),
            ),
          ),
        ),
      ],
    );
  }
}
