selectItem(menuItem) {
    if (!isUsableItem(menuItem, this)) {
      return;
    }

    // If the menu item is a submenu container, by definition it cannot be selected.
    // In this case, just make an attempt to open the submenu.
    if (menuItem.hasSubmenu) {
      menuItem.showSubmenu();
      return;
    }

    const group = menuItem.group;
    switch (group.select) {
    case 'multiple':
      // Multiple-select mode (Toggles selection, ignores others)
      menuItem[menuItem.selected ? 'deselect' : 'select']();
      break;
    default:
      // "none" and "single" select mode.
      // In "single" mode, deselection of other items is handled by event
      // at the menu group level.
      menuItem.select();
      break;
    }
  }
/**
   * Selects a menu item contained by this menu.
   * @param {IdsMenuItem} menuItem the item to be selected
   * @returns {void}
   */
Selects a menu item contained by this menu.
@param {IdsMenuItem} menuItem the item to be selected
@returns {void}
Selects a menu item contained by this menu . @param { IdsMenuItem } menuItem the item to be selected @returns { void }
selectItem(menuItem) {
    if (!isUsableItem(menuItem, this)) {
      return;
    }
    if (menuItem.hasSubmenu) {
      menuItem.showSubmenu();
      return;
    }
    const group = menuItem.group;
    switch (group.select) {
    case 'multiple':
      menuItem[menuItem.selected ? 'deselect' : 'select']();
      break;
    default:
      menuItem.select();
      break;
    }
  }
selectItem ( menuItem ) { if ( ! isUsableItem ( menuItem , this ) ) { return ; } if ( menuItem . hasSubmenu ) { menuItem . showSubmenu ( ) ; return ; } const group = menuItem . group ; switch ( group . select ) { case 'multiple' : menuItem [ menuItem . selected ? 'deselect' : 'select' ] ( ) ; break ; default : menuItem . select ( ) ; break ; } }
Selects a menu item contained by this menu.
Selects a menu item contained by this menu .
// If the menu item is a submenu container, by definition it cannot be selected. // In this case, just make an attempt to open the submenu. // Multiple-select mode (Toggles selection, ignores others) // "none" and "single" select mode. // In "single" mode, deselection of other items is handled by event // at the menu group level.