@props([ 'videos', 'title' => 'Videos', 'class' => 'mt-20 scroll-mt-28', ]) @php $videoCount = $videos ? count($videos) : 0; $rotations = ['rotate-1', '-rotate-[1.5deg]', 'rotate-[1.5deg]', '-rotate-1']; $videosData = $videos ? $videos->values()->map(function($v) { return [ 'id' => $v->id, 'caption' => $v->caption, 'embedUrl' => $v->getEmbedUrl(), 'autoplayUrl' => $v->getAutoplayEmbedUrl(), 'thumbnailUrl' => $v->getThumbnailUrl(), ]; }) : collect([]); @endphp @if ($videos && $videoCount > 0)

{{ $title }}

{{ $videoCount }}
@if ($videoCount > 1)
@endif
@foreach ($videos as $index => $video)
@if ($video->getThumbnailUrl()) {{ $video->caption ?: 'Video thumbnail ' . ($index + 1) }} @else
Video
@endif
@if ($video->caption)

{{ $video->caption }}

@endif
@endforeach
@endif