!((document, Drupal) => {
  'use strict';

  Drupal.behaviors.drupalVueCollapsible = {
    attach: function(context) {

      const collapsibles = context.querySelectorAll('.collapsible-non-vue');

      collapsibles.forEach((collapsible) => {
        collapsible.querySelector('.title').addEventListener('click', function(e) {
          e.preventDefault();
          this.parentElement.classList.toggle('closed');
        });
      });
    }
  };

})(document, Drupal);
