"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 Panel_1 = require("../views/Panel");
var Msg = (function (_super) {
    __extends(Msg, _super);
    function Msg() {
        return _super.call(this) || this;
    }
    Object.defineProperty(Msg.prototype, "message", {
        set: function (val) {
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Msg.prototype, "btnTxt", {
        set: function (val) {
        },
        enumerable: true,
        configurable: true
    });
    Msg.prototype.start = function (data) {
        var msg = data.msg;
        this.data.message = msg;
        this['msgTxt'].text = "" + this.data.message;
        switch (data.type) {
            case 'creditsOut':
                if (this['creditsOutBtn']) {
                    this['creditsOutBtn'].visible = true;
                    this['creditsOutBtn'].enabled = true;
                }
                if (this['confirmBtn']) {
                    this['confirmBtn'].visible = false;
                    this['confirmBtn'].enabled = false;
                }
                break;
            case 'err':
                if (this['creditsOutBtn']) {
                    this['creditsOutBtn'].visible = false;
                    this['creditsOutBtn'].enabled = false;
                }
                if (this['confirmBtn']) {
                    this['confirmBtn'].visible = true;
                    this['confirmBtn'].enabled = true;
                }
                break;
            default:
                if (this['creditsOutBtn']) {
                    this['creditsOutBtn'].visible = false;
                    this['creditsOutBtn'].enabled = false;
                }
                if (this['confirmBtn']) {
                    this['confirmBtn'].visible = true;
                    this['confirmBtn'].enabled = true;
                }
                break;
        }
    };
    Object.defineProperty(Msg.prototype, "creditsOutBtns", {
        get: function () {
            return [this['creditsOutBtn']];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Msg.prototype, "closeBtns", {
        get: function () {
            return [this['closeBtn']];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Msg.prototype, "skinKey", {
        get: function () { return 'Msg'; },
        enumerable: true,
        configurable: true
    });
    return Msg;
}(Panel_1.default));
exports.default = Msg;
__reflect(Msg.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/gameegret20181011/db-game-template/egret/src/alert/Msg\".Msg");
//# sourceMappingURL=Msg.js.map