var $AdfDhtmlMessagesPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlMessagesPeer");
$goog$exportSymbol$$("AdfDhtmlMessagesPeer", $AdfDhtmlMessagesPeer$$);
$AdfDhtmlMessagesPeer$$.$InitSubclass$ = function $$AdfDhtmlMessagesPeer$$$$InitSubclass$$() {
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichMessages.SHORT_DESC);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichMessages.MESSAGE);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichMessages.TEXT);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichMessages.GLOBAL_ONLY);
  $AdfDhtmlMessagesPeer$$.$_ATTRIBUTE_GLOBAL_ONLY$ = "_afrGlobalOnly";
  $AdfDhtmlMessagesPeer$$.$_ATTRIBUTE_MESSAGE$ = "_afrMessage";
  $AdfDhtmlMessagesPeer$$.$_ATTRIBUTE_TEXT$ = "_afrText";
  $AdfDhtmlMessagesPeer$$.$_HEADER_STYLE_CLASS$ = "af|messages::header";
  $AdfDhtmlMessagesPeer$$.$_HEADER_ICON_STYLE_CLASS$ = "af|messages::header-icon";
  $AdfDhtmlMessagesPeer$$.$_HEADER_TEXT_STYLE_CLASS$ = "af|messages::header-text";
  $AdfDhtmlMessagesPeer$$.$_MESSAGES_BODY_CLASS$ = "af|messages::body";
  $AdfDhtmlMessagesPeer$$.$_MESSAGES_INTRO_CLASS$ = "af|messages::intro";
  $AdfDhtmlMessagesPeer$$.$_MESSAGES_GROUP_TITLE_CLASS$ = "af|messages::message-group-title";
  $AdfDhtmlMessagesPeer$$.$_MESSAGES_TYPE_CLASS$ = "af|messages::type";
  $AdfDhtmlMessagesPeer$$.$_MESSAGES_DETAIL_CLASS$ = "af|messages::detail";
};
$goog$exportSymbol$$("AdfDhtmlMessagesPeer.InitSubclass", $AdfDhtmlMessagesPeer$$.$InitSubclass$);
$AdfDhtmlMessagesPeer$$.prototype.$componentRemoved$ = function $$AdfDhtmlMessagesPeer$$$$$componentRemoved$$($ancestor$$2_component$$1595$$) {
  $AdfDhtmlMessagesPeer$$.$superclass$.$componentRemoved$.call(this, $ancestor$$2_component$$1595$$);
  var $page$$148$$ = $AdfPage$$.$PAGE$, $defaultMessageHandlerId$$ = $page$$148$$.$getDefaultMessageHandlerComponentId$(), $slaveMessageHandlerId$$ = $page$$148$$.$getMessageHandlerSlaveComponentId$(), $clientId$$284$$ = $ancestor$$2_component$$1595$$.$getClientId$(), $reset$$ = !1;
  if ($clientId$$284$$ == $defaultMessageHandlerId$$) {
    for (var $reset$$ = !0, $documentId$$1$$;$ancestor$$2_component$$1595$$ && !$documentId$$1$$;) {
      ($ancestor$$2_component$$1595$$ = $ancestor$$2_component$$1595$$.getParent()) && $ancestor$$2_component$$1595$$ instanceof AdfRichDocument && ($documentId$$1$$ = $ancestor$$2_component$$1595$$.$getClientId$());
    }
    $defaultMessageHandlerId$$ = $documentId$$1$$;
  }
  $clientId$$284$$ == $slaveMessageHandlerId$$ && ($AdfMessageUtils$$.$HideMessagesDialog$(), $reset$$ = !0, $slaveMessageHandlerId$$ = null);
  $reset$$ && $page$$148$$.$setDefaultMessageHandlerComponentId$($defaultMessageHandlerId$$, $slaveMessageHandlerId$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.componentRemoved", {$componentRemoved$:$AdfDhtmlMessagesPeer$$.prototype.$componentRemoved$});
$AdfDhtmlMessagesPeer$$.prototype.$isMessagesDialogShowable$ = function $$AdfDhtmlMessagesPeer$$$$$isMessagesDialogShowable$$() {
  return !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.isMessagesDialogShowable", {$isMessagesDialogShowable$:$AdfDhtmlMessagesPeer$$.prototype.$isMessagesDialogShowable$});
$AdfDhtmlMessagesPeer$$.prototype.$setMessagesDialogShown$ = function $$AdfDhtmlMessagesPeer$$$$$setMessagesDialogShown$$() {
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.setMessagesDialogShown", {$setMessagesDialogShown$:$AdfDhtmlMessagesPeer$$.prototype.$setMessagesDialogShown$});
$AdfDhtmlMessagesPeer$$.prototype.$GetComponentShortDesc$ = function $$AdfDhtmlMessagesPeer$$$$$GetComponentShortDesc$$($component$$1596$$, $root$$9$$) {
  return $AdfAgent$$.$AGENT$.getAttribute($root$$9$$, "title");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.GetComponentShortDesc", {$GetComponentShortDesc$:$AdfDhtmlMessagesPeer$$.prototype.$GetComponentShortDesc$});
$AdfDhtmlMessagesPeer$$.prototype.$GetComponentMessage$ = function $$AdfDhtmlMessagesPeer$$$$$GetComponentMessage$$($component$$1597$$, $root$$10$$) {
  return $AdfAgent$$.$AGENT$.getAttribute($root$$10$$, $AdfDhtmlMessagesPeer$$.$_ATTRIBUTE_MESSAGE$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.GetComponentMessage", {$GetComponentMessage$:$AdfDhtmlMessagesPeer$$.prototype.$GetComponentMessage$});
$AdfDhtmlMessagesPeer$$.prototype.$GetComponentText$ = function $$AdfDhtmlMessagesPeer$$$$$GetComponentText$$($component$$1598$$, $root$$11$$) {
  return $AdfAgent$$.$AGENT$.getAttribute($root$$11$$, $AdfDhtmlMessagesPeer$$.$_ATTRIBUTE_TEXT$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.GetComponentText", {$GetComponentText$:$AdfDhtmlMessagesPeer$$.prototype.$GetComponentText$});
$AdfDhtmlMessagesPeer$$.prototype.$GetComponentGlobalOnly$ = function $$AdfDhtmlMessagesPeer$$$$$GetComponentGlobalOnly$$($component$$1599$$, $root$$12$$) {
  return $AdfAgent$$.$AGENT$.$getBooleanAttribute$($root$$12$$, $AdfDhtmlMessagesPeer$$.$_ATTRIBUTE_GLOBAL_ONLY$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.GetComponentGlobalOnly", {$GetComponentGlobalOnly$:$AdfDhtmlMessagesPeer$$.prototype.$GetComponentGlobalOnly$});
$AdfDhtmlMessagesPeer$$.prototype.$MessageShow$ = function $$AdfDhtmlMessagesPeer$$$$$MessageShow$$($maxType$$11$$, $messages$$17$$) {
  this.$_messageUpdate$($maxType$$11$$, $messages$$17$$, !0);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.MessageShow", {$MessageShow$:$AdfDhtmlMessagesPeer$$.prototype.$MessageShow$});
$AdfDhtmlMessagesPeer$$.prototype.$MessageNotify$ = function $$AdfDhtmlMessagesPeer$$$$$MessageNotify$$($maxType$$12$$, $messages$$18$$) {
  $AdfDhtmlMessagesPeer$$.$superclass$.$MessageNotify$.call(this, $maxType$$12$$, $messages$$18$$);
  this.$_messageUpdate$($maxType$$12$$, $messages$$18$$, !1);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMessagesPeer.prototype.MessageNotify", {$MessageNotify$:$AdfDhtmlMessagesPeer$$.prototype.$MessageNotify$});
$AdfDhtmlMessagesPeer$$.prototype.$_messageUpdate$ = function $$AdfDhtmlMessagesPeer$$$$$_messageUpdate$$($maxType$$13_message$$68_wrapper$$21$$, $messages$$19_page$$149$$, $agent$$417_alwaysShow$$1_compMessages$$2$$) {
  $messages$$19_page$$149$$ = $AdfPage$$.$PAGE$;
  var $component$$1600$$ = this.$getComponent$(), $clientId$$285$$ = $component$$1600$$.$getClientId$(), $allMessages$$2$$ = $messages$$19_page$$149$$.$getAllMessages$(), $root$$13$$ = this.$getDomElement$(), $globalOnly$$3$$ = this.$GetComponentGlobalOnly$($component$$1600$$, $root$$13$$), $globalMessages$$2_tempMaxType$$1$$ = $allMessages$$2$$[$clientId$$285$$], $globalMessageCount$$1_table$$15$$ = 0;
  null != $globalMessages$$2_tempMaxType$$1$$ && ($globalMessageCount$$1_table$$15$$ = $globalMessages$$2_tempMaxType$$1$$.length);
  if ($agent$$417_alwaysShow$$1_compMessages$$2$$ && !$AdfMessageUtils$$.$isPageLevelBoxNeeded$($messages$$19_page$$149$$, $globalMessages$$2_tempMaxType$$1$$, $globalOnly$$3$$)) {
    for (var $laf$$93_messageId$$1$$ in $allMessages$$2$$) {
      $agent$$417_alwaysShow$$1_compMessages$$2$$ = $allMessages$$2$$[$laf$$93_messageId$$1$$], null != $agent$$417_alwaysShow$$1_compMessages$$2$$ && null != $agent$$417_alwaysShow$$1_compMessages$$2$$.$compId$ && $AdfMessageUtils$$.$messageGroupFocus$($laf$$93_messageId$$1$$);
    }
  }
  if ($AdfMessageUtils$$.$hasMessages$($messages$$19_page$$149$$, $globalMessageCount$$1_table$$15$$, $globalOnly$$3$$)) {
    $AdfDomUtils$$.$removeAllNodes$($root$$13$$);
    $laf$$93_messageId$$1$$ = $messages$$19_page$$149$$.$getLookAndFeel$();
    $agent$$417_alwaysShow$$1_compMessages$$2$$ = $AdfAgent$$.$AGENT$;
    $globalMessageCount$$1_table$$15$$ = $agent$$417_alwaysShow$$1_compMessages$$2$$.$getDomDocument$().createElement("table");
    $globalMessageCount$$1_table$$15$$.summary = "";
    $globalMessageCount$$1_table$$15$$.$role$ = "presentation";
    $AdfDomUtils$$.$addCSSClassName$($globalMessageCount$$1_table$$15$$, $laf$$93_messageId$$1$$.getStyleClass($AdfDhtmlMessagesPeer$$.$_HEADER_STYLE_CLASS$));
    var $row$$53$$ = $globalMessageCount$$1_table$$15$$.insertRow(-1), $cell$$3$$ = $row$$53$$.insertCell(-1);
    null == $maxType$$13_message$$68_wrapper$$21$$ && ($maxType$$13_message$$68_wrapper$$21$$ = 0);
    if ($globalOnly$$3$$) {
      $maxType$$13_message$$68_wrapper$$21$$ = $globalMessages$$2_tempMaxType$$1$$.$maxType$;
    } else {
      for (var $clientId2$$1_styleClass$$14$$ in $allMessages$$2$$) {
        $globalMessages$$2_tempMaxType$$1$$ = $allMessages$$2$$[$clientId2$$1_styleClass$$14$$].$maxType$, $globalMessages$$2_tempMaxType$$1$$ > $maxType$$13_message$$68_wrapper$$21$$ && ($maxType$$13_message$$68_wrapper$$21$$ = $globalMessages$$2_tempMaxType$$1$$);
      }
    }
    $AdfDomUtils$$.$addCSSClassName$($cell$$3$$, $laf$$93_messageId$$1$$.getStyleClass($AdfDhtmlMessagesPeer$$.$_HEADER_ICON_STYLE_CLASS$));
    var $icon$$16_text$$38$$;
    $clientId2$$1_styleClass$$14$$ = $component$$1600$$.getStyleClass();
    null != $clientId2$$1_styleClass$$14$$ && ($icon$$16_text$$38$$ = $AdfMessageUtils$$.$getIconWithPrefix$($maxType$$13_message$$68_wrapper$$21$$, "." + $clientId2$$1_styleClass$$14$$ + " ", !0), null == $icon$$16_text$$38$$ && $AdfLogger$$.$LOGGER$.warning("Icon not found with style class " + $clientId2$$1_styleClass$$14$$ + ".  Make sure that skin contains class prefixed the message styleCalss: ." + $clientId2$$1_styleClass$$14$$));
    $icon$$16_text$$38$$ || ($icon$$16_text$$38$$ = $AdfMessageUtils$$.getIcon($maxType$$13_message$$68_wrapper$$21$$, !0));
    $cell$$3$$.appendChild($icon$$16_text$$38$$);
    $cell$$3$$ = $row$$53$$.insertCell(-1);
    $AdfDomUtils$$.$addCSSClassName$($cell$$3$$, $laf$$93_messageId$$1$$.getStyleClass($AdfDhtmlMessagesPeer$$.$_HEADER_TEXT_STYLE_CLASS$));
    $icon$$16_text$$38$$ = $component$$1600$$.getText();
    null == $icon$$16_text$$38$$ ? $agent$$417_alwaysShow$$1_compMessages$$2$$.$setTextContent$($cell$$3$$, $AdfMessageUtils$$.$getString$($maxType$$13_message$$68_wrapper$$21$$, !0)) : $agent$$417_alwaysShow$$1_compMessages$$2$$.$setTextContent$($cell$$3$$, $icon$$16_text$$38$$);
    $root$$13$$.appendChild($globalMessageCount$$1_table$$15$$);
    $maxType$$13_message$$68_wrapper$$21$$ = $component$$1600$$.getMessage();
    $maxType$$13_message$$68_wrapper$$21$$ = $AdfMessageUtils$$.$getCombinedMessagesDom$($clientId$$285$$, $maxType$$13_message$$68_wrapper$$21$$, $globalOnly$$3$$);
    $AdfDomUtils$$.$addCSSClassName$($maxType$$13_message$$68_wrapper$$21$$, $laf$$93_messageId$$1$$.getStyleClass($AdfDhtmlMessagesPeer$$.$_MESSAGES_BODY_CLASS$));
    $root$$13$$.appendChild($maxType$$13_message$$68_wrapper$$21$$);
    $root$$13$$.style.display = "";
  } else {
    $root$$13$$.style.display = "none", $AdfDomUtils$$.$removeAllNodes$($root$$13$$), $AdfMessageUtils$$.$HideMessagesDialog$();
  }
  $messages$$19_page$$149$$.$__queueDescendantResizeNotifySource$($component$$1600$$);
  $messages$$19_page$$149$$.$__doDescendantResizeNotify$();
};
