<!-- htmx response template that writes a result message, and refreshes the calendar on successful request -->

{% if message %}
<div
    class="ri-response-box {% if error %}ri-response-box-error{% else %}ri-response-box-success{% endif %}"
>
    {{ message | e | replace('\n', '<br />') | safe }}
</div>
{% endif %}

{% if calendar_embed_url %}
<!-- This updates the calendar iframe OUTSIDE the target -->
<div id="calendar-wrapper" class="calendar-style" hx-swap-oob="true">
    <iframe
        src="{{ calendar_embed_url }}"
        class="calendar-invert"
        style="width: 100%; height: 100%;"
        frameborder="0"
    ></iframe>
</div>
{% endif %}
