/**
 * Prepare DOM/session for theme app.js (vertical layout, twocolumn stub).
 */
(function () {
    'use strict';

    var layout = sessionStorage.getItem('data-layout');
    if (!layout || layout === 'twocolumn') {
        sessionStorage.setItem('data-layout', 'vertical');
        document.documentElement.setAttribute('data-layout', 'vertical');
    }

    if (!document.getElementById('two-column-menu')) {
        var menu = document.querySelector('.navbar-menu');
        if (menu) {
            var stub = document.createElement('div');
            stub.id = 'two-column-menu';
            stub.className = 'd-none';
            stub.setAttribute('aria-hidden', 'true');
            menu.appendChild(stub);
        }
    }
})();
