@props(['variant' => 'primary', 'as' => 'button'])
@php
$base = 'inline-flex items-center justify-center rounded-lg px-4 py-2 text-sm font-medium transition focus:outline-none focus:ring-2 focus:ring-brand/20';
$classes = [
'primary' => 'bg-brand text-white hover:bg-brand/90',
'secondary' => 'border border-gray-300 bg-white text-gray-700 hover:bg-gray-50',
'danger' => 'bg-red-600 text-white hover:bg-red-700',
][$variant] ?? 'bg-brand text-white hover:bg-brand/90';
@endphp
@if($as === 'a')
merge(['class' => $base.' '.$classes]) }}>{{ $slot }}
@else
@endif