part of 'card.dart';


class _SignupConfirmationResendButton extends StatelessWidget {
  final bool canResend;
  final bool isResending;
  final String resendLabel;
  final VoidCallback onResend;

  const _SignupConfirmationResendButton({
    required this.canResend,
    required this.isResending,
    required this.resendLabel,
    required this.onResend,
  });

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

    return ElevatedButton.icon(
      onPressed: canResend ? onResend : null,
      icon: isResending
          ? SizedBox(
              width: 16,
              height: 16,
              child: CircularProgressIndicator(
                strokeWidth: 2,
                color: theme.colorScheme.onPrimary,
              ),
            )
          : const Icon(Icons.mark_email_read_outlined),
      label: Text(resendLabel),
    );
  }
}
