"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 panelCtrl_1 = require("../ctrls/panelCtrl");
var sceneTypes_1 = require("../types/sceneTypes");
var UtilsConst_1 = require("../comm/UtilsConst");
var Bar = (function (_super) {
    __extends(Bar, _super);
    function Bar(data) {
        var _this = _super.call(this) || this;
        _this.data = null;
        _this.skinName = utils_1.getSkinPath('Component/Bar');
        _this.data = data || null;
        _this.initEvents();
        _this.title.text = document.title; //'工行卡中心';
        return _this;
    }
    Bar.prototype.initEvents = function () {
        this.back.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap, this);
        this.rule.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap, this);
    };
    /// TODO 定义详细的操作
    Bar.prototype.onTap = function (e) {
        UtilsConst_1.btnDelay(e.target);
        switch (e.target) {
            case this.rule:// 规则
                panelCtrl_1.default.instance.show(sceneTypes_1.ModuleTypes.RULE_PANEL);
                break;
            case this.back:// 返回
                window.history.back();
                break;
            default:
                break;
        }
    };
    return Bar;
}(eui.Component));
exports.default = Bar;
__reflect(Bar.prototype, "\"/Users/haiyoucuv/Documents/Web/\u5DE5\u884C\u5361\u4E2D\u5FC3--\u6B22\u8DA3\u5E84\u56ED\u6D3B\u52A8/JoyousManor/egret/src/components/Bar\".Bar");
//# sourceMappingURL=Bar.js.map