@props(['href', 'variant' => 'primary', 'size' => 'md'])
@php
$baseClasses = 'inline-flex items-center justify-center font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors duration-200';
$variants = [
'primary' => 'bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500',
'secondary' => 'bg-gray-600 hover:bg-gray-700 text-white focus:ring-gray-500',
'success' => 'bg-green-600 hover:bg-green-700 text-white focus:ring-green-500',
'danger' => 'bg-red-600 hover:bg-red-700 text-white focus:ring-red-500',
'outline' => 'border border-gray-300 bg-white hover:bg-gray-50 text-gray-700 focus:ring-blue-500',
'ghost' => 'text-blue-600 hover:bg-blue-50 focus:ring-blue-500',
];
$sizes = [
'sm' => 'px-3 py-1.5 text-sm',
'md' => 'px-4 py-2 text-sm',
'lg' => 'px-6 py-3 text-base',
];
$classes = $baseClasses . ' ' . $variants[$variant] . ' ' . $sizes[$size];
@endphp
@if(isset($href))
merge(['class' => $classes]) }}>
{{ $slot }}
@else
@endif