@php
    $chapters = $course->chapters()->pluck('id');
    $lastLesson = App\Models\WebinarChapterItem::whereIn('chapter_id', $chapters)->latest()->first();
@endphp
<div class="cp-sidebar-specs">
    <h3 class="cp-sidebar-specs__title">{{ trans('webinars.landing_sidebar_includes') }}</h3>
    <ul class="cp-sidebar-specs__list">
        <li>
            <i data-feather="clock" width="18" height="18" aria-hidden="true"></i>
            <span>{{ trans('public.duration') }}: {{ convertMinutesToHourAndMinute(!empty($course->duration) ? $course->duration : 0) }} {{ trans('home.hours') }} / {{ $lessonCount }} {{ trans('webinars.landing_lesson_label') }}</span>
        </li>
        @if($lastLesson)
            <li>
                <i data-feather="calendar" width="18" height="18" aria-hidden="true"></i>
                <span>{{ trans('webinars.landing_last_update') }}: {{ dateTimeFormat($lastLesson->created_at, 'j M Y') }}</span>
            </li>
        @endif
        <li>
            <i data-feather="award" width="18" height="18" aria-hidden="true"></i>
            <span>{{ trans('webinars.landing_certificate_line') }}</span>
        </li>
    </ul>
</div>
