(function () {
  'use strict';

  document.addEventListener('click', function (event) {
    var menuButton = event.target.closest('[data-mobile-menu-toggle]');
    if (!menuButton) {
      return;
    }

    var sidebarToggle = document.getElementById('sidebarToggleLeft') || document.getElementById('sidebarToggleTop');
    if (sidebarToggle) {
      sidebarToggle.click();
    }
  });
})();
