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

goog.provide('org.apache.royale.html.beads.models.MenuModel');

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.html.beads.models.ArraySelectionModel');



/**
 * Constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9
 * @constructor
 * @extends {org.apache.royale.html.beads.models.ArraySelectionModel}
 */
org.apache.royale.html.beads.models.MenuModel = function() {
  org.apache.royale.html.beads.models.MenuModel.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.beads.models.MenuModel, org.apache.royale.html.beads.models.ArraySelectionModel);


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


/**
 * @private
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.html.beads.models.MenuModel.prototype.org_apache_royale_html_beads_models_MenuModel__strand;


/**
 * @private
 * @type {Array}
 */
org.apache.royale.html.beads.models.MenuModel.org_apache_royale_html_beads_models_MenuModel__menuList = [];


/**
 * Empties the menuList.
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9
 * @export
 */
org.apache.royale.html.beads.models.MenuModel.clearMenuList = function() {
  org.apache.royale.html.beads.models.MenuModel.org_apache_royale_html_beads_models_MenuModel__menuList = [];
};


/**
 * Removes a specific menu from the menuList.
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9
 * @export
 * @param {Object} menu
 */
org.apache.royale.html.beads.models.MenuModel.removeMenu = function(menu) {
  for (var /** @type {number} */ i = 0; i < org.apache.royale.html.beads.models.MenuModel["menuList"].length; i++) {
    if (org.apache.royale.html.beads.models.MenuModel["menuList"][i] == menu) {
      org.apache.royale.html.beads.models.MenuModel["menuList"].splice(i, 1);
      break;
    }
  }
};


org.apache.royale.html.beads.models.MenuModel.prototype.set__strand = function(value) {
  this.org_apache_royale_html_beads_models_MenuModel__strand = value;
  org.apache.royale.html.beads.models.MenuModel.superClass_.set__strand.apply(this, [ value] );
  org.apache.royale.html.beads.models.MenuModel["menuList"].push(this.org_apache_royale_html_beads_models_MenuModel__strand);
};


Object.defineProperties(org.apache.royale.html.beads.models.MenuModel.prototype, /** @lends {org.apache.royale.html.beads.models.MenuModel.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.models.MenuModel.prototype.set__strand}}
);


org.apache.royale.html.beads.models.MenuModel.get__menuList = function() {
  return org.apache.royale.html.beads.models.MenuModel.org_apache_royale_html_beads_models_MenuModel__menuList;
};


Object.defineProperties(org.apache.royale.html.beads.models.MenuModel, /** @lends {org.apache.royale.html.beads.models.MenuModel} */ {
/**
  * @export
  * @type {Array} */
menuList: {
get: org.apache.royale.html.beads.models.MenuModel.get__menuList}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.models.MenuModel.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.html.beads.models.MenuModel'},
        '|menuList': { type: 'Array', access: 'readonly', declaredBy: 'org.apache.royale.html.beads.models.MenuModel'}
      };
    },
    methods: function () {
      return {
        'MenuModel': { type: '', declaredBy: 'org.apache.royale.html.beads.models.MenuModel'},
        '|clearMenuList': { type: 'void', declaredBy: 'org.apache.royale.html.beads.models.MenuModel'},
        '|removeMenu': { type: 'void', declaredBy: 'org.apache.royale.html.beads.models.MenuModel', parameters: function () { return [  { index: 1, type: 'Object', optional: false } ]; }}
      };
    }
  };
};