/**
 * Generated by Apache Royale Compiler from org\apache\royale\html\SimpleAlert.as
 * org.apache.royale.html.SimpleAlert
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.html.SimpleAlert');

goog.require('org.apache.royale.core.IAlertModel');
goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.core.IPopUp');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @extends {org.apache.royale.core.UIBase}
 * @implements {org.apache.royale.core.IPopUp}
 */
org.apache.royale.html.SimpleAlert = function() {
  org.apache.royale.html.SimpleAlert.base(this, 'constructor');
  this.typeNames = "SimpleAlert";
};
goog.inherits(org.apache.royale.html.SimpleAlert, org.apache.royale.core.UIBase);


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.html.SimpleAlert', org.apache.royale.html.SimpleAlert);


/**
 *  This function causes the SimpleAlert to appear. The parent is used for ActionScript and
 *  identifies the IPopUpParent that manages the alert.
 * 
 *  @asparam Object parent The object that hosts the pop-up.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @param {Object} parent
 */
org.apache.royale.html.SimpleAlert.prototype.showAlert = function(parent) {
  parent.addElement(this);
};


/**
 *  A convenience function to compose and display the alert.
 * 
 *  @asparam String message The content to display in the SimpleAlert.
 *  @asparam Object parent The object that hosts the pop-up.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @param {string} message
 * @param {Object} parent
 * @return {org.apache.royale.html.SimpleAlert}
 */
org.apache.royale.html.SimpleAlert.show = function(message, parent) {
  
  alert(message);
  return null;
};


org.apache.royale.html.SimpleAlert.prototype.get__org_apache_royale_html_SimpleAlert_message = function() {
  return this.model.message;
};


org.apache.royale.html.SimpleAlert.prototype.set__org_apache_royale_html_SimpleAlert_message = function(value) {
  this.model.message = value;
};


org.apache.royale.html.SimpleAlert.prototype.get__org_apache_royale_html_SimpleAlert_htmlMessage = function() {
  return this.model.htmlMessage;
};


org.apache.royale.html.SimpleAlert.prototype.set__org_apache_royale_html_SimpleAlert_htmlMessage = function(value) {
  this.model.htmlMessage = value;
};


Object.defineProperties(org.apache.royale.html.SimpleAlert.prototype, /** @lends {org.apache.royale.html.SimpleAlert.prototype} */ {
/**
  * @export
  * @type {string} */
org_apache_royale_html_SimpleAlert_message: {
get: org.apache.royale.html.SimpleAlert.prototype.get__org_apache_royale_html_SimpleAlert_message,
set: org.apache.royale.html.SimpleAlert.prototype.set__org_apache_royale_html_SimpleAlert_message},
/**
  * @export
  * @type {string} */
org_apache_royale_html_SimpleAlert_htmlMessage: {
get: org.apache.royale.html.SimpleAlert.prototype.get__org_apache_royale_html_SimpleAlert_htmlMessage,
set: org.apache.royale.html.SimpleAlert.prototype.set__org_apache_royale_html_SimpleAlert_htmlMessage}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.html.SimpleAlert.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'SimpleAlert', qName: 'org.apache.royale.html.SimpleAlert', kind: 'class' }], interfaces: [org.apache.royale.core.IPopUp] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.SimpleAlert.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {return {};},
    methods: function () {
      return {
        'SimpleAlert': { type: '', declaredBy: 'org.apache.royale.html.SimpleAlert'},
        'showAlert': { type: 'void', declaredBy: 'org.apache.royale.html.SimpleAlert', parameters: function () { return [  { index: 1, type: 'Object', optional: false } ]; }},
        '|show': { type: 'org.apache.royale.html.SimpleAlert', declaredBy: 'org.apache.royale.html.SimpleAlert', parameters: function () { return [  { index: 1, type: 'String', optional: false },{ index: 2, type: 'Object', optional: false } ]; }}
      };
    },
    metadata: function () { return [  ]; }
  };
};