var $AdfDhtmlStatusIndicatorPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlStatusIndicatorPeer");
$goog$exportSymbol$$("AdfDhtmlStatusIndicatorPeer", $AdfDhtmlStatusIndicatorPeer$$);
$AdfDhtmlStatusIndicatorPeer$$.$InitSubclass$ = function $$AdfDhtmlStatusIndicatorPeer$$$$InitSubclass$$() {
  this.$DTS_PROCESSING_ICON$ = "af|statusIndicator::processing-icon";
  this.$DTS_IDLE_ICON$ = "af|statusIndicator::idle-icon";
  this.$ADS_CONNECTING_ICON$ = "af|statusIndicator::connecting-icon";
  this.$ADS_CONNECTED_ICON$ = "af|statusIndicator::connected-icon";
  this.$ADS_DISCONNECTED_ICON$ = "af|statusIndicator::disconnected-icon";
  this.$ADS_RECONNECTING_ICON$ = "af|statusIndicator::reconnecting-icon";
  this.$ADS_ICONS$ = [];
  var $pushChannelStates$$ = $AdfDhtmlPage$$.$PushChannelStates$;
  this.$ADS_ICONS$[$pushChannelStates$$.CONNECTING] = this.$ADS_CONNECTING_ICON$;
  this.$ADS_ICONS$[$pushChannelStates$$.$CONNECTED$] = this.$ADS_CONNECTED_ICON$;
  this.$ADS_ICONS$[$pushChannelStates$$.$RECONNECTING$] = this.$ADS_RECONNECTING_ICON$;
  this.$ADS_ICONS$[$pushChannelStates$$.$DISCONNECTED$] = this.$ADS_DISCONNECTED_ICON$;
  this.$_serverBusy$ = !1;
};
$goog$exportSymbol$$("AdfDhtmlStatusIndicatorPeer.InitSubclass", $AdfDhtmlStatusIndicatorPeer$$.$InitSubclass$);
$AdfDhtmlStatusIndicatorPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlStatusIndicatorPeer$$$$$InitDomElement$$($component$$2159$$, $domElement$$539$$) {
  $AdfAssert$$.$assertDomElement$($domElement$$539$$);
  $AdfDhtmlStatusIndicatorPeer$$.$superclass$.$InitDomElement$.call(this, $component$$2159$$, $domElement$$539$$);
  $JSCompiler_StaticMethods__updateIcon$$($domElement$$539$$);
  $AdfPage$$.$PAGE$.$getDataTransferService$().$addStateChangeListener$(this.$_stateChanged$, $component$$2159$$);
  var $self$$68$$ = this;
  window.setTimeout(function() {
    $AdfPage$$.$PAGE$.$isActiveDataSupported$() && $AdfPage$$.$PAGE$.$getActiveDataSupport$().$addADSConnectionStateListener$($self$$68$$.$_stateChanged$, $component$$2159$$);
  }, 0);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlStatusIndicatorPeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlStatusIndicatorPeer$$.prototype.$InitDomElement$});
$AdfDhtmlStatusIndicatorPeer$$.prototype.$ComponentRemoved$ = function $$AdfDhtmlStatusIndicatorPeer$$$$$ComponentRemoved$$($component$$2160$$) {
  $AdfPage$$.$PAGE$.$getDataTransferService$().$removeStateChangeListener$(this.$_stateChanged$, $component$$2160$$);
  $AdfPage$$.$PAGE$.$isActiveDataSupported$() && $AdfPage$$.$PAGE$.$getActiveDataSupport$().$removeADSConnectionStateListener$(this.$_stateChanged$, $component$$2160$$);
  $AdfDhtmlStatusIndicatorPeer$$.$superclass$.$ComponentRemoved$.call(this, $component$$2160$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlStatusIndicatorPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlStatusIndicatorPeer$$.prototype.$ComponentRemoved$});
$AdfDhtmlStatusIndicatorPeer$$.prototype.$_stateChanged$ = function $$AdfDhtmlStatusIndicatorPeer$$$$$_stateChanged$$() {
  var $parentElement$$17_peer$$174$$ = this.$getPeer$();
  $parentElement$$17_peer$$174$$.bind(this);
  $parentElement$$17_peer$$174$$ = $parentElement$$17_peer$$174$$.$getDomElement$();
  $JSCompiler_StaticMethods__updateIcon$$($parentElement$$17_peer$$174$$);
  return !0;
};
function $JSCompiler_StaticMethods__updateIcon$$($parentElement$$18$$) {
  var $newIcon$$;
  if ($AdfPage$$.$PAGE$.$getDataTransferService$().$getDTSState$() != $AdfDataTransferService$$.$STATE_READY$) {
    $newIcon$$ = $AdfDhtmlStatusIndicatorPeer$$.$DTS_PROCESSING_ICON$;
  } else {
    if ($newIcon$$ = $AdfDhtmlStatusIndicatorPeer$$.$DTS_IDLE_ICON$, $AdfPage$$.$PAGE$.$isActiveDataSupported$()) {
      var $adsState$$ = $AdfPage$$.$PAGE$.$getActiveDataSupport$().$getADSConnectionState$();
      void 0 != $adsState$$ && ($newIcon$$ = $AdfDhtmlStatusIndicatorPeer$$.$ADS_ICONS$[$adsState$$]);
    }
  }
  $AdfDomUtils$$.$swapIcon$($parentElement$$18$$.firstChild, $newIcon$$);
}
;