var $AdfDhtmlLinkPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlLinkPeer");
$goog$exportSymbol$$("AdfDhtmlLinkPeer", $AdfDhtmlLinkPeer$$);
$AdfDhtmlLinkPeer$$.$InitSubclass$ = function $$AdfDhtmlLinkPeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$(AdfRichLink);
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$, $AdfUIInputEvent$$.$MOUSE_DOWN_EVENT_TYPE$, $AdfUIInputEvent$$.$MOUSE_UP_EVENT_TYPE$);
  $AdfAgent$$.$AGENT$.$getCapabilities$()[$AdfAgent$$.$CAP_TOUCH_SCREEN$] == $AdfAgent$$.$CAP_TOUCH_SCREEN_NONE$ && $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$MOUSE_IN_EVENT_TYPE$, $AdfUIInputEvent$$.$MOUSE_OUT_EVENT_TYPE$);
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, AdfRichLink.TEXT, AdfRichLink.DISABLED, AdfRichLink.SELECTED);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichLink.TEXT);
  this.$_DEPRESSED_STYLE_CLASS$ = "p_AFDepressed";
  this.$_SELECTED_STYLE_CLASS$ = "p_AFSelected";
  this.$_HIDDEN_LABEL_STYLE_CLASS$ = "p_OraHiddenLabel";
  this.$_LINK_CONTEXT_KEY$ = "_adfClc";
  this.$_BUSY$ = "_busy";
  this.$_EXPANDO_TEXT_LENGTH$ = "data-afr-tlen";
  this.$_LABELLEDBY_SUFFIX$ = "_afrlblBy";
  this.$_SELECTED_STATE_STR$ = "af_link.ARIA_SELECTED_STATE"
};
$goog$exportSymbol$$("AdfDhtmlLinkPeer.InitSubclass", $AdfDhtmlLinkPeer$$.$InitSubclass$);
$AdfDhtmlLinkPeer$$.prototype.$HandleComponentClick$ = function $$AdfDhtmlLinkPeer$$$$$HandleComponentClick$$($componentEvent$$214$$) {
  if($componentEvent$$214$$.$getEventPhase$() != $AdfBaseEvent$$.$AT_TARGET_PHASE$) {
    var $component$$1022_eventTarget$$40$$ = $componentEvent$$214$$.$getNativeEventTarget$();
    if($AdfDomUtils$$.$getParentWithAttr$(this.$getDomElement$(), $component$$1022_eventTarget$$40$$, $AdfDhtmlLinkPeer$$.$_LINK_CONTEXT_KEY$)) {
      return
    }
  }
  var $component$$1022_eventTarget$$40$$ = this.$getComponent$(), $isBusy$$18$$ = $component$$1022_eventTarget$$40$$.$getProperty$($AdfDhtmlLinkPeer$$.$_BUSY$);
  $componentEvent$$214$$.$isLeftButtonPressed$() && (!$component$$1022_eventTarget$$40$$.getDisabled() && !$isBusy$$18$$) && (this.$getComponent$().getDestination() != $JSCompiler_alias_NULL$$ ? this.$_executeDestination$($componentEvent$$214$$) : this.$_executeAction$())
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.HandleComponentClick", {$HandleComponentClick$:$AdfDhtmlLinkPeer$$.prototype.$HandleComponentClick$});
$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseOver$ = function $$AdfDhtmlLinkPeer$$$$$HandleComponentMouseOver$$() {
  this.$getComponent$().getDisabled() || this.$_displayMouseOverIcon$(this.$getComponent$())
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.HandleComponentMouseOver", {$HandleComponentMouseOver$:$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseOver$});
$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseOut$ = function $$AdfDhtmlLinkPeer$$$$$HandleComponentMouseOut$$() {
  var $component$$1023$$ = this.$getComponent$();
  $component$$1023$$.getDisabled() || (this.$_setDepressedStyle$($component$$1023$$, $JSCompiler_alias_FALSE$$), this.$_displayDefaultIcon$(this.$getComponent$()))
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.HandleComponentMouseOut", {$HandleComponentMouseOut$:$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseOut$});
$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseUp$ = function $$AdfDhtmlLinkPeer$$$$$HandleComponentMouseUp$$() {
  var $component$$1024$$ = this.$getComponent$();
  $component$$1024$$.getDisabled() || (this.$_setDepressedStyle$($component$$1024$$, $JSCompiler_alias_FALSE$$), this.$_displayMouseOverIcon$($component$$1024$$))
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.HandleComponentMouseUp", {$HandleComponentMouseUp$:$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseUp$});
$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseDown$ = function $$AdfDhtmlLinkPeer$$$$$HandleComponentMouseDown$$($componentEvent$$218_isLeftButtonPressed$$4$$) {
  var $component$$1025$$ = this.$getComponent$();
  $componentEvent$$218_isLeftButtonPressed$$4$$ = $componentEvent$$218_isLeftButtonPressed$$4$$.$isLeftButtonPressed$();
  !$component$$1025$$.getDisabled() && $componentEvent$$218_isLeftButtonPressed$$4$$ && (this.$_setDepressedStyle$($component$$1025$$, $JSCompiler_alias_TRUE$$), this.$_displayMouseDownIcon$($component$$1025$$))
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.HandleComponentMouseDown", {$HandleComponentMouseDown$:$AdfDhtmlLinkPeer$$.prototype.$HandleComponentMouseDown$});
$AdfDhtmlLinkPeer$$.prototype.$ComponentDisabledChanged$ = function $$AdfDhtmlLinkPeer$$$$$ComponentDisabledChanged$$($component$$1026$$, $domElement$$273$$, $newValue$$91$$) {
  $newValue$$91$$ == $JSCompiler_alias_TRUE$$ ? ($AdfDomUtils$$.$addCSSClassName$($domElement$$273$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), this.$_displayDisabledIcon$($component$$1026$$), this.$_setAriaDisabled$($component$$1026$$), $domElement$$273$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false")) : ($AdfDomUtils$$.$removeCSSClassName$($domElement$$273$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), this.$_displayDefaultIcon$($component$$1026$$), this.$_removeAriaDisabled$($component$$1026$$), 
  $domElement$$273$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "true"))
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.ComponentDisabledChanged", {$ComponentDisabledChanged$:$AdfDhtmlLinkPeer$$.prototype.$ComponentDisabledChanged$});
$AdfDhtmlLinkPeer$$.prototype.$ComponentSelectedChanged$ = function $$AdfDhtmlLinkPeer$$$$$ComponentSelectedChanged$$($component$$1027$$, $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$, $newValue$$92_selectedStateStr$$inline_1858$$) {
  if($newValue$$92_selectedStateStr$$inline_1858$$) {
    this.$_setDepressedStyle$($component$$1027$$, $JSCompiler_alias_TRUE$$);
    $AdfDomUtils$$.$addCSSClassName$($clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$, $AdfDhtmlLinkPeer$$.$_SELECTED_STYLE_CLASS$);
    var $domElement$$inline_1856_parentContainer$$inline_1859$$ = this.$getDomElement$();
    $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$ = $component$$1027$$.$getClientId$();
    "A" != $domElement$$inline_1856_parentContainer$$inline_1859$$.tagName && ($domElement$$inline_1856_parentContainer$$inline_1859$$ = $AdfDomUtils$$.$getDescendentElement$($domElement$$inline_1856_parentContainer$$inline_1859$$, "a", 1));
    $domElement$$inline_1856_parentContainer$$inline_1859$$.setAttribute("aria-labelledby", $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$ + "::text " + $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$ + $AdfDhtmlLinkPeer$$.$_LABELLEDBY_SUFFIX$);
    $newValue$$92_selectedStateStr$$inline_1858$$ = $AdfDhtmlLookAndFeel$$.prototype.$getTranslatedString$($AdfDhtmlLinkPeer$$.$_SELECTED_STATE_STR$);
    var $domElement$$inline_1856_parentContainer$$inline_1859$$ = $domElement$$inline_1856_parentContainer$$inline_1859$$.parentNode, $labelElement$$inline_1860$$ = $component$$1027$$.$getPeer$().$getDomDocument$().createElement("LABEL");
    $labelElement$$inline_1860$$.id = $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$ + $AdfDhtmlLinkPeer$$.$_LABELLEDBY_SUFFIX$;
    $AdfDomUtils$$.$addCSSClassName$($labelElement$$inline_1860$$, $AdfDhtmlLinkPeer$$.$_HIDDEN_LABEL_STYLE_CLASS$);
    $AdfAgent$$.$AGENT$.$setTextContent$($labelElement$$inline_1860$$, " : " + $newValue$$92_selectedStateStr$$inline_1858$$);
    $domElement$$inline_1856_parentContainer$$inline_1859$$ != $JSCompiler_alias_NULL$$ && $domElement$$inline_1856_parentContainer$$inline_1859$$.appendChild($labelElement$$inline_1860$$);
    this.$_displayMouseDownIcon$($component$$1027$$)
  }else {
    this.$_setDepressedStyle$($component$$1027$$, $JSCompiler_alias_FALSE$$), $AdfDomUtils$$.$removeCSSClassName$($clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$, $AdfDhtmlLinkPeer$$.$_SELECTED_STYLE_CLASS$), $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$ = this.$getDomElement$(), "A" != $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$.tagName && ($clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$ = 
    $AdfDomUtils$$.$getDescendentElement$($clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$, "a", 1)), $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$.removeAttribute("aria-labelledby"), $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$ = $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$.parentNode, console.log($clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$), 
    $clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$.removeChild($AdfDomUtils$$.$getDescendentElement$($clientId$$inline_1857_domElement$$274_domElement$$inline_1863_parentContainer$$inline_1864$$, "label", 0)), this.$_displayDefaultIcon$($component$$1027$$)
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.ComponentSelectedChanged", {$ComponentSelectedChanged$:$AdfDhtmlLinkPeer$$.prototype.$ComponentSelectedChanged$});
$AdfDhtmlLinkPeer$$.prototype.$ComponentTextChanged$ = $AdfDomUtils$$.$__componentTextChanged$;
$AdfDhtmlLinkPeer$$.prototype.$GetAccessibleName$ = function $$AdfDhtmlLinkPeer$$$$$GetAccessibleName$$() {
  return this.$getComponent$().getText()
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.GetAccessibleName", {$GetAccessibleName$:$AdfDhtmlLinkPeer$$.prototype.$GetAccessibleName$});
$AdfDhtmlLinkPeer$$.prototype.$GetComponentText$ = function $$AdfDhtmlLinkPeer$$$$$GetComponentText$$($component$$1029$$, $domElement$$275$$) {
  "SPAN" == $domElement$$275$$.tagName && ($domElement$$275$$ = $AdfDomUtils$$.$getChildElementByPosition$($domElement$$275$$, 1, 1));
  if($domElement$$275$$) {
    $AdfAssert$$.assert("A" == $domElement$$275$$.tagName, "Anchor element is expected root of link component");
    var $textLength$$5$$ = $domElement$$275$$.getAttribute($AdfDhtmlLinkPeer$$.$_EXPANDO_TEXT_LENGTH$);
    if($textLength$$5$$ == $JSCompiler_alias_NULL$$) {
      return $JSCompiler_alias_NULL$$
    }
    if(0 == $textLength$$5$$) {
      return""
    }
    var $textElement$$6$$ = $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$275$$, "span");
    if($textElement$$6$$) {
      return $AdfAgent$$.$AGENT$.$getTextContent$($textElement$$6$$).slice(0, $textLength$$5$$)
    }
  }
  $AdfAssert$$.assert($JSCompiler_alias_FALSE$$, "Unable to find the element containing the text")
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.GetComponentText", {$GetComponentText$:$AdfDhtmlLinkPeer$$.prototype.$GetComponentText$});
$AdfDhtmlLinkPeer$$.prototype.$GetInlineEditor$ = function $$AdfDhtmlLinkPeer$$$$$GetInlineEditor$$() {
  return $AdfDhtmlSimpleTextEditor$$.$getInlineEditor$()
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.GetInlineEditor", {$GetInlineEditor$:$AdfDhtmlLinkPeer$$.prototype.$GetInlineEditor$});
$AdfDhtmlLinkPeer$$.prototype.$SetBusy$ = function $$AdfDhtmlLinkPeer$$$$$SetBusy$$($isBusy$$19$$) {
  var $component$$1030$$ = this.$getComponent$(), $domElement$$276$$ = this.$getDomElement$(), $actionForm$$6_isMultipart$$2$$ = $AdfDomUtils$$.$getFormElement$($domElement$$276$$);
  $actionForm$$6_isMultipart$$2$$ && ($actionForm$$6_isMultipart$$2$$ = $AdfDomUtils$$.$isMultiPartForm$($actionForm$$6_isMultipart$$2$$), !$component$$1030$$.getDisabled() && (!$actionForm$$6_isMultipart$$2$$ && !$AdfPage$$.$PAGE$.$isAttachmentMode$()) && ($AdfDomUtils$$.$addOrRemoveCSSClassName$($isBusy$$19$$, $domElement$$276$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), $component$$1030$$.setProperty($AdfDhtmlLinkPeer$$.$_BUSY$, $isBusy$$19$$, $JSCompiler_alias_FALSE$$, $AdfUIComponent$$.$PROPAGATE_NEVER$)))
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.SetBusy", {$SetBusy$:$AdfDhtmlLinkPeer$$.prototype.$SetBusy$});
$AdfDhtmlLinkPeer$$.prototype.$isBusy$ = function $$AdfDhtmlLinkPeer$$$$$isBusy$$() {
  var $component$$1031$$ = this.$getComponent$();
  return $component$$1031$$ && $component$$1031$$.$getProperty$($AdfDhtmlLinkPeer$$.$_BUSY$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlLinkPeer.prototype.isBusy", {$isBusy$:$AdfDhtmlLinkPeer$$.prototype.$isBusy$});
$JSCompiler_prototypeAlias$$ = $AdfDhtmlLinkPeer$$.prototype;
$JSCompiler_prototypeAlias$$.$_executeAction$ = function $$JSCompiler_prototypeAlias$$$$_executeAction$$() {
  var $component$$1032$$ = this.$getComponent$(), $actionEvent$$5$$ = new $AdfActionEvent$$($component$$1032$$), $params$$34$$ = $component$$1032$$.$getProperty$("_F_PARAMS");
  $params$$34$$ && $AdfDhtmlPage$$.$__addServerParamsToEvent$($actionEvent$$5$$, $params$$34$$);
  $actionEvent$$5$$.$queue$($component$$1032$$.getPartialSubmit())
};
$JSCompiler_prototypeAlias$$.$_executeDestination$ = function $$JSCompiler_prototypeAlias$$$$_executeDestination$$($componentEvent$$219$$) {
  var $linkElement$$ = this.$getDomElement$();
  "A" != $linkElement$$.tagName && ($linkElement$$ = $AdfDomUtils$$.$getDescendentElement$($linkElement$$, "a", 1));
  var $href$$11_target$$120$$ = $linkElement$$.getAttribute("href");
  if($href$$11_target$$120$$ == $JSCompiler_alias_NULL$$ || "" == $href$$11_target$$120$$) {
    $componentEvent$$219$$.cancel()
  }else {
    var $documentHref$$2$$ = $AdfAgent$$.$AGENT$.$getDomDocument$().location.href, $hashIndex$$8$$ = $documentHref$$2$$.indexOf("#");
    if(-1 == $href$$11_target$$120$$.indexOf(-1 == $hashIndex$$8$$ ? $documentHref$$2$$ : $documentHref$$2$$.substring(0, $hashIndex$$8$$)) || 1 < $href$$11_target$$120$$.substring($href$$11_target$$120$$.indexOf("#")).length) {
      $href$$11_target$$120$$ = $linkElement$$.getAttribute("target"), $AdfPage$$.$PAGE$.$__handleNavigation$($linkElement$$.attributes.href.value, $href$$11_target$$120$$), $componentEvent$$219$$.cancel()
    }
  }
};
$JSCompiler_prototypeAlias$$.$_getIconElement$ = function $$JSCompiler_prototypeAlias$$$$_getIconElement$$($clientId$$201_component$$1034_iconId$$9$$) {
  $clientId$$201_component$$1034_iconId$$9$$ = $clientId$$201_component$$1034_iconId$$9$$.$getClientId$();
  $clientId$$201_component$$1034_iconId$$9$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$201_component$$1034_iconId$$9$$, "icon");
  return $AdfAgent$$.$AGENT$.getElementById($clientId$$201_component$$1034_iconId$$9$$)
};
$JSCompiler_prototypeAlias$$.$_displayDefaultIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayDefaultIcon$$($component$$1035$$) {
  if("inline" != $component$$1035$$.getIconDelivery()) {
    var $defaultIcon$$6$$ = $component$$1035$$.getIcon();
    $defaultIcon$$6$$ && (this.$_getIconElement$($component$$1035$$).src = $defaultIcon$$6$$)
  }
};
$JSCompiler_prototypeAlias$$.$_displayMouseDownIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayMouseDownIcon$$($component$$1036$$) {
  this.$_displayIcon$($component$$1036$$, $component$$1036$$.getDepressedIcon())
};
$JSCompiler_prototypeAlias$$.$_displayMouseOverIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayMouseOverIcon$$($component$$1037$$) {
  this.$_displayIcon$($component$$1037$$, $component$$1037$$.getHoverIcon())
};
$JSCompiler_prototypeAlias$$.$_displayDisabledIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayDisabledIcon$$($component$$1038$$) {
  this.$_displayIcon$($component$$1038$$, $component$$1038$$.getDisabledIcon())
};
$JSCompiler_prototypeAlias$$.$_displayIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayIcon$$($component$$1039$$, $icon$$14$$) {
  if("inline" != $component$$1039$$.getIconDelivery()) {
    var $defaultIcon$$7$$ = $component$$1039$$.getIcon();
    $defaultIcon$$7$$ && (this.$_getIconElement$($component$$1039$$).src = $icon$$14$$ || $defaultIcon$$7$$)
  }
};
$JSCompiler_prototypeAlias$$.$_setDepressedStyle$ = function $$JSCompiler_prototypeAlias$$$$_setDepressedStyle$$($component$$1040$$, $depressed$$5$$) {
  var $domElement$$277$$ = $AdfRichUIPeer$$.$getDomElementForComponent$($component$$1040$$), $className$$18$$ = $AdfDhtmlLinkPeer$$.$_DEPRESSED_STYLE_CLASS$;
  $depressed$$5$$ ? $AdfDomUtils$$.$addCSSClassName$($domElement$$277$$, $className$$18$$) : $AdfDomUtils$$.$removeCSSClassName$($domElement$$277$$, $className$$18$$)
};
$JSCompiler_prototypeAlias$$.$_setAriaDisabled$ = function $$JSCompiler_prototypeAlias$$$$_setAriaDisabled$$() {
  var $domElement$$280$$ = this.$getDomElement$();
  "A" != $domElement$$280$$.tagName && ($domElement$$280$$ = $AdfDomUtils$$.$getDescendentElement$($domElement$$280$$, "a", 1));
  $domElement$$280$$.setAttribute("aria-disabled", "true")
};
$JSCompiler_prototypeAlias$$.$_removeAriaDisabled$ = function $$JSCompiler_prototypeAlias$$$$_removeAriaDisabled$$() {
  var $domElement$$281$$ = this.$getDomElement$();
  "A" != $domElement$$281$$.tagName && ($domElement$$281$$ = $AdfDomUtils$$.$getDescendentElement$($domElement$$281$$, "a", 1));
  $domElement$$281$$.removeAttribute("aria-disabled")
};
