{{-- Destructive Button --}}
@props(['type' => 'button', 'size' => 'md', 'href' => null, 'loading' => false])
@php
$base = 'inline-flex cursor-pointer select-none items-center justify-center gap-2 font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-destructive focus:ring-offset-2 focus:ring-offset-background disabled:pointer-events-none disabled:opacity-60';
$sizeClass = match ($size) {
'sm' => 'rounded-md px-3 py-1.5 text-xs',
'lg' => 'rounded-xl px-6 py-3 text-base',
default => 'rounded-lg px-4 py-2 text-sm',
};
$tone = 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 active:bg-destructive/80';
$classes = trim("$base $sizeClass $tone");
@endphp
@if($href)
merge(['class' => $classes]) }}>{{ $slot }}
@else
@endif