/**
 * Generated by Apache Royale Compiler from org\apache\royale\jewel\supportClasses\drawer\DrawerBase.as
 * org.apache.royale.jewel.supportClasses.drawer.DrawerBase
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.jewel.supportClasses.drawer.DrawerBase');

goog.require('org.apache.royale.core.IChild');
goog.require('org.apache.royale.core.IUIBase');
goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.html.util.addElementToWrapper');
goog.require('org.apache.royale.jewel.Group');
goog.require('org.apache.royale.utils.Language');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @constructor
 * @extends {org.apache.royale.jewel.Group}
 */
org.apache.royale.jewel.supportClasses.drawer.DrawerBase = function() {
  org.apache.royale.jewel.supportClasses.drawer.DrawerBase.base(this, 'constructor');
  this.typeNames = "jewel drawer";
};
goog.inherits(org.apache.royale.jewel.supportClasses.drawer.DrawerBase, org.apache.royale.jewel.Group);


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.jewel.supportClasses.drawer.DrawerBase', org.apache.royale.jewel.supportClasses.drawer.DrawerBase);


/**
 * @protected
 * @type {HTMLElement}
 */
org.apache.royale.jewel.supportClasses.drawer.DrawerBase.prototype.nav;


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @protected
 * @override
 */
org.apache.royale.jewel.supportClasses.drawer.DrawerBase.prototype.createElement = function() {
  this.nav = org.apache.royale.html.util.addElementToWrapper(this, 'nav');
  this.nav.className = "drawermain";
  var /** @type {HTMLElement} */ aside = org.apache.royale.utils.Language.as(document.createElement('aside'), HTMLElement);
  aside.appendChild(this.nav);
  this.positioner = aside;
  this.positioner.royale_wrapper = this;
  return this.element;
};


/**
 *  @copy org.apache.royale.core.IParent#addElement()
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 *  @royaleignorecoercion org.apache.royale.core.IUIBase
 * @export
 * @override
 */
org.apache.royale.jewel.supportClasses.drawer.DrawerBase.prototype.addElement = function(c, dispatchEvent) {
  dispatchEvent = typeof dispatchEvent !== 'undefined' ? dispatchEvent : true;
  
  this.nav.appendChild(c.positioner);
  c.addedToParent();
};


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.jewel.supportClasses.drawer.DrawerBase.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'DrawerBase', qName: 'org.apache.royale.jewel.supportClasses.drawer.DrawerBase', kind: 'class' }] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.supportClasses.drawer.DrawerBase.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {return {};},
    methods: function () {
      return {
        'DrawerBase': { type: '', declaredBy: 'org.apache.royale.jewel.supportClasses.drawer.DrawerBase'},
        'addElement': { type: 'void', declaredBy: 'org.apache.royale.jewel.supportClasses.drawer.DrawerBase', parameters: function () { return [  { index: 1, type: 'org.apache.royale.core.IChild', optional: false },{ index: 2, type: 'Boolean', optional: true } ]; }}
      };
    },
    metadata: function () { return [  ]; }
  };
};