part of 'card.dart';


class _SignupConfirmationContent extends StatelessWidget {
  final String? email;
  final String description;
  final bool canResend;
  final String resendLabel;
  final bool isResending;
  final VoidCallback onResend;

  const _SignupConfirmationContent({
    required this.email,
    required this.description,
    required this.canResend,
    required this.resendLabel,
    required this.isResending,
    required this.onResend,
  });

  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);
    final colorScheme = theme.colorScheme;
    final locs = AppLocalizations.of(context)!;

    return Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Container(
          width: 48,
          height: 48,
          decoration: BoxDecoration(
            color: colorScheme.primary.withValues(alpha: 0.12),
            borderRadius: BorderRadius.circular(14),
          ),
          child: Icon(
            Icons.mark_email_read_outlined,
            color: colorScheme.primary,
          ),
        ),
        const VSpacer(),
        Text(
          locs.signupConfirmationTitle,
          textAlign: TextAlign.center,
          style: theme.textTheme.headlineSmall?.copyWith(
            fontWeight: FontWeight.w700,
          ),
        ),
        const VSpacer(),
        Text(
          description,
          textAlign: TextAlign.center,
          style: theme.textTheme.bodyMedium,
        ),
        if (email != null && email!.isNotEmpty) ...[
          const VSpacer(),
          _SignupConfirmationEmailBadge(email: email!),
        ],
        const VSpacer(multiplier: 1.5),
        Wrap(
          spacing: 12,
          runSpacing: 12,
          alignment: WrapAlignment.center,
          children: [
            ResendLink(
              label: resendLabel,
              onPressed: onResend,
              isDisabled: !canResend,
              isLoading: isResending,
            ),
          ],
        ),
      ],
    );
  }
}
