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

goog.provide('org.apache.royale.jewel.beads.controls.datefield.DateFieldTextPrompt');

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.textinput.TextPrompt');
goog.require('org.apache.royale.jewel.beads.views.DateFieldView');
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.datefield.DateFieldTextPrompt = function() {
  org.apache.royale.jewel.beads.controls.datefield.DateFieldTextPrompt.base(this, 'constructor');
};
goog.inherits(org.apache.royale.jewel.beads.controls.datefield.DateFieldTextPrompt, org.apache.royale.jewel.beads.controls.textinput.TextPrompt);


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


/**
 * @private
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.jewel.beads.controls.datefield.DateFieldTextPrompt.prototype.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt__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.datefield.DateFieldTextPrompt.prototype.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt_addPrompt = function(event) {
  this.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt__strand.removeEventListener("beadsAdded", org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt_addPrompt, this, 'addPrompt'));
  var /** @type {org.apache.royale.jewel.beads.views.DateFieldView} */ viewBead = org.apache.royale.utils.Language.as(this.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt__strand.getBeadByType(org.apache.royale.jewel.beads.views.DateFieldView), org.apache.royale.jewel.beads.views.DateFieldView);
  var /** @type {HTMLInputElement} */ e = viewBead.textInput.element;
  e.placeholder = this.prompt;
};


org.apache.royale.jewel.beads.controls.datefield.DateFieldTextPrompt.prototype.set__strand = function(value) {
  this.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt__strand = value;
  this.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt__strand.addEventListener("beadsAdded", org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_beads_controls_datefield_DateFieldTextPrompt_addPrompt, this, 'addPrompt'));
};


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


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



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