"use strict";
var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = this && this.__extends || function __extends(t, e) { 
 function r() { 
 this.constructor = t;
}
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
r.prototype = e.prototype, t.prototype = new r();
};
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("../utils");
var ComponentBase = (function (_super) {
    __extends(ComponentBase, _super);
    function ComponentBase() {
        var _this = _super.call(this) || this;
        _this.data = {};
        _this.skinName = utils_1.getSkinPath(_this.skinKey);
        _this.addEventListener(egret.Event.COMPLETE, _this.onSkinComplete, _this);
        if (_this.skin) {
            _this.onSkinComplete();
        }
        return _this;
    }
    ComponentBase.prototype.initEvents = function () { };
    ComponentBase.prototype.removeEvents = function () { };
    ComponentBase.prototype.start = function (data) {
    };
    Object.defineProperty(ComponentBase.prototype, "skinKey", {
        get: function () { return null; },
        enumerable: true,
        configurable: true
    });
    ComponentBase.prototype.onSkinComplete = function () {
        this.initEvents();
    };
    ComponentBase.prototype.destroy = function () {
        this.removeEvents();
    };
    return ComponentBase;
}(eui.Component));
exports.default = ComponentBase;
__reflect(ComponentBase.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/gameegret20181011/db-game-template/egret/src/components/ComponentBase\".ComponentBase");
//# sourceMappingURL=ComponentBase.js.map