<div class="agenda block-margin-top--{{ $block->margin_type_top }} block-margin-bottom--{{$block->margin_type_bottom}}">
    @if ($block->anchor_id )
        <div id="{{ $block->anchor_id }}" class="anchor-offset"></div>
    @endif
    <div class="agenda__wrapper">
        <div class="agenda__container">
            <div class="agenda__title-container">
                @if($block->block_title)
                    <h2 class="agenda__title">@title($block->block_title)</h2>
                @endif
                <div class="agenda__button-container">
                    @if($block->block_subtitle)
                        <h3 class="agenda__subtitle">@title($block->block_subtitle)</h3>
                    @endif

                    @if($block->cta1)
                        <div class="agenda__cta-container">
                            {!! generateLink($block->cta1, 'std-button std-button--large std-button--orange icon-calendar') !!}
                        </div>
                    @endif
                </div>
            </div>

            <div class="agenda__container-items">
                @foreach($block->blockAgendaItems as $i => $item)
                    <div class="agenda__item">
                        <div class="agenda__info">
                            @if($item->time_label)
                                <h4 class="agenda__time">{{ $item->time_label }}</h4>
                            @endif
                            @if($item->title)
                                <h3 class="agenda__title-item">{{ $item->title }}</h3>
                            @endif
                            @if($item->content)
                                <div class="agenda__description">
                                    {!! $item->content !!}
                                </div>
                            @endif
                        </div>
                        @if($item->agendaSpeakers->count() > 0)
                            <div class="agenda__speakers-container">
                                @if($item->speakers_label)
                                    <h3 class="agenda__speakers-label">{{ $item->speakers_label }}</h3>
                                @endif
                                @if($item->agendaSpeakers)
                                    <div class="agenda__speakers">
                                        @foreach($item->agendaSpeakers as $i => $speakers)
                                            <div class="agenda__speakers-item">
                                                @if($speakers->image)
                                                    <div class="agenda__speakers-image">
                                                        <picture>
                                                            {!! getMediaImg($speakers->image, '120x120', htmlspecialchars($speakers->title)) !!}
                                                        </picture>
                                                    </div>
                                                @endif

                                                <div class="agenda__speakers-info">
                                                    @if($speakers->title)
                                                        <h3 class="agenda__speakers-name">{{ $speakers->title }}</h3>
                                                    @endif
                                                    @if($speakers->subtitle)
                                                        <span class="agenda__speakers-job">{{ $speakers->subtitle }}</span>
                                                    @endif
                                                </div>
                                            </div>
                                        @endforeach
                                    </div>
                                @endif
                            </div>
                        @endif
                    </div>
                @endforeach
            </div>
            <div class="agenda__item-footer">
                @if($block->block_subtitle)
                    <h3 class="agenda__subtitle">{{ $block->block_subtitle }}</h3>
                @endif

                @if($block->cta1)
                    <div class="agenda__cta-container">
                        {!! generateLink($block->cta1, 'std-button std-button--large alt-color icon-calendar') !!}
                    </div>
                @endif
            </div>
        </div>
    </div>
</div>
