{% set classes = [
  'follow-us',
] %}
{% set attributes = create_attribute() %}
{% set attributes = attributes.setAttribute('class', classes) %}

{% set dialog_options = {
  "classes": {
    "ui-dialog": "modal modal--ajax",
    "ui-dialog-titlebar-close": "modal__close",
    "ui-dialog-titlebar": "modal__titlebar",
    "ui-dialog-title": "modal__title",
    "ui-dialog-content": "modal__content",
  },
  "title": "Subscribe",
  "position": { my: null, at: null, of: window },
  "width": "var(--modal--width)",
} %}

<div{{ attributes }}>
  {% if follow_us_show_subscribe %}
      <div class="follow-us__subscribe">
      <a class="use-ajax"
        data-dialog-options="{{ dialog_options|json_encode() }}"
        data-dialog-type="modal"
        href="/form/signup?page={{ drupal_title() }}">Subscribe to get our latest articles delivered straight to your inbox!</a>
    </div>
  {% endif %}

  {% if follow_us_social_menu %}
    <div class="follow-us__social-menu">
      {{ follow_us_social_menu }}
    </div>
  {% endif %}
</div>
