"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 ComponentBase_1 = require("../components/ComponentBase");
var Panel = (function (_super) {
    __extends(Panel, _super);
    function Panel() {
        return _super.call(this) || this;
    }
    Panel.prototype.initEvents = function () {
        var _this = this;
        this.closeBtns.forEach(function (btn) { if (btn)
            btn.addEventListener(egret.TouchEvent.TOUCH_TAP, _this.onTouchTap, _this); });
    };
    Panel.prototype.removeEvents = function () {
        var _this = this;
        this.closeBtns.forEach(function (btn) { if (btn)
            btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, _this.onTouchTap, _this); });
    };
    Object.defineProperty(Panel.prototype, "closeBtns", {
        get: function () { return [this['closeBtn']]; },
        enumerable: true,
        configurable: true
    });
    Panel.prototype.onTouchTap = function () {
        this.hidePanel();
    };
    Panel.prototype.hidePanel = function () {
        this.destroy();
        this.dispatchEvent(new egret.Event('onDestroy'));
    };
    return Panel;
}(ComponentBase_1.default));
exports.default = Panel;
__reflect(Panel.prototype, "\"e:/zqty/egret/src/views/Panel\".Panel");
//# sourceMappingURL=Panel.js.map