var t = require; var e = module; var i = exports; e = (this && this.__decorate) || function (t, e, i, s) { var o, a = arguments.length, n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s); else for (var r = t.length - 1; 0 <= r; r--) (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n); return 3 < a && n && Object.defineProperty(e, i, n), n; }; Object.defineProperty(i, "__esModule", {value: !0}); const l = t("App"), s = t("BaseView"), h = t("GameUtils"), c = t("CostumeConst"), {ccclass: o, property: a} = cc._decorator; t = class extends s.default { constructor() { super(...arguments), (this.bg = null), (this.item = null), (this.content = null), (this.moneyRateLab = null), (this.widgetArr = []), (this.bgType = 1); } initUI() { super.initUI(); } open() { super.open(); } updateUI(t, e, i) { this.moneyRateLab.string = "+" + i + "%"; let s = 0; for (var o in t) { var a = t[o]; const i = cc.instantiate(this.item); this.content.addChild(i), i.setSiblingIndex(parseInt(o)); var n = i.getComponent(cc.Sprite); (i.getComponentInChildren(cc.RichText).string = h.getCostumeAttrStr(parseInt(o), a.value)), l.default.CommonUtils.setSpriteFrame("Texture/quality/dk_" + a.gradeIndex, n), s++; } for (var r of e) { const t = cc.instantiate(this.item); this.content.addChild(t), t.setSiblingIndex(0); const e = t.getComponent(cc.Sprite); (t.getComponentInChildren(cc.RichText).string = r), l.default.CommonUtils.setSpriteFrame(c.getGradeBgByGrade(c.RarityType.mystic), e), s++; } this.item.removeFromParent(), (this.bg.height = 60 * s + 360); for (const l of this.widgetArr) l.updateAlignment(); } }; e([a(cc.Node)], t.prototype, "bg", void 0), e([a(cc.Node)], t.prototype, "item", void 0), e([a(cc.Node)], t.prototype, "content", void 0), e([a(cc.Label)], t.prototype, "moneyRateLab", void 0), e([a([cc.Widget])], t.prototype, "widgetArr", void 0), (t = e([o], t)), (i.default = t);