import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:kasy_kit/components/components.dart';
import 'package:kasy_kit/core/theme/theme.dart';
import 'package:kasy_kit/i18n/translations.g.dart';

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

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        children: [
          const Spacer(),
          Icon(
            KasyIcons.checkCircle,
            color: context.colors.success,
            size: 64,
          ),
          const SizedBox(height: KasySpacing.md),
          Text(
            t.recover_password_result.title,
            style: context.textTheme.headlineMedium!.copyWith(
              color: context.colors.success,
            ),
          ),
          const SizedBox(height: KasySpacing.md),
          Padding(
            padding: const EdgeInsets.symmetric(horizontal: KasySpacing.pageHorizontalGutter),
            child: Text(
              t.recover_password_result.description,
              textAlign: TextAlign.center,
              style: context.textTheme.titleMedium!.copyWith(
                color: context.colors.onBackground,
              ),
            ),
          ),
          const SizedBox(height: KasySpacing.md),
          KasyButton(
            label: t.recover_password_result.back_to_signin,
            onPressed: () => context.pop(),
          ),
          const Spacer(),
          Padding(
            padding: const EdgeInsets.symmetric(
              horizontal: KasySpacing.pageHorizontalGutter,
              vertical: KasySpacing.lg,
            ),
            child: Text(
              t.recover_password_result.note,
              textAlign: TextAlign.center,
              style: context.textTheme.titleMedium!.copyWith(
                color: context.colors.muted,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
