
/**
 * element Component class
 *
 * @class component
 */"use strict"

var prime = require("prime/index");

var method = prime({
	/**
	 * [toElement description]
	 * @return {[type]} [description]
	 */
	toElement: function() {
		return this.element;
	},

	/**
	 * [show description]
	 * @return {[type]} [description]
	 */
	show: function(){
		this.emit('show');
		this.element.show();

		return this;
	},

	/**
	 * [hide description]
	 * @return {[type]} [description]
	 */
	hide: function(){
		this.emit('hide');
		this.element.hide();

		return this;
	},

	/**
	 * [show description]
	 * @return {[type]} [description]
	 */
	fade: function(value){
		this.emit('fade');
		this.element.fade(value);

		return this;
	},

	/**
	 * [getStyle description]
	 * @param  {[type]} style [description]
	 * @return {[type]}       [description]
	 */
	getStyle: function(name){
		return this.element.attribute(name);

	},

	/**
	 * [getSize description]
	 * @return {[type]} [description]
	 */
	getSize: function() {
		//_log.debug('------',typeOf(this.element));
		//if (typeOf(this.element) == 'object')

			//_log.debug(this.options.name);

		return this.element.getSize();
	},

	/**
	 * [getComputedSize description]
	 * @return {[type]} [description]
	 */
	getComputedSize: function() {
		return this.element.getComputedSized();
	},

	/**
	 * [getCoordinates description]
	 * @return {[type]} [description]
	 */
	getCoordinates: function(context) {
		return this.element.getCoordinates(context);
	},

	/**
	 * [addClass description]
	 * @param {[type]} klass [description]
	 */
	addClass: function(klass){
		this.element.addClass(klass);
		return this;
	},

	/**
	 * [removeClass description]
	 * @param  {[type]} klass [description]
	 * @return {[type]}       [description]
	 */
	removeClass: function(klass){
		return this.element.removeClass(klass);
	},

	/**
	 * [get description]
	 * @param  {[type]} property [description]
	 * @return {[type]}          [description]
	 */
	get: function(property){
		return this.element.get(property);
	},

	/**
	 * [morph description]
	 * @param  {[type]} props [description]
	 * @return {[type]}       [description]
	 */
	morph: function(props){
		return this.element.morph(props);
	},

	/**
	 * [setSize description]
	 * @param {[type]} width  [description]
	 * @param {[type]} height [description]
	 */
	setSize: function(width, height){
		this.element.x = width || this.options.width;
		this.element.y = height || this.options.height;

		if (this.element.x)
			this.element.setStyle('width', this.element.x);

		if (this.element.y)
			this.element.setStyle('height', this.element.y);

		this.emit('resize');
		return this;
	},

	/**
	 * [setStyle description]
	 * @param {[type]} style [description]
	 * @param {[type]} value [description]
	 */
	setStyle: function(style, value){
		this.element.style(style, value);

		return this;
	},

	/**
	 * [setStyles description]
	 * @param {[type]} styles [description]
	 */
	setStyles: function(styles){
		this.element.setStyles(styles);

		return this;
	},

	/**
	 * [getElement description]
	 * @param  {[type]} string [description]
	 * @return {[type]}        [description]
	 */
	getElement: function(string){
		return this.element.getElement(string);
	},

	/**
	 * [getElements description]
	 * @param  {[type]} string [description]
	 * @return {[type]}        [description]
	 */
	getElements: function(string){
		return this.element.getElements(string);
	},

	/**
	 * [setText description]
	 * @param {[type]} text [description]
	 */
	setText: function(text) {
		this.element.text(text);

		return this;
	},

	/**
	 * set content of the element
	 * @param {string} content [description]
	 */
	setContent: function(content) {
		this.content.set('html', content);

		this.emit('resize');

		return this;
	},

	/**
	 * [submit description]
	 * @param  {[type]} string [description]
	 * @return {[type]}        [description]
	 */
	submit:  function(string){
		return this.element.submit(string);
	},

	/**
	 * [dispose description]
	 * @return {[type]} [description]
	 */
	dispose: function(){
		return this.element.dispose();
	},

	/**
	 * [destroy description]
	 * @return {[type]} [description]
	 */
	destroy: function(){
		this.element.destroy();
		return;
	}
});

module.exports = method;

@@ -2208,32 +2208,347 @@
 ph(props);%0A%09%7D,%0A%0A
+%0A%09/**%0A%09 * %5Bdelegate description%5D%0A%09 * @param  %7B%5Btype%5D%7D   type     %5Bdescription%5D%0A%09 * @param  %7B%5Btype%5D%7D   selector %5Bdescription%5D%0A%09 * @param  %7BFunction%7D fn       %5Bdescription%5D%0A%09 * @return %7B%5Btype%5D%7D            %5Bdescription%5D%0A%09 */%0A%09delegate: function(type, selector, fn) %7B%0A%09%09this.element.delegate(type, selector, fn);%0A%09%7D,%0A%0A%0A
 %09/**%0A%09 * %5BsetSiz

add delegate method