{{-- ══════════════════════════════════════════════════════════════════════ VS MINI — the arena intro card rendered INSIDE a video-card thumbnail. No countdown / no skip button; identical layout to the full-page VS intro (fixed 1920×1080 stage, transform-scaled to fit the thumb). Behavior: - Sits at z-index 1 (above the still image, BELOW the hover video which uses z-index 2 + .active { opacity: 1 }). - On mouseleave from the thumb, animations restart so the intro plays again the next time the user's mouse is off the card. ════════════════════════════════════════════════════════════════════════ --}} @php $vsm_hd = $video->sportsMatch?->headerData(); $vsm_red = $vsm_hd['red'] ?? null; $vsm_blue = $vsm_hd['blue'] ?? null; $vsm_show = $vsm_hd && (($vsm_red['name'] ?? null) || ($vsm_blue['name'] ?? null)); @endphp @if ($vsm_show) @php $vsm_flag = fn(?string $c) => (($c = strtolower(trim((string) $c))) !== '' ? $c : 'xx'); $vsm_cname = fn (?string $c) => \App\Data\Countries::name($c); $vsm_img = fn(?string $p) => $p ? route('media.thumbnail', $p) : null; $vsm_str = fn ($x) => (is_string($x) && trim($x) !== '') ? trim($x) : ''; // Every placeholder from the design is always in the DOM; empty ones // are hidden by `.vsm-nullable:empty` / `.vsm-nullable-hide` in the // CSS below. Same treatment as the full-page VS. $vsm_event = $vsm_str($vsm_hd['championship'] ?? ''); $vsm_stage = $vsm_str($vsm_hd['stage'] ?? ''); $vsm_weight = $vsm_str($vsm_hd['weight_category'] ?? ''); $vsm_matchNo = $vsm_str($vsm_hd['match_number'] ?? ''); $vsm_court = $vsm_str($vsm_hd['court'] ?? ''); $vsm_ref = $vsm_str($vsm_hd['referee']['name'] ?? ''); // Per-fighter chips (Record / Rank / Stats) — fields aren't in // headerData() today, so fall back to raw participants JSON. $vsm_parts = $video->sportsMatch?->participants ?? []; $vsm_redRecord = $vsm_str($vsm_parts['p2_record'] ?? ''); $vsm_redRank = $vsm_str($vsm_parts['p2_rank'] ?? ''); $vsm_redStats = $vsm_str($vsm_parts['p2_stats'] ?? ''); $vsm_blueRecord = $vsm_str($vsm_parts['p1_record'] ?? ''); $vsm_blueRank = $vsm_str($vsm_parts['p1_rank'] ?? ''); $vsm_blueStats = $vsm_str($vsm_parts['p1_stats'] ?? ''); $vsm_redName = $vsm_str($vsm_red['name'] ?? ''); $vsm_blueName = $vsm_str($vsm_blue['name'] ?? ''); $vsm_redClub = $vsm_str($vsm_red['club'] ?? ''); $vsm_blueClub = $vsm_str($vsm_blue['club'] ?? ''); $vsm_redFlag = $vsm_str($vsm_red['flag'] ?? ''); $vsm_blueFlag = $vsm_str($vsm_blue['flag'] ?? ''); $vsm_redLogo = $vsm_img($vsm_red['club_logo'] ?? null); $vsm_blueLogo = $vsm_img($vsm_blue['club_logo'] ?? null); @endphp
{{-- RED panel --}}
{{-- BLUE panel --}}
{{-- RED identity (left) — every placeholder always in DOM ── --}}
AKA · RED
{{ $vsm_redFlag !== '' ? strtoupper($vsm_cname($vsm_redFlag) ?? $vsm_redFlag) : '' }}
{{ $vsm_redName }}
{{ $vsm_redClub }}
{{ $vsm_redRecord }}
{{ $vsm_redRank }}
{{ $vsm_redStats }}
{{-- BLUE identity (right) ── --}}
AO · BLUE
{{ $vsm_blueFlag !== '' ? strtoupper($vsm_cname($vsm_blueFlag) ?? $vsm_blueFlag) : '' }}
{{ $vsm_blueName }}
{{ $vsm_blueClub }}
{{ $vsm_blueRecord }}
{{ $vsm_blueRank }}
{{ $vsm_blueStats }}
{{-- Top: event + stage + weight (all in DOM) --}}
{{ $vsm_event }}
{{ $vsm_stage }}
{{ $vsm_weight }}
{{-- Center VS --}}
VS
{{-- .vs-mini-flash removed — the intro's full-thumb white flash at t=1.5s was firing on every mouseleave-triggered replay, which read as strobing on the left edge of the card. --}} {{-- Bottom chips — Match / Court / Referee always in DOM; each hides via data-vsm-empty and the flanking diamonds collapse via :has(). --}}
Match{{ $vsm_matchNo }}
Court{{ $vsm_court }}
Referee{{ $vsm_ref }}
@endif @once @endonce