code: function (menuId, menuItemId, menuItemTitle, menuItemUiState, menuItemType, position) {
              this.validateMenuExistance(menuId);
  
              // Push new menu item
              menus[menuId].items.push({
                  id: menuItemId,
                  title: menuItemTitle,
                  uiState: menuItemUiState,
                  class: menuItemType,
                  position: position || 0,
                  items: []
              });
  
              // Return the menu object
              return menus[menuId];
          }
docs: Add menu item object