import {menu,constructor} from '/lib/gadget-ui/dist/gadget-ui.es6.js';

let authAlert = function(){
  alert("Auth option selected.");
}

let menus = [
  { label: "User",
   menuItem:{
     items:[
       { label: "Profile",
        link: "" },
       { label: "Logout",
        link: "" }
     ]
   }},
  { label: "Options",
   menuItem: {
     items:[ { label: "Files",
              menuItem:{
                items:[
                  {	label: "Saving ...",
                   link: "" },
                  {	label: "Loading ...",
                   link: "" }
                ]
              }
             },
            {
              label: "Logs",
              menuItem: {
                items:[
                  { label: "Auth ...",
                   link: authAlert }
                ]
              }
            }
           ]
   }}
];
var md = constructor( menu, [ document.querySelector("#menu"), { data: menus } ] );