{% extends "@ChillMain/layout.html.twig" %}

{% set activeRouteKey = 'chill_calendar_invitations_list' %}

{% block title %}{{ 'invite.list.title'|trans }}{% endblock title %}

{% block content %}

    <h1>{{ 'invite.list.title'|trans }}</h1>

    {% if invitations|length == 0 %}
        <p class="chill-no-data-statement">
            {{ "invite.list.none"|trans }}
        </p>
    {% else %}
        <div class="flex-table list-records">
            {% for invitation in invitations %}
                {% set calendar = invitation.getCalendar %}
                {{ include('@ChillCalendar/Calendar/_list.html.twig', {context: 'user'}) }}
            {% endfor %}
        </div>

        {% if invitations|length < paginator.getTotalItems %}
            {{ chill_pagination(paginator) }}
        {% endif %}
    {% endif %}

{% endblock %}

{% block js %}
    {{ parent() }}
    {{ encore_entry_script_tags('mod_answer') }}
    {{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock %}

{% block css %}
    {{ parent() }}
    {{ encore_entry_link_tags('mod_answer') }}
    {{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock %}
