import AMenu from '/js/libs/js-AMenu.js'
import ADropdown from '/js/libs/js-ADropdown.js'
window.isLoad_Menu = false;
window.Load_Menu = function () {
    window.isLoad_Menu = true;
    var asyncStyleSheets = [
        'https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap',
        '/css/atg-font/atg-admin-font.css',
        '/css/atg-lib/waves.min.css'
    ];
    window.app.loadCSS(asyncStyleSheets);

    var a1 = new AMenu(".nav-main", "#header", false, document.getElementById("aMenu"));

    var d = new ADropdown();
    d.bindDropDown(document.getElementById("aSubMenu"));
    a1.on("itemClick", (el, e) => {
        window.app.initNavApp(el);
    });
    window.app.on("redirect_page", (e) => {
        a1.changeActive();
    });
    window.Scrollbar.use(window.OverscrollPlugin);
    window.app.initScrollBar();
 
    window.Scrollbar.init(document.querySelector('.mini-scrollbar'), window.scroll_options);
}
window.AScript.set("asyncLayout", true);