@php
  $status = $ticketStatus ?? null;
  $number = $ticketNumber ?? null;
  $destination = $destination ?? null;
  $staffDisplayName = $staffDisplayName ?? null;
  $showAssignment = ($showAssignment ?? true) && ($destination || $staffDisplayName);
  $prominent = $prominent ?? false;
@endphp
@if ($number)
  <div class="min-w-0">
    <div class="flex flex-wrap items-center gap-2">
      <span @class([
        'inline-flex items-center justify-center rounded-lg font-mono font-bold tracking-wide',
        'h-9 min-w-[3.25rem] bg-indigo-600 px-2.5 text-base text-white shadow-sm' => $prominent,
        'h-7 min-w-[2.75rem] bg-sky-100 px-2 text-xs text-sky-800' => ! $prominent,
      ])>{{ $number }}</span>
      @if ($status)
        <span @class([
          'rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide',
          'bg-amber-100 text-amber-800' => $status === 'waiting',
          'bg-indigo-100 text-indigo-800' => $status === 'called',
          'bg-emerald-100 text-emerald-800' => $status === 'serving',
          'bg-slate-100 text-slate-600' => ! in_array($status, ['waiting', 'called', 'serving'], true),
        ])>{{ $status }}</span>
      @endif
    </div>
    @if ($showAssignment)
      <p class="mt-1 truncate text-xs text-slate-500">
        @if ($destination)<span class="font-medium text-slate-600">{{ $destination }}</span>@endif
        @if ($destination && $staffDisplayName)<span class="text-slate-300"> · </span>@endif
        @if ($staffDisplayName){{ $staffDisplayName }}@endif
      </p>
    @endif
  </div>
@endif
