{#
/**
 * @author
 * Altcom Ltd — 2025
 * @file
 * TOC Master theme views-view--service-alterations-date-range--block.html.twig
 *
 * Requires altcom/service_alterations_frontend_views: ^1.3
 *
 * Available variables:
 * - attributes: Remaining HTML attributes for the element.
 * - css_name: A CSS-safe version of the view name.
 * - css_class: The user-specified classes names, if any.
 * - header: The optional header.
 * - footer: The optional footer.
 * - rows: The results of the view query, if any.
 * - empty: The content to display if there are no rows.
 * - pager: The optional pager next/prev links to display.
 * - exposed: Exposed widget form/info to display.
 * - feed_icons: Optional feed icons to display.
 * - more: An optional link to the next page of results.
 * - title: Title of the view, only used when displaying in the admin preview.
 * - title_prefix: Additional output populated by modules, intended to be
 *   displayed in front of the view title.
 * - title_suffix: Additional output populated by modules, intended to be
 *   displayed after the view title.
 * - attachment_before: An optional attachment view to be displayed before the
 *   view content.
 * - attachment_after: An optional attachment view to be displayed after the
 *   view content.
 * - dom_id: Unique id for every view being printed to give unique class for
 *   JavaScript.
 * - items: Processed alterations - duplicates removed.
 * - calendar_start_datetime: First day of the month, either current or passed through in the query parameter.
 * - calendar_end_datetime: First day of the month, either current or passed through in the query parameter.
 * - prev_show: Flag to indicate whether to show previous link.
 * - prev_text: Text to use for previous button.
 * - prev_from_datetime: First day of the preceeding month, based on calendar_start_datetime.
 * - prev_to_datetime: Last day of the preceeding month, based on calendar_start_datetime.
 * - next_show: Flag to indicate whether to show next link.
 * - next_text: Text to use for next button.
 * - next_from_datetime: First day of the next month, based on calendar_start_datetime.
 * - next_to_datetime: Last day of the next month, based on calendar_start_datetime.
 * - btn_prev_class: Override the classes applied to the previous button.
 * - btn_next_class: Override the classes applied to the next button.
 * - prev_icon: Override the fa icon applied to the previous button.
 * - next_icon: Override the fa icon applied to the next button.
 *
 * @ingroup themeable
 */
#}
{% extends "@core/views/_views-view-nowrapper.html.twig" %}
{% block view_rows %}
  {% include '@organisms/tm-sa/sa-calendar/calendar.twig' with {
    'alterations': items,
    'calendar_start': calendar_start_datetime|date('Y-m-d'),
    'calendar_end': calendar_end_datetime|date('Y-m-d'),
    'prev_show': prev_show,
    'prev_text': prev_text|default('Previous'),
    'prev_from': prev_from_datetime|date('Y-m-d'),
    'prev_to': prev_to_datetime|date('Y-m-d'),
    'next_show': next_show,
    'next_text': next_text|default('Next'),
    'next_from': next_from_datetime|date('Y-m-d'),
    'next_to': next_to_datetime|date('Y-m-d'),
    'btn_prev_class': btn_prev_class,
    'btn_next_class': btn_next_class,
    'prev_icon': prev_icon,
    'next_icon': next_icon,
    'use_ajax': true,
  } only %}
{% endblock %}
