@props([ 'href' => null, 'variant' => 'default', 'size' => 'md', 'asChild' => false ]) @php $baseClasses = 'inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50'; $variantClasses = [ 'default' => 'bg-primary text-primary-foreground hover:bg-primary/90', 'primary' => 'bg-primary text-primary-foreground hover:bg-primary/90', 'secondary' => 'bg-secondary text-secondary-foreground hover:bg-secondary/90', 'outline' => 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', 'ghost' => 'hover:bg-accent hover:text-accent-foreground', 'link' => 'text-primary underline-offset-4 hover:underline', ]; $sizeClasses = [ 'sm' => 'rounded-md px-3 text-xs h-8', 'md' => 'rounded-md px-4 text-sm h-10', 'lg' => 'rounded-md px-6 text-base h-12', 'icon' => 'rounded-md w-10 h-10', ]; $classes = $baseClasses . ' ' . ($variantClasses[$variant] ?? $variantClasses['default']) . ' ' . ($sizeClasses[$size] ?? $sizeClasses['md']); @endphp @if($href) merge(['class' => $classes]) }}> {{ $slot }} @elseif($asChild) {{ $slot }} @else @endif