{% from 'events/display/indico/_common.html' import render_location %}
{% from 'events/timetable/display/indico/_common.html' import render_description, render_time %}

{% macro render_break(item, event, theme_settings, theme_context, parent=none, timezone=none,
                      show_notes=true, hide_end_time=false, nested=false, show_location=false) %}
    <li class="timetable-item timetable-break">
        <span class="timetable-time break {{ 'nested' if nested else 'top-level' }}">
            {{ render_time(item, timezone=timezone, hide_end_time=hide_end_time) }}
        </span>

        <div class="timetable-item-body flexcol">
            <div class="timetable-item-header flexrow">
                <span class="timetable-title {{ 'top-level' if not nested }} break">
                    {{- item.title -}}
                </span>
                {% if item.duration and not theme_settings.hide_duration -%}
                    <span class="icon-time timetable-duration">
                        {{ item.duration | format_human_timedelta(narrow=true) }}
                    </span>
                {%- endif %}

                {% if item.has_location_info and show_location -%}
                    {{ render_location(item, parent=parent) }}
                {%- endif %}

            </div>
            {% if item.description %}
                {{ render_description(item, class='break-description') }}
            {% endif %}
        </div>
    </li>
{% endmacro %}
