var $AdfDhtmlCommandImageLinkPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfDhtmlCommandLinkPeer$$, "AdfDhtmlCommandImageLinkPeer");
$goog$exportSymbol$$("AdfDhtmlCommandImageLinkPeer", $AdfDhtmlCommandImageLinkPeer$$);
$AdfDhtmlCommandImageLinkPeer$$.$InitSubclass$ = function $$AdfDhtmlCommandImageLinkPeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$(AdfRichCommandImageLink);
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$MOUSE_DOWN_EVENT_TYPE$, $AdfUIInputEvent$$.$MOUSE_UP_EVENT_TYPE$);
  $AdfAgent$$.$AGENT$.$isTouchFirstDevice$() || $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$MOUSE_IN_EVENT_TYPE$, $AdfUIInputEvent$$.$MOUSE_OUT_EVENT_TYPE$);
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, AdfRichCommandImageLink.DISABLED);
  this.$_DEPRESSED_STYLE_CLASS$ = "p_AFDepressed";
};
$goog$exportSymbol$$("AdfDhtmlCommandImageLinkPeer.InitSubclass", $AdfDhtmlCommandImageLinkPeer$$.$InitSubclass$);
$AdfDhtmlCommandImageLinkPeer$$.prototype.$ComponentDisabledChanged$ = function $$AdfDhtmlCommandImageLinkPeer$$$$$ComponentDisabledChanged$$($component$$944$$, $domElement$$131$$, $newValue$$54$$) {
  1 == $newValue$$54$$ ? ($AdfDomUtils$$.$addCSSClassName$($domElement$$131$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), this.$_displayDisabledIcon$($component$$944$$), this.$_setAriaDisabled$($component$$944$$), $domElement$$131$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false")) : ($AdfDomUtils$$.$removeCSSClassName$($domElement$$131$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), this.$_displayDefaultIcon$($component$$944$$), this.$_removeAriaDisabled$($component$$944$$), $domElement$$131$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, 
  "true"));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandImageLinkPeer.prototype.ComponentDisabledChanged", {$ComponentDisabledChanged$:$AdfDhtmlCommandImageLinkPeer$$.prototype.$ComponentDisabledChanged$});
