var $AdfDhtmlGoMenuItemPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlGoMenuItemPeer", !1);
$goog$exportSymbol$$("AdfDhtmlGoMenuItemPeer", $AdfDhtmlGoMenuItemPeer$$);
$AdfDhtmlGoMenuItemPeer$$.$InitSubclass$ = function $$AdfDhtmlGoMenuItemPeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$(AdfRichGoMenuItem);
  $AdfObject$$.$ensureClassInitialization$($AdfMenuUtils$$);
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$MOUSE_DOWN_EVENT_TYPE$, $AdfUIInputEvent$$.$MOUSE_UP_EVENT_TYPE$, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$, $AdfUIInputEvent$$.$FOCUS_EVENT_TYPE$, $AdfUIInputEvent$$.$BLUR_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_UP_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_DOWN_EVENT_TYPE$);
  $AdfAgent$$.$AGENT$.$isTouchFirstDevice$() || $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$MOUSE_IN_EVENT_TYPE$, $AdfUIInputEvent$$.$MOUSE_OUT_EVENT_TYPE$);
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, AdfRichGoMenuItem.DISABLED, AdfRichGoMenuItem.VISIBLE);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichGoMenuItem.TEXT);
};
$goog$exportSymbol$$("AdfDhtmlGoMenuItemPeer.InitSubclass", $AdfDhtmlGoMenuItemPeer$$.$InitSubclass$);
$AdfDhtmlGoMenuItemPeer$$.prototype.Init = function $$AdfDhtmlGoMenuItemPeer$$$$Init$($component$$1150$$) {
  $component$$1150$$.getParent();
  $AdfDhtmlGoMenuItemPeer$$.$superclass$.Init.call(this, $component$$1150$$);
  this.$_spaceKeyDown$ = this.$_enterKeyDown$ = !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.Init", {Init:$AdfDhtmlGoMenuItemPeer$$.prototype.Init});
$AdfDhtmlGoMenuItemPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlGoMenuItemPeer$$$$$InitDomElement$$($component$$1151$$, $domElement$$222$$) {
  $AdfDhtmlGoMenuItemPeer$$.$superclass$.$InitDomElement$.call(this, $component$$1151$$, $domElement$$222$$);
  var $keystroke$$5$$ = $component$$1151$$.getAccelerator();
  null != $keystroke$$5$$ && $AdfRichUIPeer$$.$registerKeyStroke$($component$$1151$$, $keystroke$$5$$, this.$_execute$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlGoMenuItemPeer$$.prototype.$InitDomElement$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$ComponentRemoved$ = function $$AdfDhtmlGoMenuItemPeer$$$$$ComponentRemoved$$($component$$1152$$) {
  var $keystroke$$6$$ = $component$$1152$$.getAccelerator();
  null != $keystroke$$6$$ && $AdfRichUIPeer$$.$unregisterKeyStroke$($component$$1152$$, $keystroke$$6$$);
  $AdfDhtmlGoMenuItemPeer$$.$superclass$.$ComponentRemoved$.call(this, $component$$1152$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlGoMenuItemPeer$$.prototype.$ComponentRemoved$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$GetComponentText$ = function $$AdfDhtmlGoMenuItemPeer$$$$$GetComponentText$$($component$$1153$$, $domElement$$223$$) {
  var $parent$$37_text$$34_textElement$$5$$ = $component$$1153$$.getParent();
  if ($parent$$37_text$$34_textElement$$5$$ = window.AdfRichMenu && $parent$$37_text$$34_textElement$$5$$ instanceof AdfRichMenu ? $AdfDomUtils$$.$getChildElements$($domElement$$223$$)[1] : $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$223$$, "a")) {
    return $parent$$37_text$$34_textElement$$5$$ = $AdfAgent$$.$AGENT$.$getTextContent$($parent$$37_text$$34_textElement$$5$$), "" == $parent$$37_text$$34_textElement$$5$$ ? null : $parent$$37_text$$34_textElement$$5$$;
  }
  $AdfAssert$$.assert(!1, "Unable to find the element containing the text");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.GetComponentText", {$GetComponentText$:$AdfDhtmlGoMenuItemPeer$$.prototype.$GetComponentText$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentKeyUp$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentKeyUp$$($componentEvent$$208_parent$$38$$) {
  var $cancelEvent$$2_evt$$96$$ = $componentEvent$$208_parent$$38$$.$getNativeEvent$();
  if (!$cancelEvent$$2_evt$$96$$.ctrlKey) {
    switch($AdfAgent$$.$AGENT$.$getKeyCode$($cancelEvent$$2_evt$$96$$)) {
      case $AdfKeyStroke$$.$ENTER_KEY$:
        this.$_enterKeyDown$ && this.$_execute$();
        this.$_enterKeyDown$ = !1;
        $cancelEvent$$2_evt$$96$$ = !0;
        break;
      case $AdfKeyStroke$$.$SPACE_KEY$:
        this.$_spaceKeyDown$ && this.$_execute$();
        this.$_spaceKeyDown$ = !1;
        $cancelEvent$$2_evt$$96$$ = !0;
        break;
      default:
        return;
    }
    $cancelEvent$$2_evt$$96$$ && $componentEvent$$208_parent$$38$$.cancel();
    ($componentEvent$$208_parent$$38$$ = this.$getComponent$().getParent()) && $componentEvent$$208_parent$$38$$ instanceof AdfRichMenu && $componentEvent$$208_parent$$38$$.$getPeer$().$updateScrollIconsState$();
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentKeyUp", {$HandleComponentKeyUp$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentKeyUp$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentKeyDown$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentKeyDown$$($componentEvent$$209$$) {
  if (!$componentEvent$$209$$.$isCanceled$() && !this.$_isDisabled$()) {
    var $keyCode$$59$$ = $componentEvent$$209$$.$getKeyCode$();
    $keyCode$$59$$ == $AdfKeyStroke$$.$ENTER_KEY$ ? (this.$_enterKeyDown$ = !0, $componentEvent$$209$$.cancel(), $componentEvent$$209$$.$stopBubbling$()) : $keyCode$$59$$ == $AdfKeyStroke$$.$SPACE_KEY$ && (this.$_spaceKeyDown$ = !0, $componentEvent$$209$$.cancel(), $componentEvent$$209$$.$stopBubbling$());
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentKeyDown", {$HandleComponentKeyDown$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentKeyDown$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentFocus$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentFocus$$($componentEvent$$210_rootElement$$52$$) {
  if (!this.$_isDisabled$()) {
    $componentEvent$$210_rootElement$$52$$.cancel();
    $componentEvent$$210_rootElement$$52$$ = this.$getDomElement$();
    $AdfDhtmlMenuPeer$$.$cancelShowing$();
    var $component$$1155$$ = this.$getComponent$();
    $AdfMenuUtils$$.$isInMenu$($component$$1155$$) ? $AdfDomUtils$$.$addCSSClassName$($componentEvent$$210_rootElement$$52$$, $AdfMenuUtils$$.$HIGHLIGHTED_STYLE_CLASS$) : ($AdfMenuUtils$$.$isMenuBarAutoOpenMode$() && $AdfMenuUtils$$.$closeAllMenus$(!1), $AdfMenuUtils$$.$highlightRootMenuItem$($componentEvent$$210_rootElement$$52$$));
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentFocus", {$HandleComponentFocus$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentFocus$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseDown$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentMouseDown$$($componentEvent$$211_rootElement$$53$$) {
  !this.$_isDisabled$() && $componentEvent$$211_rootElement$$53$$.$isLeftButtonPressed$() && ($componentEvent$$211_rootElement$$53$$ = this.$getDomElement$(), $AdfDomUtils$$.$addCSSClassName$($componentEvent$$211_rootElement$$53$$, $AdfMenuUtils$$.$DEPRESSED_STYLE_CLASS$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentMouseDown", {$HandleComponentMouseDown$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseDown$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseUp$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentMouseUp$$($componentEvent$$212_rootElement$$54$$) {
  !this.$_isDisabled$() && $componentEvent$$212_rootElement$$54$$.$isLeftButtonPressed$() && ($componentEvent$$212_rootElement$$54$$ = this.$getDomElement$(), $AdfDomUtils$$.$removeCSSClassName$($componentEvent$$212_rootElement$$54$$, $AdfMenuUtils$$.$DEPRESSED_STYLE_CLASS$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentMouseUp", {$HandleComponentMouseUp$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseUp$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseOver$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentMouseOver$$($componentEvent$$213_rootElement$$55$$) {
  var $component$$1156$$ = this.$getComponent$();
  if (this.$_isDisabled$()) {
    $AdfMenuUtils$$.$isMenuBarAutoOpenMode$() && $AdfMenuUtils$$.$isOnMenuBar$($component$$1156$$) && $AdfMenuUtils$$.$closeAllMenus$(!1);
  } else {
    $componentEvent$$213_rootElement$$55$$.cancel();
    $componentEvent$$213_rootElement$$55$$ = this.$getDomElement$();
    var $alreadyHaveFocus$$1$$ = $AdfFocusUtils$$.$containsFocus$($componentEvent$$213_rootElement$$55$$);
    $AdfMenuUtils$$.$isInMenu$($component$$1156$$) ? ($AdfDomUtils$$.$addCSSClassName$($componentEvent$$213_rootElement$$55$$, $AdfMenuUtils$$.$HIGHLIGHTED_STYLE_CLASS$), $AdfMenuUtils$$.$dismiss$($componentEvent$$213_rootElement$$55$$, !1), $alreadyHaveFocus$$1$$ || this.focus($component$$1156$$)) : $AdfMenuUtils$$.$isMenuBarAutoOpenMode$() && !$alreadyHaveFocus$$1$$ ? this.focus($component$$1156$$) : $AdfMenuUtils$$.$highlightRootMenuItem$($componentEvent$$213_rootElement$$55$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentMouseOver", {$HandleComponentMouseOver$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseOver$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseOut$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentMouseOut$$($component$$1157_componentEvent$$214_rootElement$$56$$) {
  $component$$1157_componentEvent$$214_rootElement$$56$$.cancel();
  $AdfMenuUtils$$.$unhighlightRootMenuItem$();
  this.$_isDisabled$() || ($component$$1157_componentEvent$$214_rootElement$$56$$ = this.$getComponent$(), $AdfMenuUtils$$.$isInMenu$($component$$1157_componentEvent$$214_rootElement$$56$$) && this.$_deselectElement$(), $component$$1157_componentEvent$$214_rootElement$$56$$ = this.$getDomElement$(), $AdfDomUtils$$.$removeCSSClassName$($component$$1157_componentEvent$$214_rootElement$$56$$, $AdfMenuUtils$$.$DEPRESSED_STYLE_CLASS$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentMouseOut", {$HandleComponentMouseOut$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentMouseOut$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentBlur$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentBlur$$() {
  this.$_deselectElement$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentBlur", {$HandleComponentBlur$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentBlur$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentClick$ = function $$AdfDhtmlGoMenuItemPeer$$$$$HandleComponentClick$$($componentEvent$$216$$) {
  !this.$_isDisabled$() && $componentEvent$$216$$.$isLeftButtonPressed$() && this.$_execute$();
  $componentEvent$$216$$.cancel();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.HandleComponentClick", {$HandleComponentClick$:$AdfDhtmlGoMenuItemPeer$$.prototype.$HandleComponentClick$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$ComponentDisabledChanged$ = function $$AdfDhtmlGoMenuItemPeer$$$$$ComponentDisabledChanged$$($component$$1158$$, $domElement$$224$$, $newValue$$67$$) {
  $AdfMenuUtils$$.$menuItemDisabledChanged$($component$$1158$$, $domElement$$224$$, $newValue$$67$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.ComponentDisabledChanged", {$ComponentDisabledChanged$:$AdfDhtmlGoMenuItemPeer$$.prototype.$ComponentDisabledChanged$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$ComponentVisibleChanged$ = function $$AdfDhtmlGoMenuItemPeer$$$$$ComponentVisibleChanged$$($component$$1159$$, $domElement$$225$$, $newValue$$68$$, $oldValue$$48$$) {
  $AdfDhtmlGoMenuItemPeer$$.$superclass$.$ComponentVisibleChanged$.call(this, $component$$1159$$, $domElement$$225$$, $newValue$$68$$, $oldValue$$48$$);
  $AdfMenuUtils$$.$menuItemVisibleChanged$($component$$1159$$, $domElement$$225$$, $newValue$$68$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.ComponentVisibleChanged", {$ComponentVisibleChanged$:$AdfDhtmlGoMenuItemPeer$$.prototype.$ComponentVisibleChanged$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$__preferredSizeChangeNotify$ = function $$AdfDhtmlGoMenuItemPeer$$$$$__preferredSizeChangeNotify$$($component$$1160_parent$$39$$) {
  this.bind($component$$1160_parent$$39$$);
  $component$$1160_parent$$39$$ = this.$getComponentParent$($component$$1160_parent$$39$$);
  var $parentPeer$$12$$ = null != $component$$1160_parent$$39$$ ? $component$$1160_parent$$39$$.$getPeer$() : null;
  $parentPeer$$12$$ && $parentPeer$$12$$.$__preferredSizeChangeNotify$ && $parentPeer$$12$$.$__preferredSizeChangeNotify$($component$$1160_parent$$39$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlGoMenuItemPeer.prototype.__preferredSizeChangeNotify", {$__preferredSizeChangeNotify$:$AdfDhtmlGoMenuItemPeer$$.prototype.$__preferredSizeChangeNotify$});
$AdfDhtmlGoMenuItemPeer$$.prototype.$_execute$ = function $$AdfDhtmlGoMenuItemPeer$$$$$_execute$$() {
  if (!this.$_isDisabled$()) {
    $AdfLogger$$.$LOGGER$.finest("menuBar auto open mode, set to OFF due to goMenuItem execute");
    $AdfMenuUtils$$.$setMenuBarAutoOpenMode$(!1);
    var $component$$1161_targetFrame$$ = this.$getComponent$(), $destination$$2_inMenu$$1_targetAttrs$$1$$ = $AdfMenuUtils$$.$getContextMenuItemTargetAttrs$($component$$1161_targetFrame$$);
    null != $destination$$2_inMenu$$1_targetAttrs$$1$$ && $AdfMenuUtils$$.$setContextMenuItemTargetAttrs$($component$$1161_targetFrame$$, $destination$$2_inMenu$$1_targetAttrs$$1$$);
    $destination$$2_inMenu$$1_targetAttrs$$1$$ = $component$$1161_targetFrame$$.getDestination();
    if (null == $destination$$2_inMenu$$1_targetAttrs$$1$$) {
      $destination$$2_inMenu$$1_targetAttrs$$1$$ = $AdfMenuUtils$$.$isInMenu$($component$$1161_targetFrame$$), $AdfMenuUtils$$.$closeAllMenus$($destination$$2_inMenu$$1_targetAttrs$$1$$ && !$AdfMenuUtils$$.$isInDetachedMenu$($component$$1161_targetFrame$$));
    } else {
      var $component$$1161_targetFrame$$ = $component$$1161_targetFrame$$.getTargetFrame(), $agent$$296$$ = $AdfAgent$$.$AGENT$;
      null != $component$$1161_targetFrame$$ && "_blank" == $component$$1161_targetFrame$$.toLowerCase() && $agent$$296$$.$getPlatform$() == $AdfAgent$$.$IE_PLATFORM$ && 8 > $agent$$296$$.$getVersion$() ? ($AdfMenuUtils$$.$closeAllMenus$(!1), $AdfPage$$.$PAGE$.$__handleNavigation$($destination$$2_inMenu$$1_targetAttrs$$1$$, $component$$1161_targetFrame$$)) : ($AdfPage$$.$PAGE$.$__handleNavigation$($destination$$2_inMenu$$1_targetAttrs$$1$$, $component$$1161_targetFrame$$), $AdfMenuUtils$$.$closeAllMenus$(!1));
    }
  }
};
$AdfDhtmlGoMenuItemPeer$$.prototype.$_deselectElement$ = function $$AdfDhtmlGoMenuItemPeer$$$$$_deselectElement$$() {
  var $rootElement$$57$$ = this.$getDomElement$();
  $AdfDomUtils$$.$removeCSSClassName$($rootElement$$57$$, $AdfMenuUtils$$.$HIGHLIGHTED_STYLE_CLASS$);
};
$AdfDhtmlGoMenuItemPeer$$.prototype.$_isDisabled$ = function $$AdfDhtmlGoMenuItemPeer$$$$$_isDisabled$$() {
  var $rootElement$$58$$ = this.$getDomElement$();
  return $rootElement$$58$$.disabled || $AdfDomUtils$$.$containsCSSClassName$($rootElement$$58$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$);
};
