<div class="flex flex-col relative w-full max-w-6xl">

    @if ($content->header || $content->body || $content->show_profiles)
        <div class="md:grid md:grid-cols-3 print:grid">

            <div class="col-start-2 col-span-2 row-start-1 flex justify-center livestream-list-container">

                <div class="w-full">
                    <div class="text-block px-8">

                        @if ($content->header)
                            <h{{ $header ? '1' : '2'}}>{{ $content->header }}</h{{ $header ? '1': '2' }}>
                        @endif

                        @if ($content->body)
                            <div class="body content-text">
                                {!! $content->body !!}
                            </div>
                        @endif

                        @if ($content->layout !== 'inline')
                            <course-list :course-list='@json($content)'></course-list>
                        @endif

                    </div>
                </div>

            </div>

            <div class="col-start-1 row-start-1">
                @if ($content->show_profiles)
                    <div class="mt-8 md:mt-0 grid place-items-center h-full">
                        @include ('staff-profiles.inline', ['staff_profiles' => $content->staff_profiles, 'title' => $content->profiles_title])
                    </div>
                @endif
            </div>

        </div>
    @endif

    @if ($content->layout === 'inline')
        @if ($content->courses?->count())

            @foreach ($content->courses as $course)

                @if ($course->course_description)

                    @if ($course->external_content)
                        <div class="">
                            @include ('content', ['content' => $course->external_content, 'header' => false ])
                        </div>
                    @endif

                @endif

            @endforeach

        @endif
    @endif

    @if ($content->show_profiles)
        @foreach ($content->staff_profiles as $staff_profile)
            <expander uuid="staff-profile-{{ $staff_profile->id }}" :filter="false" :preview="{{ request('preview') ? 'true' : 'false' }}" :modal="true" max-width="max-w-prose" anchor="{{ $staff_profile->anchor }}">
                <staff-profile :staff-profile='@json($staff_profile)'></staff-profile>
            </expander>
        @endforeach
    @endif

</div>
