@php use App\Support\SymbolPresentation; $baseIc = SymbolPresentation::baseIconPair($symbol); $quoteIc = SymbolPresentation::quoteIconPair($symbol); $pair = SymbolPresentation::pairLabel($symbol); $price = (float) ($symbol->latestPrice?->price ?? 0); $rawChg = $symbol->latestPrice?->change_24h_pct; $chg = $rawChg !== null ? (float) $rawChg : null; $hasQuote = ! empty($symbol->quote_currency); $showSubtitle = $pair !== (string) ($symbol->name ?? '') && $symbol->name; @endphp
@php $baseIsImg = str_starts_with($baseIc[0], 'img:'); @endphp
@if($baseIsImg) @php $baseImgUrl = substr($baseIc[0], 4); @endphp @elseif($baseIc[0] !== '') @else {{ SymbolPresentation::monogramLetters($symbol, false) }} @endif
@if($hasQuote)
@if(str_starts_with($quoteIc[0], 'img:')) @php $quoteImgUrl = substr($quoteIc[0], 4); @endphp @elseif($quoteIc[0] !== '') @else {{ SymbolPresentation::monogramLetters($symbol, true) }} @endif
@endif
{{ $pair }}
@if($showSubtitle)
{{ $symbol->name }}
@endif
{{ $price > 0 ? number_format($price, $symbol->decimal_places) : '—' }}
{{ SymbolPresentation::formatChange24h($chg) }}