import { Decorator } from "../Decorator/Decorator";
import Panel from "../views/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { HtmlTextParser } from "../../libs/tc/util/HtmlTextParser";

export default class RulePanel extends Panel {
  get skinKey() { return "RulePanel" }
  get groupName() { return "rule_panel" }
  public closeBtn: eui.Button;
  public text: eui.Label;

  constructor() {
    super();
    this.top = 0
    this.left = 0
    this.right = 0
    this.bottom = 0;
    egret.DisplayObject
  }

  onSkinComplete() {
    super.onSkinComplete();
    this.closeBtn.onTap(this, this.hidePanel);
    this.text.textFlow = new HtmlTextParser().parse(DataManager.ins.ajaxElementData.rule);
  }
}