import 'package:english_learning/core/utils/styles/theme.dart';
import 'package:english_learning/core/widgets/global_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class ForgotPasswordVerification extends StatelessWidget {
  final VoidCallback onSubmit;

  const ForgotPasswordVerification({
    super.key,
    required this.onSubmit,
  });

  @override
  Widget build(BuildContext context) {
    return Dialog(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(20),
      ),
      child: Container(
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(20),
        ),
        child: Padding(
          padding: const EdgeInsets.all(24.0),
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              RichText(
                textAlign: TextAlign.center,
                text: TextSpan(
                  children: [
                    TextSpan(
                      text: 'Check Your',
                      style: AppTextStyles.blackTextStyle.copyWith(
                        fontSize: 16,
                        fontWeight: FontWeight.w900,
                      ),
                    ),
                    TextSpan(
                      text: ' Email',
                      style: AppTextStyles.blueTextStyle.copyWith(
                        fontSize: 16,
                        fontWeight: FontWeight.w900,
                      ),
                    ),
                    TextSpan(
                      text: '!',
                      style: AppTextStyles.blackTextStyle.copyWith(
                        fontSize: 16,
                        fontWeight: FontWeight.w900,
                      ),
                    ),
                  ],
                ),
              ),
              const SizedBox(height: 16),
              SvgPicture.asset(
                'lib/features/auth/assets/images/forgot_password_illustration.svg',
                width: 160,
              ),
              const SizedBox(height: 16),
              Text(
                'We\'ve sent a link to your email to help you reset your password. Please check your inbox to continue..',
                textAlign: TextAlign.center,
                style: AppTextStyles.disableTextStyle.copyWith(
                  fontSize: 12,
                  fontWeight: FontWeight.w500,
                ),
              ),
              const SizedBox(height: 24),
              GlobalButton(
                text: 'Okay',
                onPressed: onSubmit,
              )
            ],
          ),
        ),
      ),
    );
  }
}
