@props([
'label' => '',
'class' => '',
'iconClass' => 'h-4 w-4',
/** When null and no brand match: show monogram (React BrandAvatar parity). */
'fallbackLucide' => null,
'fallbackEmoji' => null,
'title' => null,
])
@php
$b = \App\Support\BrandResolver::resolve($label);
$t = $title ?? $label;
$smartEmoji = ($fallbackEmoji === null || $fallbackEmoji === '') && ! filled($fallbackLucide)
? \App\Support\LabelIntentIcon::emoji($label)
: null;
@endphp
@if ($b && $b['kind'] === 'svg')
@elseif ($b && $b['kind'] === 'mono')
{{ $b['text'] }}
@elseif ($fallbackEmoji)
{{ $fallbackEmoji }}
@elseif (filled($fallbackLucide))
@elseif ($smartEmoji)
{{ $smartEmoji }}
@else
{{ \App\Support\BrandResolver::monogram($label) }}
@endif