@props([
'name' => 'check',
'variant' => 'outline',
])
@php
$map = [
'x' => 'x-mark',
'search' => 'magnifying-glass',
'info' => 'information-circle',
'warning' => 'exclamation-triangle',
'upload' => 'arrow-up-tray',
'dots' => 'ellipsis-horizontal',
'circle' => 'stop',
'prohibit' => 'empty',
'ban' => 'empty',
];
$icon = $map[$name] ?? $name;
$class = $attributes->get('class', '');
$hasSize = is_string($class) && preg_match('/(?:^|\s)size-/', $class);
@endphp
{{-- Color via currentColor: inherit parent (buttons → accent-foreground / white on base). --}}
@if ($icon === 'lab')
@elseif ($icon === 'github')
@elseif ($icon === 'empty')
@else
@php
$prefix = match ($variant) {
'solid' => 'heroicon-s-',
'mini' => 'heroicon-m-',
default => 'heroicon-o-',
};
$component = $prefix.$icon;
@endphp
class(['shrink-0', 'size-5' => ! $hasSize]) }}
aria-hidden="true"
/>
@endif