@extends('layouts.app') @section('content')

Minhas aulas online

{{ $portalTitle }}

@forelse ($classes as $class) @php $now = now(); $isLive = $class->type === 'live' && $class->starts_at && $class->starts_at <= $now && (!$class->expires_at || $class->expires_at >= $now); $isExpired = $class->expires_at && $class->expires_at < $now; $statusLabel = $isLive ? 'Ao vivo agora' : ($isExpired ? 'Expirada' : 'Disponível'); $statusClass = $isLive ? 'bg-success-50 text-success-700' : ($isExpired ? 'bg-gray-100 text-gray-600' : 'bg-blue-light-50 text-blue-light-700'); @endphp

{{ $class->title }}

{{ $class->type === 'live' ? 'Live' : 'Gravada' }} · {{ $class->discipline?->name ?? 'Geral' }}

Início: {{ $class->starts_at?->format('d/m/Y H:i') ?? '-' }} · Expira: {{ $class->expires_at?->format('d/m/Y H:i') ?? '-' }}

@if ($class->description)

{{ $class->description }}

@endif
{{ $statusLabel }}
@empty
Nenhuma aula disponível no momento.
@endforelse
@endsection