// import {MenuAim} from 'es6-menu-aim';
//
// (function () {
//
//     let menu_aim_options = {
//
//         /** Function to call when a row is purposefully activated.
//          *  Use this to show a submenu's content for the activated row.*/
//
//         activate: function (targetRow) {
//             console.log('activate')
//         },
//
//         /** Function to call when a row is deactivated */
//         deactivate: function (targetRow) {
//             console.log('deactivate');
//         },
//
//         /** Function to call when mouse enters a menu row.
//          * Entering a row does not mean the row has been
//          * activated, as the user may be mousing over to a submenu. */
//         enter: function (targetRow) {
//             console.log('enter')
//         },
//
//         /** Function to call when mouse exits a menu row. */
//         exit: function (targetRow) {
//             console.log('exit')
//         },
//
//         /** Function to call when mouse exits the entire menu. If this
//          *  returns true, the current row's deactivation event and
//          *  callback function will be fired. Otherwise, if this isn't
//          *  supplied or it returns false, the currently activated row
//          *  will stay activated when the mouse leaves the menu entirely. */
//         exitMenu: function (menu_aim_instance) {
//             console.log('exitMenu')
//         },
//
//         /** Function to call when a menu row is clicked */
//         // clickRow:function (mouseEvent, targetRow) { ... },
//
//         /** Selector for identifying which elements in the menu are rows
//          *  that can trigger the above events. Defaults to "> li". */
//         // rowSelector: ".flyout-menu",
//
//         /** You may have some menu rows that aren't submenus and therefore
//          *  shouldn't ever need to "activate." If so, filter submenu rows
//          *  w/ this selector. Defaults to "*" (all elements). */
//         // submenuSelector: ".flyout-menu",
//
//         /** Direction the submenu opens relative to the main menu.
//          *  This controls which direction is "forgiving" as the user
//          *  moves their cursor from the main menu into the submenu.
//          *  Can be one of "right", "left", "above", or "below".
//          *  Defaults to "right". */
//         submenuDirection: "right",
//
//         /** for how long should menu remain displayed after the mouse has left it */
//         exitDelay: 100,
//
//         /** bigger = more forgiving when entering submenu */
//         tolerance: 75,
//
//         /** set it to TRUE if the menu is not nested within another menu */
//         isRoot: false
//     };
//
//     // let menuRoot = document.getElementById('dropdown-menu-9');
//     let menuRoot = [...document.querySelectorAll('.nav-pages .dropdown-menu')];
//     menuRoot.forEach((dropdown) => {
//         new MenuAim(dropdown, menu_aim_options)
//
//         // Bootstrap's dropdown menus immediately close on document click.
//         // Don't let this event close the menu if a submenu is being clicked.
//         // This event propagation control doesn't belong in the menu-aim plugin
//         // itself because the plugin is agnostic to bootstrap.
//
//         dropdown.addEventListener('click', function (e) {
//             e.stopPropagation();
//         });
//     })
//
// })();
//
//
//
// (function () {
//     // First we get the viewport height and we multiple it by 1% to get a value for a vh unit
//     let vh = window.innerHeight * 0.01;
//     // Then we set the value in the --vh custom property to the root of the document
//     document.documentElement.style.setProperty('--vh', `${vh}px`);
// })();
//
//
// var myNodeList = document.querySelectorAll("[data-bs-toggle='flyout']");
// [].forEach.call(myNodeList, function (element) {
//     element.addEventListener('mouseover', function (e) {
//         console.log(this.parentNode);
//         this.parentNode.classList.toggle("open");
//         e.stopPropagation();
//     });
//     element.addEventListener('mouseout', function (e) {
//         console.log(this.parentNode);
//         this.parentNode.classList.toggle("open");
//         e.stopPropagation();
//     });
// });
//
// //
// // (function () {
// //     /////// Prevent closing from click inside dropdown
// //     document.querySelectorAll('.dropdown-menu').forEach(function (element) {
// //         element.addEventListener('click', function (e) {
// //             e.stopPropagation();
// //         });
// //     });
// //
// //     // make it as accordion for smaller screens
// //     if (window.innerWidth < 992) {
// //         // close all inner dropdowns when parent is closed
// //         document.querySelectorAll('.navbar .dropdown').forEach(function (everydropdown) {
// //             everydropdown.addEventListener('hidden.bs.dropdown', function () {
// //                 // after dropdown is hidden, then find all submenus
// //                 this.querySelectorAll('.flyout-menu').forEach(function (everysubmenu) {
// //                     // hide every submenu as well
// //                     everysubmenu.style.display = 'none';
// //                 });
// //             })
// //         });
// //
// //         document.querySelectorAll('.flyout a').forEach(function (element) {
// //
// //             element.addEventListener('click', function (e) {
// //                 let nextEl = this.nextElementSibling;
// //                 if (nextEl && nextEl.classList.contains('flyout-menu')) {
// //                     // prevent opening link if link needs to open dropdown
// //                     e.preventDefault();
// //                     if (nextEl.style.display == 'block') {
// //                         nextEl.style.display = 'none';
// //                     } else {
// //                         nextEl.style.display = 'block';
// //                     }
// //                 }
// //             });
// //         }) // end foreach
// //     }
// //     // end if innerWidth
// // })();
