import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';

/// A specialized button for social authentication integration.
///
/// This widget wraps [UiButton.secondary] to provide a consistent look and feel
/// for social sign-in/sign-up buttons (e.g., Google, Apple).
class AuthSocialButton extends StatelessWidget {
  /// The localizable text to display on the button (e.g., "Continue with Google").
  final String text;

  /// The icon representing the social provider.
  final IconData icon;

  /// Callback to execute when the button is tapped.
  final VoidCallback onPressed;

  /// Creates an [AuthSocialButton].
  ///
  /// The [text], [icon], and [onPressed] arguments must not be null.
  const AuthSocialButton({
    super.key,
    required this.text,
    required this.icon,
    required this.onPressed,
  });

  @override
  Widget build(BuildContext context) {
    return UiButton.secondary(
      onPressed: onPressed,
      leadingIcon: icon,
      text: text,
      // Ensure the button spans the full width available
      size: UiButtonSize.large,
    );
  }
}
