{% extends "@ChillPerson/Person/layout.html.twig"  %}

{% set activeRouteKey = 'chill_calendar_calendar_new' %}

{% block title 'Calendar item creation' |trans %}

{% block content %}
<div class="calendar-new">

    <div id="calendar"></div> {# <=== vue component #}
    {% include '@ChillCalendar/Calendar/new.html.twig' with {'context': 'person'} %}

</div>
{% endblock %}

{% block js %}
    {{ parent() }}
    {{ encore_entry_script_tags('mod_pickentity_type') }}
    <script type="text/javascript">
        window.entity = {{ entity_json|json_encode|raw }};
        {% if app.user.currentLocation is not null %}window.default_location_id = {{ app.user.currentLocation.id }};{% endif %};
    </script>
    {{ encore_entry_script_tags('vue_calendar') }}
{% endblock %}

{% block css %}
    {{ parent() }}
    {{ encore_entry_link_tags('vue_calendar') }}
    {{ encore_entry_link_tags('mod_pickentity_type') }}
{% endblock %}

{% block block_post_menu %}
    <div id="calendarControls"></div>
{% endblock %}
