"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 HtmlTextParser_1 = require("./../ctrls/HtmlTextParser");
var Panel_1 = require("../views/Panel");
var NetManager_1 = require("../../libs/tw/manager/NetManager");
var DataManager_1 = require("../../libs/tw/manager/DataManager");
var RulePanel = (function (_super) {
    __extends(RulePanel, _super);
    function RulePanel(data) {
        return _super.call(this, data) || this;
    }
    Object.defineProperty(RulePanel.prototype, "skinKey", {
        get: function () { return 'RulePanel'; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RulePanel.prototype, "groupName", {
        get: function () { return 'rule_panel'; },
        enumerable: true,
        configurable: true
    });
    RulePanel.prototype.onSkinComplete = function () {
        _super.prototype.onSkinComplete.call(this);
        this.once(egret.Event.ADDED_TO_STAGE, this.onLoad, this);
        if (this.stage) {
            this.onLoad();
        }
        this.showAct();
    };
    RulePanel.prototype.start = function () {
        this.percentHeight = 100;
    };
    RulePanel.prototype.initEvents = function () {
        _super.prototype.initEvents.call(this);
        // this.iknowBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onUse, this);
    };
    RulePanel.prototype.removeEvents = function () {
        _super.prototype.removeEvents.call(this);
        // this.iknowBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onUse, this);
    };
    RulePanel.prototype.onLoad = function () {
        NetManager_1.NetManager.ins.getRule(function (success) {
            if (success) {
                //使用 HtmlTextParser 解析html文本
                this.ruleLb.textFlow = new HtmlTextParser_1.HtmlTextParser().parse(DataManager_1.DataManager.ins.getRuleData.ruleText);
            }
            else {
                this.ruleLb.text = '规则';
            }
        }.bind(this));
    };
    return RulePanel;
}(Panel_1.default));
exports.default = RulePanel;
__reflect(RulePanel.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/newGame/saolei19.03.06/db-game-template/egret/src/rulePanel/RulePanel\".RulePanel");
//# sourceMappingURL=RulePanel.js.map