{{-- Video Type Icon (using Bootstrap Icons like video-card.blade.php) --}} @php $typeIcon = match($video->type) { 'music' => 'bi-music-note', 'match' => 'bi-trophy', default => 'bi-film', }; @endphp {{-- Video Title with Type Icon Inline --}}

{{ $video->title }}

{{-- Channel Row with Actions Inline --}}
{{-- Left: Channel Info --}}
@if($video->user) {{ $video->user->name }} @else
@endif
{{ $video->user->name ?? 'Unknown' }}
{{ number_format($video->user->subscriber_count ?? 0) }} subscribers
{{-- Subscribe Button --}} @auth @if(Auth::id() !== $video->user_id) @endif @else @endauth
{{-- Right: Action Buttons (Like, Edit, Share) --}}
@auth {{-- Like Button with Icon and Count --}}
@csrf
{{-- Edit Button - Only for video owner --}} @if(Auth::id() === $video->user_id) @endif @else Like @endauth {{-- Share Button --}} @if($video->isShareable()) @endif
{{-- Description Box (Expandable) --}} @if($video->description) @php // Parse markdown description $fullDescription = $video->description; $shortDescription = Str::limit($fullDescription, 200); $needsExpand = strlen($fullDescription) > 200; @endphp
{{-- Fixed Stats Row (views + date - cannot be manipulated) --}}
{{ number_format($video->view_count) }} views {{ $video->created_at->format('M d, Y') }}
{{-- Separator Line --}}
{{-- Description Content --}}
@if($needsExpand)
{!! Str::markdown($shortDescription) !!} ...
@else {!! Str::markdown($fullDescription) !!} @endif
@endif {{-- Comment Section --}}

Comments ({{ $video->comment_count }})

{{-- Comment Form --}} @auth
{{ Auth::user()->name }}
@else
Sign in to comment
@endauth {{-- Comments List --}}
@forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) @include('videos.partials.comment', ['comment' => $comment]) @empty

No comments yet. Be the first to comment!

@endforelse