import React from 'react'; import { cn, commonClasses } from '@/lib/utils'; interface ButtonProps extends React.ButtonHTMLAttributes { variant?: 'primary' | 'discord' | 'auth' | 'secondary' | 'ghost' | 'outline'; size?: 'sm' | 'md' | 'lg'; fullWidth?: boolean; leftIcon?: React.ReactNode; rightIcon?: React.ReactNode; loading?: boolean; children: React.ReactNode; } // Factorisation des classes de taille et de variante const sizeClasses = { sm: 'px-4 py-2 text-sm', md: 'px-6 py-3 text-base', lg: 'px-8 py-4 text-lg', } as const; const variantClasses = { primary: 'bg-gradient-to-r from-blue-600 to-blue-500 text-white shadow-lg hover:shadow-xl hover:from-blue-700 hover:to-blue-600 border-2 border-blue-600/20', discord: 'bg-gradient-to-r from-indigo-600 to-purple-600 text-white shadow-lg hover:shadow-xl hover:from-indigo-700 hover:to-purple-700 border-2 border-indigo-600/20', auth: 'bg-gradient-to-r from-blue-500 to-blue-400 text-white shadow-lg hover:shadow-xl hover:from-blue-600 hover:to-blue-500 border-2 border-blue-500/20', secondary: 'bg-white text-blue-700 border-2 border-blue-600 shadow-md hover:shadow-lg hover:bg-blue-50', outline: 'bg-transparent text-gray-700 border-2 border-gray-300 hover:bg-gray-50 hover:border-gray-400', ghost: 'bg-transparent text-gray-700 hover:bg-gray-100', } as const; // Composant loading spinner réutilisable const LoadingSpinner = () => ( ); export const Button: React.FC = ({ variant = 'primary', size = 'md', fullWidth = false, leftIcon, rightIcon, loading = false, children, className = '', disabled, ...props }) => { const isDisabled = disabled || loading; return ( ); };