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

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

goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.html.supportClasses.CheckBoxIcon');
goog.require('org.apache.royale.html.util.addElementToWrapper');
goog.require('org.apache.royale.core.ISelectable');
goog.require('org.apache.royale.utils.Language');



/**
 * @constructor
 * @extends {org.apache.royale.core.UIBase}
 * @implements {org.apache.royale.core.ISelectable}
 */
org.apache.royale.html.CSSCheckBox = function() {
  org.apache.royale.html.CSSCheckBox.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.CSSCheckBox, org.apache.royale.core.UIBase);


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


/**
 * @private
 * @type {org.apache.royale.core.WrappedHTMLElement}
 */
org.apache.royale.html.CSSCheckBox.prototype.org_apache_royale_html_CSSCheckBox__label;


/**
 * @private
 * @type {org.apache.royale.html.supportClasses.CheckBoxIcon}
 */
org.apache.royale.html.CSSCheckBox.prototype.org_apache_royale_html_CSSCheckBox__icon;


/**
 * @private
 * @type {org.apache.royale.core.WrappedHTMLElement}
 */
org.apache.royale.html.CSSCheckBox.prototype.org_apache_royale_html_CSSCheckBox__styleDiv;


/**
 * @private
 * @type {org.apache.royale.core.WrappedHTMLElement}
 */
org.apache.royale.html.CSSCheckBox.prototype.org_apache_royale_html_CSSCheckBox__textNode;


/**
 * @private
 * @type {number}
 */
org.apache.royale.html.CSSCheckBox.org_apache_royale_html_CSSCheckBox__checkNumber = 0;


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @protected
 * @override
 */
org.apache.royale.html.CSSCheckBox.prototype.createElement = function() {
  org.apache.royale.html.util.addElementToWrapper(this, 'label');
  this.org_apache_royale_html_CSSCheckBox__label = this.element;
  this.org_apache_royale_html_CSSCheckBox__icon = new org.apache.royale.html.supportClasses.CheckBoxIcon();
  this.element.appendChild(this.org_apache_royale_html_CSSCheckBox__icon.element);
  this.org_apache_royale_html_CSSCheckBox__styleDiv = document.createElement('div');
  if (this.org_apache_royale_html_CSSCheckBox__checkClassName)
    this.org_apache_royale_html_CSSCheckBox__styleDiv.setAttribute("class", this.org_apache_royale_html_CSSCheckBox__checkClassName);
  this.element.appendChild(this.org_apache_royale_html_CSSCheckBox__styleDiv);
  this.org_apache_royale_html_CSSCheckBox__textNode = document.createTextNode('');
  this.element.appendChild(this.org_apache_royale_html_CSSCheckBox__textNode);
  this.org_apache_royale_html_CSSCheckBox__icon.element.royale_wrapper = this;
  this.org_apache_royale_html_CSSCheckBox__styleDiv.royale_wrapper = this;
  this.typeNames = 'CSSCheckBox';
  return this.element;
};


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.CSSCheckBox.prototype.org_apache_royale_html_CSSCheckBox__checkClassName;


org.apache.royale.html.CSSCheckBox.prototype.get__checkClassName = function() {
  return this.org_apache_royale_html_CSSCheckBox__checkClassName;
};


org.apache.royale.html.CSSCheckBox.prototype.set__checkClassName = function(value) {
  this.org_apache_royale_html_CSSCheckBox__checkClassName = value;
  if (this.org_apache_royale_html_CSSCheckBox__styleDiv)
    this.org_apache_royale_html_CSSCheckBox__styleDiv.setAttribute("class", this.org_apache_royale_html_CSSCheckBox__checkClassName);
};


org.apache.royale.html.CSSCheckBox.prototype.get__text = function() {
  return this.org_apache_royale_html_CSSCheckBox__textNode.nodeValue;
};


org.apache.royale.html.CSSCheckBox.prototype.set__text = function(value) {
  this.org_apache_royale_html_CSSCheckBox__textNode.nodeValue = value;
};


org.apache.royale.html.CSSCheckBox.prototype.get__selected = function() {
  return org.apache.royale.utils.Language.as(this.org_apache_royale_html_CSSCheckBox__icon.element, HTMLInputElement).checked;
};


org.apache.royale.html.CSSCheckBox.prototype.set__selected = function(value) {
  org.apache.royale.utils.Language.as(this.org_apache_royale_html_CSSCheckBox__icon.element, HTMLInputElement).checked = value;
};


Object.defineProperties(org.apache.royale.html.CSSCheckBox.prototype, /** @lends {org.apache.royale.html.CSSCheckBox.prototype} */ {
/**
  * @export
  * @type {string} */
checkClassName: {
get: org.apache.royale.html.CSSCheckBox.prototype.get__checkClassName,
set: org.apache.royale.html.CSSCheckBox.prototype.set__checkClassName},
/**
  * @export
  * @type {string} */
text: {
get: org.apache.royale.html.CSSCheckBox.prototype.get__text,
set: org.apache.royale.html.CSSCheckBox.prototype.set__text},
/**
  * @export
  * @type {boolean} */
selected: {
get: org.apache.royale.html.CSSCheckBox.prototype.get__selected,
set: org.apache.royale.html.CSSCheckBox.prototype.set__selected}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.CSSCheckBox.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'checkClassName': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.CSSCheckBox'},
        'text': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.CSSCheckBox'},
        'selected': { type: 'Boolean', access: 'readwrite', declaredBy: 'org.apache.royale.html.CSSCheckBox'}
      };
    },
    methods: function () {return {};},
    metadata: function () { return [  ]; }
  };
};