{#
/**
 * Dismissible
 *
 * Dismissibles create a behavior for the content being displayed that allows
 * users to click a close button and hide the content within.
 *
 * The dismissible component will initially be used for "pushdown" banner
 * announcements on the homepage. The implementation, however, has been
 * generalized so that any content can be added to a dismissible component, and
 * hidden by the user from the page.
 *
 * A simple javascript enhancement is available that will store the dismissal
 * state of any given content between page loads and browser sessions.
 *
 * @var string $content The content within the dismissible. It is markup agnostic. The close button will appear over the top right corner.
 * @var Drupal\Core\Template\Attribute|array $attributes Attributes (class, data, etc.) for the dismissible.
 */
#}
{% set content_digest = union_digest(content) %}
{% set attributes = union_attributes(attributes|default([])) %}
<div{{ attributes.addClass('cu-dismissible').setAttribute('data-cu-digest', content_digest) }}>
  <input id="cu-dismissible--{{ content_digest }}" class="cu-dismissible__input" type="checkbox" />
  <label for="cu-dismissible--{{ content_digest }}" class="cu-dismissible__close" aria-label="Close">✕</label>
  <div class="cu-dismissible__content">{{ content }}</div>
</div>