$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseOver$ = function $$AdfDhtmlCommandImageLinkPeer$$$$$HandleComponentMouseOver$$() {
  this.$getComponent$().getDisabled() || this.$_displayMouseOverIcon$(this.$getComponent$());
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandImageLinkPeer.prototype.HandleComponentMouseOver", {$HandleComponentMouseOver$:$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseOver$});
$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseOut$ = function $$AdfDhtmlCommandImageLinkPeer$$$$$HandleComponentMouseOut$$() {
  var $component$$945$$ = this.$getComponent$();
  $component$$945$$.getDisabled() || (this.$_setDepressedStyle$($component$$945$$, !1), this.$_displayDefaultIcon$(this.$getComponent$()));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandImageLinkPeer.prototype.HandleComponentMouseOut", {$HandleComponentMouseOut$:$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseOut$});
$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseUp$ = function $$AdfDhtmlCommandImageLinkPeer$$$$$HandleComponentMouseUp$$() {
  var $component$$946$$ = this.$getComponent$();
  $component$$946$$.getDisabled() || (this.$_setDepressedStyle$($component$$946$$, !1), this.$_displayMouseOverIcon$($component$$946$$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandImageLinkPeer.prototype.HandleComponentMouseUp", {$HandleComponentMouseUp$:$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseUp$});
$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseDown$ = function $$AdfDhtmlCommandImageLinkPeer$$$$$HandleComponentMouseDown$$($componentEvent$$156_isLeftButtonPressed$$1$$) {
  var $component$$947$$ = this.$getComponent$();
  $componentEvent$$156_isLeftButtonPressed$$1$$ = $componentEvent$$156_isLeftButtonPressed$$1$$.$isLeftButtonPressed$();
  !$component$$947$$.getDisabled() && $componentEvent$$156_isLeftButtonPressed$$1$$ && (this.$_setDepressedStyle$($component$$947$$, !0), this.$_displayMouseDownIcon$($component$$947$$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandImageLinkPeer.prototype.HandleComponentMouseDown", {$HandleComponentMouseDown$:$AdfDhtmlCommandImageLinkPeer$$.prototype.$HandleComponentMouseDown$});
$AdfDhtmlCommandImageLinkPeer$$.prototype.$GetComponentText$ = function $$AdfDhtmlCommandImageLinkPeer$$$$$GetComponentText$$($component$$948$$, $domElement$$132$$) {
  "SPAN" == $domElement$$132$$.tagName && ($domElement$$132$$ = $AdfDomUtils$$.$getChildElementByPosition$($domElement$$132$$, 1, 1));
  if ($domElement$$132$$) {
    $AdfAssert$$.assert("A" == $domElement$$132$$.tagName, "Anchor element is expected root of link component");
    var $textLength$$1$$ = $domElement$$132$$.getAttribute($AdfDhtmlCommandLinkPeer$$.$_EXPANDO_TEXT_LENGTH$);
    if (null == $textLength$$1$$) {
      return null;
    }
    if (0 == $textLength$$1$$) {
      return "";
    }
    var $textElement$$1$$ = $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$132$$, "span");
    if ($textElement$$1$$) {
      return $AdfAgent$$.$AGENT$.$getTextContent$($textElement$$1$$).slice(0, $textLength$$1$$);
    }
  }
  $AdfAssert$$.assert(!1, "Unable to find the element containing the text");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandImageLinkPeer.prototype.GetComponentText", {$GetComponentText$:$AdfDhtmlCommandImageLinkPeer$$.prototype.$GetComponentText$});
$JSCompiler_prototypeAlias$$ = $AdfDhtmlCommandImageLinkPeer$$.prototype;
$JSCompiler_prototypeAlias$$.$_getIconElement$ = function $$JSCompiler_prototypeAlias$$$$_getIconElement$$($clientId$$191_component$$949_iconId$$1$$) {
  $clientId$$191_component$$949_iconId$$1$$ = $clientId$$191_component$$949_iconId$$1$$.$getClientId$();
  $clientId$$191_component$$949_iconId$$1$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$191_component$$949_iconId$$1$$, "icon");
  return $AdfAgent$$.$AGENT$.getElementById($clientId$$191_component$$949_iconId$$1$$);
};
$JSCompiler_prototypeAlias$$.$_displayDefaultIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayDefaultIcon$$($component$$950$$) {
  if (!$AdfRichUIPeer$$.$isInlineSVGIcon$($component$$950$$)) {
    var $defaultIcon$$1$$ = $component$$950$$.getIcon();
    $defaultIcon$$1$$ && (this.$_getIconElement$($component$$950$$).src = $defaultIcon$$1$$);
  }
};
$JSCompiler_prototypeAlias$$.$_displayMouseDownIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayMouseDownIcon$$($component$$951$$) {
  this.$_displayIcon$($component$$951$$, $component$$951$$.getDepressedIcon());
};
$JSCompiler_prototypeAlias$$.$_displayMouseOverIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayMouseOverIcon$$($component$$952$$) {
  this.$_displayIcon$($component$$952$$, $component$$952$$.getHoverIcon());
};
$JSCompiler_prototypeAlias$$.$_displayDisabledIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayDisabledIcon$$($component$$953$$) {
  this.$_displayIcon$($component$$953$$, $component$$953$$.getDisabledIcon());
};
$JSCompiler_prototypeAlias$$.$_displayIcon$ = function $$JSCompiler_prototypeAlias$$$$_displayIcon$$($component$$954$$, $icon$$7$$) {
  if (!$AdfRichUIPeer$$.$isInlineSVGIcon$($component$$954$$)) {
    var $defaultIcon$$2$$ = $component$$954$$.getIcon();
    $defaultIcon$$2$$ && (this.$_getIconElement$($component$$954$$).src = $icon$$7$$ || $defaultIcon$$2$$);
  }
};
$JSCompiler_prototypeAlias$$.$_setDepressedStyle$ = function $$JSCompiler_prototypeAlias$$$$_setDepressedStyle$$($component$$955$$, $depressed$$3$$) {
  var $domElement$$133$$ = $AdfRichUIPeer$$.$getDomElementForComponent$($component$$955$$), $className$$21$$ = $AdfDhtmlCommandImageLinkPeer$$.$_DEPRESSED_STYLE_CLASS$;
  $depressed$$3$$ ? $AdfDomUtils$$.$addCSSClassName$($domElement$$133$$, $className$$21$$) : $AdfDomUtils$$.$removeCSSClassName$($domElement$$133$$, $className$$21$$);
};
$JSCompiler_prototypeAlias$$.$_setAriaDisabled$ = function $$JSCompiler_prototypeAlias$$$$_setAriaDisabled$$($component$$956_domElement$$134$$) {
  $component$$956_domElement$$134$$ = $AdfRichUIPeer$$.$getDomElementForComponent$($component$$956_domElement$$134$$);
  "A" != $component$$956_domElement$$134$$.tagName && ($component$$956_domElement$$134$$ = $AdfDomUtils$$.$getDescendentElement$($component$$956_domElement$$134$$, "a", 1));
  $component$$956_domElement$$134$$.setAttribute("aria-disabled", "true");
};
$JSCompiler_prototypeAlias$$.$_removeAriaDisabled$ = function $$JSCompiler_prototypeAlias$$$$_removeAriaDisabled$$($component$$957_domElement$$135$$) {
  $component$$957_domElement$$135$$ = $AdfRichUIPeer$$.$getDomElementForComponent$($component$$957_domElement$$135$$);
  "A" != $component$$957_domElement$$135$$.tagName && ($component$$957_domElement$$135$$ = $AdfDomUtils$$.$getDescendentElement$($component$$957_domElement$$135$$, "a", 1));
  $component$$957_domElement$$135$$.removeAttribute("aria-disabled");
};
