{{-- Search Result Item Component A reusable result card for displaying search results, list items, etc. Supports different color schemes, icons, badges, and metadata. @props - href: string - Primary link URL - color: string - Color scheme (primary, warning, success, info) - default: primary - icon: string - Icon name for the left avatar - title: string - Main title text - external: bool - Show external link button - default: true - animationDelay: int - Animation delay in ms - default: 0 - compact: bool - Use compact layout - default: false @slots - default: Meta badges and additional content - subtitle: Subtitle text below title - actions: Custom action buttons @example --}} @props([ 'href' => '#', 'color' => 'primary', 'icon' => 'file', 'title' => '', 'external' => true, 'animationDelay' => 0, 'compact' => false, ]) @php $colorClasses = [ 'primary' => ['item' => 'search-item-primary', 'icon' => 'bg-primary-soft'], 'warning' => ['item' => 'search-item-warning', 'icon' => 'bg-warning-soft'], 'success' => ['item' => 'search-item-success', 'icon' => 'bg-success-soft'], 'info' => ['item' => 'search-item-info', 'icon' => 'bg-info-soft'], 'danger' => ['item' => 'search-item-danger', 'icon' => 'bg-danger-soft'], ]; $itemClass = $colorClasses[$color]['item'] ?? $colorClasses['primary']['item']; $iconClass = $colorClasses[$color]['icon'] ?? $colorClasses['primary']['icon']; @endphp
{!! e($title) !!} @if(isset($subtitle) && $subtitle->isNotEmpty()) {{ $subtitle }} @endif @if($slot->isNotEmpty())
{{ $slot }}
@endif
@if(isset($actions) && $actions->isNotEmpty()) {{ $actions }} @elseif($external) @endif