// Class: openfl.display.DOMSprite

var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this

$global.Object.defineProperty(exports, "__esModule", {value: true});

var __map_reserved = {};

// Imports

var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
var $extend = require("./../../extend_stub").default;
function openfl_display_Sprite() {return require("./../../openfl/display/Sprite");}

// Constructor

var DOMSprite = function(element) {
	(openfl_display_Sprite().default).call(this);
	this.__element = element;
}

// Meta

DOMSprite.__name__ = ["openfl","display","DOMSprite"];
DOMSprite.__super__ = (openfl_display_Sprite().default);
DOMSprite.prototype = $extend((openfl_display_Sprite().default).prototype, {
	__renderDOM: function(renderer) {
		if(this.stage != null && this.__worldVisible && this.__renderable) {
			if(!this.__active) {
				renderer.__initializeElement(this,this.__element);
				this.__active = true;
			}
			renderer.__updateClip(this);
			renderer.__applyStyle(this,true,true,true);
		} else if(this.__active) {
			renderer.element.removeChild(this.__element);
			this.__active = false;
		}
		(openfl_display_Sprite().default).prototype.__renderDOM.call(this,renderer);
	}
});
DOMSprite.prototype.__class__ = $hxClasses["openfl.display.DOMSprite"] = DOMSprite;

// Init



// Statics




// Export

exports.default = DOMSprite;