/**
 * Generated by Apache Royale Compiler from org\apache\royale\jewel\beads\controls\combobox\ComboBoxTextPrompt.as
 * org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt');

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.events.IEventDispatcher');
goog.require('org.apache.royale.jewel.beads.controls.combobox.IComboBoxView');
goog.require('org.apache.royale.jewel.beads.controls.textinput.TextPrompt');
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.beads.controls.textinput.TextPrompt}
 */
org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt = function() {
  org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.base(this, 'constructor');
};
goog.inherits(org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt, org.apache.royale.jewel.beads.controls.textinput.TextPrompt);


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt', org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt);


/**
 * @private
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.prototype.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt__strand;


/**
 *  add prompt when beads are added and we can access the view to retrieve the textinput
 *   
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 *  @royaleignorecoercion org.apache.royale.events.IEventDispatcher
 *  @royaleignorecoercion org.apache.royale.jewel.beads.controls.combobox.IComboBoxView
 *  @royaleignorecoercion HTMLInputElement
 * @private
 * @param {org.apache.royale.events.Event} event
 */
org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.prototype.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt_addPrompt = function(event) {
  this.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt__strand.removeEventListener("beadsAdded", org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt_addPrompt, this, 'addPrompt'));
  var /** @type {Object} */ viewBead = this.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt__strand.getBeadByType(org.apache.royale.jewel.beads.controls.combobox.IComboBoxView);
  var /** @type {HTMLInputElement} */ e = viewBead.textinput.element;
  e.placeholder = this.prompt;
};


org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.prototype.set__strand = function(value) {
  this.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt__strand = value;
  this.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt__strand.addEventListener("beadsAdded", org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_beads_controls_combobox_ComboBoxTextPrompt_addPrompt, this, 'addPrompt'));
};


Object.defineProperties(org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.prototype, /** @lends {org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.prototype.set__strand}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt.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.jewel.beads.controls.combobox.ComboBoxTextPrompt'}
      };
    },
    methods: function () {
      return {
        'ComboBoxTextPrompt': { type: '', declaredBy: 'org.apache.royale.jewel.beads.controls.combobox.ComboBoxTextPrompt'}
      };
    }
  };
};