@props([
  'href' => null,
  'disabled' => false,
  'variant' => 'default', // default | inset
])

@php
  $tag = ($href && ! $disabled) ? 'a' : 'button';
  $variants = [
    'default' => 'w-full px-4 py-3.5 flex items-center gap-3 text-left active:bg-muted/40 transition-colors',
    'inset' => 'w-full flex items-center gap-3 px-4 py-3.5 text-left active:bg-muted/40',
  ];
  $base = $variants[$variant] ?? $variants['default'];
  $attrs = $attributes->merge(['class' => $base]);
@endphp

@if ($tag === 'a')
  <a href="{{ $href }}" {{ $attrs }}>
    {{ $slot }}
  </a>
@else
  <button @disabled($disabled) {{ $attrs->merge(['type' => 'button']) }}>
    {{ $slot }}
  </button>
@endif

