@props(['type' => 'button', 'variant' => 'primary', 'size' => null, 'href' => null])
@php
    $variants = [
        'primary' => 'btn-primary',
        'accent' => 'btn-accent',
        'outline' => 'btn-outline',
        'outline-light' => 'btn-outline-light',
        'ghost' => 'btn-ghost',
    ];
    $sizes = [
        'sm' => 'btn-sm',
        'lg' => 'btn-lg',
    ];
    $classes = 'btn '.($variants[$variant] ?? $variants['primary']).' '.($sizes[$size] ?? '');
@endphp

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