{#
/**
 * @file
 * Theme override to display a region.
 *
 * Available variables:
 * - content: The content for this region, typically blocks.
 * - attributes: HTML attributes for the region <div>.
 * - region: The name of the region variable as defined in the theme's
 *   .info.yml file.
 *
 * @see template_preprocess_region()
 */
#}

{%
  set classes = [
    'lgd-region',
    'lgd-region--' ~ region|clean_class,
    'region',
    'region-' ~ region|clean_class,
  ]
%}

{{ attach_library('localgov_microsites_base/off-canvas') }}

{% if content %}
  <div{{ attributes.addClass(classes) }}>
    <button class="off-canvas__close">{{'Close'|t}}<span class="visually-hidden">{{ ' off-canvas region '|t }}</span>
    {% include "@localgov_base/includes/icons/icon.html.twig" with {
        icon_name: 'plus',
        icon_classes: 'off-canvas__close--icon',
      }
    %}
    </button>
    <div class="lgd-region__inner lgd-region__inner--{{ region|clean_class }}">
      {{ content }}
    </div>

  </div>
{% endif %}
