@props(['brand' => null]) @php // Brands have no colour of their own: a stable one is picked from the id so a brand always looks the same. $palette = [ 'bg-indigo-100 text-indigo-800 dark:bg-indigo-500/15 dark:text-indigo-300', 'bg-green-100 text-green-800 dark:bg-green-500/15 dark:text-green-300', 'bg-amber-100 text-amber-800 dark:bg-amber-500/15 dark:text-amber-300', 'bg-rose-100 text-rose-800 dark:bg-rose-500/15 dark:text-rose-300', 'bg-sky-100 text-sky-800 dark:bg-sky-500/15 dark:text-sky-300', ]; @endphp @if ($brand) class(['inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold whitespace-nowrap', $palette[$brand->id % count($palette)]]) }}>{{ $brand->name }} @else — @endif