var $AdfDhtmlCommandNavigationItemPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlCommandNavigationItemPeer");
$goog$exportSymbol$$("AdfDhtmlCommandNavigationItemPeer", $AdfDhtmlCommandNavigationItemPeer$$);
$AdfDhtmlCommandNavigationItemPeer$$.$InitSubclass$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$InitSubclass$$() {
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$KEY_UP_EVENT_TYPE$, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$, $AdfUIInputEvent$$.$FOCUS_EVENT_TYPE$, $AdfUIInputEvent$$.$BLUR_EVENT_TYPE$);
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, AdfRichCommandNavigationItem.TEXT);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichCommandNavigationItem.TEXT);
  $AdfAgent$$.$AGENT$.$isTouchFirstDevice$() || $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$MOUSE_IN_EVENT_TYPE$);
  this.$_TAB_ANCHOR_ID$ = "disclosureAnchor";
  this.$_REMOVE_ICON_ID$ = "rmAbv";
  this.$_HIGHLIGHTED_STYLE_CLASS$ = "p_AFHighlighted";
};
$goog$exportSymbol$$("AdfDhtmlCommandNavigationItemPeer.InitSubclass", $AdfDhtmlCommandNavigationItemPeer$$.$InitSubclass$);
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$InitDomElement$$($component$$981$$, $domElement$$147$$) {
  $AdfDhtmlCommandNavigationItemPeer$$.$superclass$.$InitDomElement$.call(this, $component$$981$$, $domElement$$147$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$InitDomElement$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentKeyUp$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$HandleComponentKeyUp$$($componentEvent$$165_target$$121$$) {
  var $component$$982_evt$$93$$ = $componentEvent$$165_target$$121$$.$getNativeEvent$(), $keyCode$$53$$ = $componentEvent$$165_target$$121$$.$getKeyCode$();
  $component$$982_evt$$93$$.ctrlKey && $component$$982_evt$$93$$.altKey && $keyCode$$53$$ == $AdfKeyStroke$$.$F4_KEY$ && ($component$$982_evt$$93$$ = this.$getComponent$(), !$component$$982_evt$$93$$.getDisabled() && this.$canRemove$() && (this.$_saveAndRemoveCompressedLayout$(), $componentEvent$$165_target$$121$$ = $componentEvent$$165_target$$121$$.$getNativeEventTarget$(), $AdfFocusUtils$$.$focusNextTabStop$($componentEvent$$165_target$$121$$, null, !0), $AdfItemEvent$$.$queueItemRemoveEvent$($component$$982_evt$$93$$)));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentKeyUp", {$HandleComponentKeyUp$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentKeyUp$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentClick$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$HandleComponentClick$$($componentEvent$$166$$) {
  var $component$$983$$ = this.$getComponent$();
  if ($componentEvent$$166$$.getSource() == $component$$983$$) {
    if (this.$_isDisabled$()) {
      $componentEvent$$166$$.$stopBubbling$();
    } else {
      if ($componentEvent$$166$$.$isLeftButtonPressed$()) {
        if (this.$_isOnRemoveButton$($componentEvent$$166$$)) {
          if (this.$canRemove$()) {
            this.$_saveAndRemoveCompressedLayout$();
            var $itemHref_target$$122$$ = $componentEvent$$166$$.$getNativeEventTarget$();
            $AdfFocusUtils$$.$focusNextTabStop$($itemHref_target$$122$$, null, !0);
            $AdfItemEvent$$.$queueItemRemoveEvent$($component$$983$$);
          }
        } else {
          var $domElement$$148$$ = $AdfRichUIPeer$$.$getDomElementForComponent$($component$$983$$), $itemHref_target$$122$$ = $domElement$$148$$.href;
          void 0 == $itemHref_target$$122$$ && ($itemHref_target$$122$$ = $domElement$$148$$.getAttribute("href"));
          var $documentHref$$1_trimmedDocHref$$1$$ = $AdfAgent$$.$AGENT$.$getDomDocument$().location.href, $hashIndex$$7$$ = $documentHref$$1_trimmedDocHref$$1$$.indexOf("#"), $documentHref$$1_trimmedDocHref$$1$$ = -1 == $hashIndex$$7$$ ? $documentHref$$1_trimmedDocHref$$1$$ : $documentHref$$1_trimmedDocHref$$1$$.substring(0, $hashIndex$$7$$);
          $itemHref_target$$122$$ && (-1 == $itemHref_target$$122$$.indexOf($documentHref$$1_trimmedDocHref$$1$$) || 1 < $itemHref_target$$122$$.substring($itemHref_target$$122$$.indexOf("#")).length) ? ($AdfPage$$.$PAGE$.$__perfTimings$(!0, !0, !0, "User click Command Navigation , GET request"), $itemHref_target$$122$$ = $domElement$$148$$.getAttribute("target"), $AdfPage$$.$PAGE$.$__handleNavigation$($domElement$$148$$.attributes.href.value, $itemHref_target$$122$$), $componentEvent$$166$$.cancel()) : 
          (this.$_saveAndRemoveCompressedLayout$(), $AdfActionEvent$$.$queue$($component$$983$$, $component$$983$$.getPartialSubmit()));
        }
      }
    }
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentClick", {$HandleComponentClick$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentClick$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentFocus$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$HandleComponentFocus$$($componentEvent$$167$$) {
  this.$_isDisabled$() ? $componentEvent$$167$$.$stopBubbling$() : this.$_handleTabFocusOrBlur$($componentEvent$$167$$, !0);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentFocus", {$HandleComponentFocus$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentFocus$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentBlur$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$HandleComponentBlur$$($componentEvent$$168$$) {
  this.$_handleTabFocusOrBlur$($componentEvent$$168$$, !1);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentBlur", {$HandleComponentBlur$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentBlur$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$_handleTabFocusOrBlur$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$_handleTabFocusOrBlur$$($componentEvent$$169$$, $isFocus$$) {
  $componentEvent$$169$$.cancel();
  var $id$$286_tabElement_tokens$$20$$ = $componentEvent$$169$$.$getNativeEventTarget$().id;
  null != $id$$286_tabElement_tokens$$20$$ && ($id$$286_tabElement_tokens$$20$$ = $id$$286_tabElement_tokens$$20$$.split("::"), 1 >= $id$$286_tabElement_tokens$$20$$.length || $id$$286_tabElement_tokens$$20$$[$id$$286_tabElement_tokens$$20$$.length - 1] != $AdfDhtmlCommandNavigationItemPeer$$.$_TAB_ANCHOR_ID$ || ($id$$286_tabElement_tokens$$20$$ = this.$getDomElement$(), $isFocus$$ ? $AdfDomUtils$$.$addCSSClassName$($id$$286_tabElement_tokens$$20$$, $AdfDhtmlCommandNavigationItemPeer$$.$_HIGHLIGHTED_STYLE_CLASS$) : 
  $AdfDomUtils$$.$removeCSSClassName$($id$$286_tabElement_tokens$$20$$, $AdfDhtmlCommandNavigationItemPeer$$.$_HIGHLIGHTED_STYLE_CLASS$)));
};
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentMouseOver$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$HandleComponentMouseOver$$($componentEvent$$170$$) {
  this.$_isDisabled$() && $componentEvent$$170$$.$stopBubbling$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentMouseOver", {$HandleComponentMouseOver$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$HandleComponentMouseOver$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$GetInlineEditor$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$GetInlineEditor$$() {
  return $AdfDhtmlNavigationItemTextEditor$$.$getInlineEditor$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.GetInlineEditor", {$GetInlineEditor$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$GetInlineEditor$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$ComponentTextChanged$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$ComponentTextChanged$$($component$$984$$, $domElement$$149_textWrapperElement$$1$$, $newValue$$58$$, $oldValue$$36$$) {
  return null != $oldValue$$36$$ && ($domElement$$149_textWrapperElement$$1$$ = $AdfDhtmlCommandNavigationItemPeer$$.$getInlineEditableTextElement$($component$$984$$, $domElement$$149_textWrapperElement$$1$$)) ? $AdfDomUtils$$.$handleTextChangeWithAccessKey$($component$$984$$, $domElement$$149_textWrapperElement$$1$$, $newValue$$58$$) : !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.ComponentTextChanged", {$ComponentTextChanged$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$ComponentTextChanged$});
$AdfDhtmlCommandNavigationItemPeer$$.$getInlineEditableTextElement$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$getInlineEditableTextElement$$($component$$985$$, $domElement$$150$$) {
  $AdfAssert$$.assert(null != $component$$985$$.$getProperty$("text"));
  var $lastChildElement_textWrapperElement$$2$$ = $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$150$$, "a");
  $lastChildElement_textWrapperElement$$2$$ || "a" == $AdfAgent$$.$AGENT$.$getNodeName$($domElement$$150$$).toLowerCase() && ($lastChildElement_textWrapperElement$$2$$ = $domElement$$150$$);
  if ($lastChildElement_textWrapperElement$$2$$) {
    if ($AdfDomUtils$$.$getFirstDescendentElement$($lastChildElement_textWrapperElement$$2$$, "img")) {
      if ($lastChildElement_textWrapperElement$$2$$ = $AdfDomUtils$$.$getLastChildElement$($lastChildElement_textWrapperElement$$2$$), "SPAN" == $lastChildElement_textWrapperElement$$2$$.tagName) {
        return $lastChildElement_textWrapperElement$$2$$;
      }
    } else {
      return $lastChildElement_textWrapperElement$$2$$;
    }
  }
  return null;
};
$goog$exportSymbol$$("AdfDhtmlCommandNavigationItemPeer.getInlineEditableTextElement", $AdfDhtmlCommandNavigationItemPeer$$.$getInlineEditableTextElement$);
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$_isOnRemoveButton$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$_isOnRemoveButton$$($componentEvent$$171_target$$124$$) {
  var $cniId_cniRemoveId$$ = this.$getComponent$().$getClientId$(), $cniId_cniRemoveId$$ = $AdfRichUIPeer$$.$createSubId$($cniId_cniRemoveId$$, $AdfDhtmlCommandNavigationItemPeer$$.$_REMOVE_ICON_ID$);
  $componentEvent$$171_target$$124$$ = $componentEvent$$171_target$$124$$.$getNativeEventTarget$();
  return $componentEvent$$171_target$$124$$.id == $cniId_cniRemoveId$$ ? !0 : $componentEvent$$171_target$$124$$.parentNode.id == $cniId_cniRemoveId$$;
};
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$canRemove$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$canRemove$$() {
  var $cniId$$1_cniRemoveId$$1_component$$987$$ = this.$getComponent$();
  if ($cniId$$1_cniRemoveId$$1_component$$987$$.getRemove) {
    var $itemRemoveType_parent$$28_tabRemovalType$$ = $cniId$$1_cniRemoveId$$1_component$$987$$.getRemove();
    if ($itemRemoveType_parent$$28_tabRemovalType$$ && ("no" == $itemRemoveType_parent$$28_tabRemovalType$$ || "disabled" == $itemRemoveType_parent$$28_tabRemovalType$$)) {
      return !1;
    }
  }
  $itemRemoveType_parent$$28_tabRemovalType$$ = $cniId$$1_cniRemoveId$$1_component$$987$$.getParent();
  if (null == $itemRemoveType_parent$$28_tabRemovalType$$.getItemRemoval) {
    return !1;
  }
  $itemRemoveType_parent$$28_tabRemovalType$$ = $itemRemoveType_parent$$28_tabRemovalType$$.getItemRemoval();
  if ($cniId$$1_cniRemoveId$$1_component$$987$$.getDisabled() || null == $itemRemoveType_parent$$28_tabRemovalType$$ || "none" == $itemRemoveType_parent$$28_tabRemovalType$$) {
    return !1;
  }
  if ("all" == $itemRemoveType_parent$$28_tabRemovalType$$) {
    return !0;
  }
  if ("allExceptLast" == $itemRemoveType_parent$$28_tabRemovalType$$) {
    return $cniId$$1_cniRemoveId$$1_component$$987$$ = $cniId$$1_cniRemoveId$$1_component$$987$$.$getClientId$(), $cniId$$1_cniRemoveId$$1_component$$987$$ = $AdfRichUIPeer$$.$createSubId$($cniId$$1_cniRemoveId$$1_component$$987$$, $AdfDhtmlCommandNavigationItemPeer$$.$_REMOVE_ICON_ID$), null != $AdfAgent$$.$getAgent$().getElementById($cniId$$1_cniRemoveId$$1_component$$987$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.canRemove", {$canRemove$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$canRemove$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$_saveAndRemoveCompressedLayout$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$_saveAndRemoveCompressedLayout$$() {
  var $parentComponent$$7$$ = this.$getComponent$().getParent(), $parentPeer$$7$$ = null != $parentComponent$$7$$ ? $parentComponent$$7$$.$getPeer$() : null;
  $parentPeer$$7$$ && ($parentPeer$$7$$.bind($parentComponent$$7$$), $parentPeer$$7$$ && $parentPeer$$7$$.$__saveAndRemoveCompressedLayout$ && $parentPeer$$7$$.$__saveAndRemoveCompressedLayout$());
};
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$_isDisabled$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$_isDisabled$$() {
  var $rootElement$$49$$ = this.$getDomElement$();
  return $rootElement$$49$$.disabled || $AdfDomUtils$$.$containsCSSClassName$($rootElement$$49$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$);
};
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$GetComponentText$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$GetComponentText$$($component$$989$$, $domElement$$151$$) {
  "A" != $domElement$$151$$.tagName && ($domElement$$151$$ = $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$151$$, "a"));
  if ($domElement$$151$$) {
    var $text$$27$$ = $AdfAgent$$.$AGENT$.$getTextContent$($domElement$$151$$);
    return "" == $text$$27$$ ? null : $text$$27$$;
  }
  $AdfAssert$$.assert(!1, "Unable to find the element containing the text");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.GetComponentText", {$GetComponentText$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$GetComponentText$});
$AdfDhtmlCommandNavigationItemPeer$$.prototype.$GetAccessibleName$ = function $$AdfDhtmlCommandNavigationItemPeer$$$$$GetAccessibleName$$() {
  return this.$getComponent$().getText();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandNavigationItemPeer.prototype.GetAccessibleName", {$GetAccessibleName$:$AdfDhtmlCommandNavigationItemPeer$$.prototype.$GetAccessibleName$});
